🏠 About Now Archive Tags RSS

Posts tagged "computers":

The good side-window side

I want the content I am working on to be the centre of attention on my screen. I want as little scrolling as possible and most of the content I work with is taller than it is wide (code and org documents). On wide screens, buffers with shells, for version control, REPLs, help, info etc should therefore be on the side of the screen where it does not steal space from the main content. Since I read left to right, I like such windows to pop up on the right side where they do not disturb the flow of my reading of the main content. Emacs has the concept of side-windows that is useful for taming buffers that would otherwise pop up other places.

I set the width of my side-windows to 80 since man pages expect that and it works well for help and shells as well. To be able to have a (wo)man page and a shell, an info node and a REPL, or a shell, REPL and help buffer at the same time, I use slots to divide up the side-window if more than one special buffer is open. I have not included ansi-term in the buffer-list for side-windows since I use it only occasionally when I want more than one terminal, in which case I need to be able to manage its windows in the normal way. Usually, there is no need for a full terminal emulator, but I use Eshell a lot.

At home, my laptops and my external screen are 16:9 or 16:10 wide screens. At my desk at work, I have a 16:9 screen, a 16:10 screen and another 16:9 screen flipped 90 degrees to the portrait orientation. I usually use the tall screen for Emacs to minimise scrolling. Since the tall screen is slim (9:16), I would rather have side-windows in the bottom instead of overlapping the main window on the right side when I use that screen. Even with the side-windows at the bottom, the screen is a lot taller than the wide screens which is nice.

However, I spend most of my time at work not at my desk, but in two classrooms where I either use my laptop only with its built-in screen, duplicated to a large screen in front of the class or only with an external screen when sitting in the back (for ergonomics). And there are also meetings where I use the laptop's internal screen only. All of these screens are wider than they are tall, so I want my side-windows on the right again.

So I made a function that checks whether the height of the frame is larger than the width and if so, side-windows are put on the bottom of the screen where they belong on tall screens, but if the opposite is true, then they are put on the right where they make more sense on wide screens. I call this function when Emacs starts in my configuration to adapt the side-windows to the screen in use, but I also have a keybinding (C-z w) for it so after moving from a classroom or meeting to my desk or vise versa, I can get the side-windows where I want them without having to end my Emacs session. I often prepare a file at my desk that I am going to present in class with inter-present-mode or jot something in a file during class that I work on at my desk later, so it is useful to keep the session going.

Here is my function for deciding which side side-windows should be on:

(defun emo-side-window-side ()
  "Evaluates which side side-windows should be on based on whether the frame is in portrait or landscape orientation."
  (interactive)
  (let* ((side-window-side (if (> (frame-outer-height) (frame-outer-width))
                          'bottom 'right))
       (disp-buf-alist `(("\\*\\(Python\\|ielm\\|compilation\\).*\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (side . ,side-window-side)
          (slot . -1)
          (post-command-select-window . t)
          (window-width . 80))
("\\*\\(shell\\|.*eshell\\).*\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (side . ,side-window-side)
          (slot . 0)
          (post-command-select-window . t)
          (window-width . 80))
("\\*\\(help\\|info\\|man\\|woman\\|Agenda Commands\\|Org Agenda\\|Occur\\|Buffer.\\|xref\\).*\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (side . ,side-window-side)
          (slot . 1)
          (post-command-select-window . t)
          (window-width . 80)))))
  (setq display-buffer-alist disp-buf-alist)))

Boot RaspberryPi OS on an NVME larger than 2TB

RaspberryPi OS boots from an EFI partition. On other hardware, an EFI partition is used with UEFI which demands that your disk is GPT-partitioned or a hybrid GPT with MBR. However, the RaspberryPi imager and the installer you get when pressing Shift at boot uses MBR. MBR is a way to partition a disk that we used in the 1980s and that made sense back then, but it has the unfortunate limitation that it cannot use disks larger than 2 TB. So when I bought my 4 TB NVME to use with my Raspberry Pi 5, I was unpleasantly surprised that after installing RaspberryPi OS light, I could only see a 2 TB disk.

There are various solutions floating around the internet to get around this problem, but most of them are unnecessarily complex. The RaspberryPi 5 can boot from a disk partitioned with a GPT partition table just fine. The problem is just to get the right partitions with the right data onto the disk since the installer insists on using 1980s technology which means that you cannot use it on large disks. In the early 80s, a large hard drive had 40 MB capacity, so 2TB seemed like science fiction. Who would need all that space when Macintosh System Software, a few programs like MacWrite and MacDraw and a dozen files could fit on a 800kB diskette? (The Double Density 3.5 inch floppy disks that gave 720kB space on MS-DOS delivered 800kB on a Mac.)

In addition to your NVME, you will also need a USB stick and an SD card. If you use a case like my Argon Neo, installing the NVME and SD-card demands a bit of disassembly. The reason we need two other devices is that we need to clone one of them to the NVME and to do that we need to boot from the other. Here is what you need to do to your NVME working:

  1. Insert the SD-card and the NVME in your case or hat or whatever you use and insert an ethernet cable connected to your router.
  2. Boot your RaspberryPi while repeatedly pressing down the shift key until you get to the Raspberry Pi screen that downloads the installer.
  3. Install RaspberryPi OS (light) on the SD card.
  4. Boot from the SD card. If the boot order is set to boot from NVME first, you may have to press Space when booting to get to the boot order screen first. Since RaspberryPi OS reboots once as part of the isntallation, you may have to go through the boot order screen twice, so be ready to press space again after the first boot. After the second boot, the SD card has got RaspberryPi OS and the root partition (/) has been expanded.
  5. Insert your USB stick into one of the blue USB3 ports.
  6. Boot your Raspberry Pi again and repeatedly press down shift until you get to the screen that downloads the installer.
  7. Install RaspberryPi OS on your USB-stick.
  8. When the Pi reboots, press space repeatedly to get to the boot order screen and select USB and boot.
  9. Be ready to press space repeatedly again since the Pi reboots once as part of the installation process and choose USB again to boot the USB stick and let it expand the root partition.
  10. When you have booted into the USB stick for the second time after the root partition has been expanded, open a terminal (or use the TTY if you used RPi light).
  11. Write sudo fdisk /dev/nvme0n1 to partition the NVME with fdisk.
  12. Press g to make a new GPT partition table. You may have to confirm that you want to remove an MS-DOS (MBR) partition table already there.
  13. Press n to make a new partition.
  14. Choose the default as the first sector by pressing return.
  15. Write +512M to make the size of the partition half a Gigabyte.
  16. Press t to change a partition.
  17. Choose the default 1 as the partition you want to change.
  18. Set its type to 1 (EFI System).
  19. Make a new partition with n.
  20. Accept the defaults since it will use the rest of the disk.
  21. Press w to write your changes to the disk.
  22. Write dd if=/dev/mmcblk0p1 of=/dev/nvme0n1p1 && sync and press return. This will clone the first partition, the EFI partiont, of the SD card onto the first partition of the NVME.
  23. Write dd if=/dev/mmcblk0p2 of=/dev/nvme0n1p2 && sync and press return. This will clone the second partition, the root partition, of the SD card onto the second partition of the NVME.
  24. Write sudo mount /dev/nvme0n1p1 /mnt to mount the EFI partition of the NVME to /mnt on your running system (from the USB stick).
  25. Write lsblk -f to get the UUID of the root partition of the NVME (/dev/nvme0n1p2).
  26. Open the file /mnt/cmdline.txt with sudo in a text editor. (I prefer to combine step 25 up to and including 33 since Emacs has a built in terminal multiplexer and tiling window manager, and it is easier to copy the UUID from one window in Emacs to another window than to try to remember a UUID from lsblk -f from before I opened Emacs. I also use tramp inside Emacs to open the files with sudo instead of opening emacs with sudo. If you use another text editor in a TTY, then you probably have to write the UUID down after running lsblk -f since your text editor will hide the output from that command when you launch it to edit the file, unless you use GNU screen or tmux.)
  27. Change where it says root=PARTUUID=somenumber to root=UUID= and write or paste the UUID from lsblk -f for /dev/nvme0n1p2.
  28. Save the file and exit the text editor if you use a TTY editor without a built in terminal multiplexer.
  29. Write sudo umount /mnt and press return to unmount the first partition.
  30. Write sudo mount /dev/nvme0n1p2 /mnt to mount the root partition from the NVME to /mnt on your running system (the USB stick). If it tells you the disk is busy, wait for it. It means that the disk is still writing even if it has tld the OS it has finished. If you fail to wait, then you cannot boot.
  31. Write lsblk -f again and note down the UUID of both /dev/nvme0n1p1 (the EFI partition) and /dev/nvme0n1p2 if you did not already note it down. (Or use a terminal multiplexer or Emacs to copy it over when you need it.)
  32. Open the file /mnt/etc/fstab in a text editor with sudo.
  33. Replace the part of the line that says PARTUUID=somenumber on the line where it says /boot/firmware with UUID= and write or paste the UUID number for /dev/nvme0n1p1 (the EFI partition).
  34. Do the same with line where it says /, but use the UUID for /dev/nvme0n1p2 (the root partition).
  35. Save the file and exit your text editor.
  36. Wait for a while to allow time for the nvme to write out the change. Turn off the RaspberryPi.
  37. Remove the SD card and the USB stick.
  38. Reboot the Raspberry Pi. It should now boot from the NVME. If the boot order is set to boot USB or SD Card first, you may have to press space when booting to boot from the NVME. In such a case, you should write sudo raspi-config in a terminal and go to Advanced Options, choose A4 Boot order, and choose B2 NVME/USB Boot … and then press OK and finish and reboot. It should now boot from the NVME. If something went wrong and you end up in an emergency shell, then reboot, insert the USB and SD card again, press space and try again.

I now have a 4TB NVME that boots my RaspberryPi 5. I also tried booting from SD card and using the NVME only as storage for a while, but it was slow and annoying, so it is really worth spending some time to get the Pi booting from the NVME. Hopefully, the RaspberryPi devs will change the imager and installer so they use the GPT partition scheme in the future. There is no reason to use MBR in the 21st century.

Inter-present-mode

A while ago, I wrote that I made a few functions to present from org mode to replace org-present which removes too many glyphs to be practical for my use. I thought it would be nice to use use-package to defer loading these functions until I need them, and I was curious about how to make a minor mode. So yesterday, I created a minor mode around those simple functions.

I made functions for starting the presentation, going forward, going backward and stopping the presentation, so turning it into a minor mode that is turned on and then have some functionality bound to a keymap, and which you then can turn off again was a very natural fit. I added the ability to customize a few things and have some ideas for more functionality to include and more things to customize.

Have a look at the Readme.org at Codeberg.org if you want to have a look or try it out. I might try to include it in a package archive in the future, but for now, you can install it with use-package's vc: keyword.

Presentation functions

I use Emacs at work to present in class. I teach basic IT technology, programming and development, so it is very useful to be able to run code blocks interactively and get them syntax highlighted. If I get questions from the students, I can change the code to explain other ways of doings things or show them how small changes can yield very different results. I also quite often add additional useful information from the students into the slides while presenting if they mention something worth noting. I have written about this before.

I have used org-present to present from Emacs Org files thus far. It has been good in many ways, but there have been a few annoyances as well. One thing that has bitten me many times is that it hides too many characters. This means that when I show things like == on screen (except in code blocks), it looks like =. This is very annoying when teaching programming. It also ruins org tables since it removes + which means that tables with vertical lines that are fully aligned normally show up misaligned. I have stopped using lines to separate headings and content in tables, but it is not ideal. I have used org-present for two years now, and there is no way to configure it to remove these annoyances, so I am ready to switch to something else.

Today, I found some time to look into this and made a few, simple functions that does exactly what I need and nothing more. It is just ten lines more than my previous configuration for org-present. And since it is part of my Emacs config, there is no need to install additional packages. I almost always start presentations from the the start with the title, so my emo-present-start function does that. There is a bit of a rough edge in that it shows metadata keywords like #+Title: and #+Options: toc: nil when I present the title. I might sandpaper that rough edge off in the future. Otherwise, it works better for me than org-present and with a lot fewer lines of code.

Fix popup windows in Emacs

Whenever you use a function that pops up a window in Emacs, it can be annoying and distracting. The buffer often take over one of the windows you already have on screen and that you are actively working in. For example, when using Python mode, I often felt that it was a bit random where the Python Shell buffer would show up when invoked with C-c C-p. The same problem occurs with help buffers, shell mode, eshell, ansi-term, async-shell-command, man, woman, occur etc. It isn't actually random, but the rules governing in which window new buffers show up, in the variable display-buffer-alist is quite opaque to a new user, so it seems random.

I lived with this seeming randomness for a while, but it annoyed me. Then I came across a video by David Wilson of SystemCrafters that showed me how I could use the concept of a side-window to not have popup windows take over my other windows. I also looked at his Emacs configuration and stole some of his settings. It solved the annoyance of popup windows taking over my other windows. He places his side-window in the bottom third of the screen. It makes sense when you want to pop up a shell or terminal, write a few commands and then close it again which you often see David do on his videos.

I also watched a video by Protesilaos Stavrou about side-windows where he explained the concept of slots. It solves the problem you have when you have more than one side-window from a popup buffer open at the same time. Maybe you have a help buffer and shell mode for instance. Prot also uses the lower part of his screen for his side-windows.

Since almost every screen is wider than it is tall, I think a better placement for user interface elements and extra information is on the left or right, not the top or bottom of the screen. Most content, except a few videos and pictures, are higher than they are tall. I want the content I am working on to take up as much as possible of the screen real estate to avoid unnecessary scrolling. This is why I always turn on the sidebar and off the toolbars in LibreOffice Writer and detest the Ribbon interface in MS365's Word.

Back to Emacs. I had a look at the Emacs manual which showed me how to tweak the settings David Wilson and Prot had taught me to get what I want. I think buffers with shells, for version control, REPLs, help, info etc should pop up on the side of the screen and leave the main buffer(s) alone. I want the content I am working on to always be the centre of attention. Since I read left to right, I like such windows to pop up on the right side of the screen where they disturb the other window(s) the least. (If I read right to left, I would have had them pop up on the left.) I set the width to 80 since man pages expect that and it works well for help and shells as well. (On smaller screens like the 1366 x 768 screen on the ThinkPad X230, this feels a bit large, but on larger screens like my 1440p external screen at home, it takes up less than a third of the screen. I could have used a ratio like 0.33 to have the side-window always take up one third of the screen, but that would mean it would be wider than necessary on large screens and too small for the content of [wo]man buffers on small screens, so after trying that for a while, I went with a fixed width in columns instead.)

To be able to have a man page and a shell, an info node and a REPL, or a shell, REPL and help buffer at the same time, I use slots to divide up the side-window if more than one special buffer is open. Slot -1 ends up at the top if there are more than one special window. Slot 0 ends up in the middle and slot 1 ends up at the bottom. I have REPLs at the top, shells in the middle and documentation in the bottom. I seldom use both a woman buffer and a help buffer at the same time, but I might use for example the Python REPL, Shell mode to launch and test out a python program and an info manual with Python documentation (yes, it is available in info format) at the same time, so it is useful to use different slots. If there is one buffer, the whole side of the screen is used and if there are two, the side is split in two if they occupy different slots.

Here is the code from my Emacs config for this:

(setq display-buffer-alist '(("\\*\\(Python\\|ielm\\|compilation\\).*\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (side . right)
          (slot . -1)
          (post-command-select-window . t)
          (window-width . 80))
("\\*\\(shell\\|.*eshell\\).*\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (side . right)
          (slot . 0)
          (post-command-select-window . t)
          (window-width . 80))
("\\*\\(help\\|info\\|man\\|woman\\|.*Ibuffer*\\|Agenda Commands\\|Org Agenda\\|Occur\\|xref\\).*\\*"
          (display-buffer-reuse-window display-buffer-in-side-window)
          (side . right)
          (slot . 1)
          (post-command-select-window . t)
          (window-width . 80))))

Rethink about the prefix for my Emacs keymap

I wrote a blog post about binding <menu> as the prefix key to my own Emacs keymap and swapping CapsLock for Menu on GNU/Linux and its closest equivalent, <apps> on Windows. (I have deleted that blog post since I realised doing that was dumb, and I don't want to steer others down that path.) It worked as long as I used Emacs in its GUI on Windows 11 or Wayland. However, when I installed Guix on my laptop and was trying to figure out how to get Sway running on Guix, I naturally used Emacs in the TTY where it works just as well as in a graphical session except some limitations around showing pictures, using multiple faces and keybindings. TTYs and graphical terminals doesn't send through every key to Emacs and one of the many newer keys they don't send to Emacs is <menu>. So I was left with none of my own keybindings. It made me realise that using any special key not usable in a TTY for my own keymap is not very smart.

There is always M-x, so I could do everything I wanted to do, but without using my own keymap. The advantage of having a keymap that works everywhere is that it makes using commonly used functions a lot faster than using M-x. If the keymap isn't available everywhere, the advantage of having a keymap at all is severely limited and you have to think about in which situations it is usable and in which it isn't. Training oneself to remember the keychords through muscle memory also make little sense if it is only available some of the time.

I had a quick think about which possible prefix keys I could use that would work everywhere and in theory, every combo with ctrl or meta is usable except a few that has special meaning in a terminal like C-i and C-m. However, it is important not to remove a keychord I already use a lot for its original functionality to use it as the prefix for my own keymap instead, and I don't want a situation where a keychord both has its own functionality that I sometimes use and also is the prefix key for my keymap. That would be confusing and annoying to work with. I don't use C-z to iconify GUI Emacs or stop TTY Emacs, so I thought it was a keychord I could unbind and then use as my prefix.

Below is the code from my Emacs config for my keymap. It has just a few functions I use often that doesn't have a keybinding by default and a few of my own functions. Using it makes me faster than using M-x.

(global-unset-key (kbd "C-z"))
(define-prefix-command 'emo-map)
(global-set-key (kbd "C-z") 'emo-map)
(define-key emo-map (kbd "a") 'tempo-complete-tag)
(define-key emo-map (kbd "b") 'tempo-backward-mark)
(define-key emo-map (kbd "c") 'org-insert-structure-template)
(define-key emo-map (kbd "d") 'org-display-inline-images)
(define-key emo-map (kbd "e") 'elfeed)
(define-key emo-map (kbd "C-e") 'eshell)
(define-key emo-map (kbd "f") 'tempo-forward-mark)
(define-key emo-map (kbd "h") 'emo-hjemmeside)
(define-key emo-map (kbd "i") 'emo-ispell-toggle)
(define-key emo-map (kbd "l") 'org-toggle-link-display)
(define-key emo-map (kbd "m") 'mu4e)
(define-key emo-map (kbd "o") 'emo-dired-convert-to-org)
(define-key emo-map (kbd "C-s") '(lambda () (interactive) (emo-present 'toggle)))
(define-key emo-map (kbd "s") 'shell)
(define-key emo-map (kbd "t") '(lambda () (interactive) (ansi-term "bash")))
(define-key emo-map (kbd "y") 'emo-systemcrafters)

Podcasts that aren't

I recently added the RSS feed of a podcast I like from NRK to a podcatcher for Android. When I listened to that podcast, in the end of every episode, NRK warned me and said that no more episodes will come to the feed and if I want to listen to more episodes, I have to use either NRK's app or radio.nrk.no. A similar thing happened to BBC podcasts a year or two ago as well. And a few more years back, Spotify began to distribute what they called podcasts that you could only hear in their app.

The definition of a podcast is an audio or video file shared through an RSS feed. An audio or video file only available through an app or a specific website isn't a podcast. The point of podcasts is that they use an open standard, RSS, for distribution. This makes it possible to listen to them on any device with any player. I use the RSS reader Elfeed inside Emacs with a few extra functions when I listen to podcasts at home via my computers, and AntennaPod which is available in F-droid on my Android phone. In the past, I used Newsboat and before that gPodder on GNU/Linux.

The idea is that the user can use whatever app or program they like on whatever device they like and get podcasts from a number of different media outlets in the same place and automatically get the new episodes whenever they are out. RSS is a great standard that has worked well for many decades and continues to be the best way to get not only podcasts, but also other web content from a lot of websites which has a feed (ie every good website) in stead of manually opening a number of sites to check if there is something new. RSS makes podcasts and other web content much easier to digest.

The infuriating thing is that I paid through my taxes for content that is now inaccessable to me unless I go to a number of different places to check manually. I get why the venture capital funded tech companies enshittify their users' experience if they can get more tracking data about their users to sell to advertisers, force subscriptions on people or force people into using their other services by exposing them inside their proprietary audio and video file distribution apps (even though it is very short term and makes me never want to ever use any of those companies' products or services ever again).

I don't get why public service broadcasters need to enshittify their offerings, though. NRK isn't going to sell tracking data to advertisers, sell subscriptions or other services any time soon. So why is it so important to them that I use their app or website instead of getting my audio through an open standard that is more convenient to use? Are they trying to do the same as the companies that offer worse services at terrible terms to seem more trendy and with it? Isn't the point of public service broadcasting to be publicly available? And isn't RSS the best way to do so when you have an audio or video show to distribute over the web? NRK and BBC probably lost many listeners since they no longer make podcasts. I won't listen to non-podcasts since I can't get them in my podcatchers of choice.

Man pages are not the real manuals on GNU/Linux

Youtubers like Luke Smith and DistroTube have said for years that the man pages are the manuals for command line programs on GNU/Linux. That is not true. On the BSDs and other Unixes, it is true that your best manual is the man page, but on GNU/Linux distros, man pages are just short summaries of the manual to remind you how to use them while the real manual can be read with the GNU Info reader by writing info and the name of the program. All GNU programs and many others have info manuals that gets installed with the program by your package manager.

If you read the man pages for GNU programs, you will be underwhelmed if you want to read an actual manual, but if you read the info manual, you will find that most GNU programs are very well documented. I didn't know about info manuals before I started using GNU Emacs a couple of years ago, and I suspect many other newer GNU/Linux users don't know about the info manuals, so I thought it was a good idea to write about it. Maybe someone will discover the real manuals by reading this?

It is a good idea to start with "info info" to read the manual for the info reader to learn how to use it. On some distros, you have to install the info package before using it just like you have to install man-db to read man pages. If you use GNU Emacs, there is a better info reader with a nicer GUI built into Emacs which is used to read the Emacs manual, the Emacs Lisp reference, the Emacs Lisp introduction, manuals for all Emacs packages that supply one (which are most of them whether they are built-in or come in a package repository) and the info manual for every program on the GNU/Linux distro that supply one. There is a lot of good information in the manuals if know how to read them.

Convert any file pandoc can read to org

I got an idea from an EmacsElements video by Raoul Comninos where he converts docx and odt files he finds with dired to org format with two separate functions. Doc-view mode is nice for viewing files from MS365 and LibreOffice and other programs that use Open Document Format with the help of unoconv (which comes with LibreOffice), but you cannot edit the files. So he made these two functions to convert it to Org markup which Emacs edits well in Org mode. After editing, he can export a .docx or .odt through ox-pandoc to send back to the people that sent him the original file.

I have experienced the same need at work where most documents coming from others are .docx even if all my own documents are pure text files. I thought that I could convert any file format to org by using its extension as the from format for pandoc instead of having separate functions for different file formats. It seems to work. My function will either convert the file if pandoc can use it as input or give an error. I bound the function to C-z o to make it easy to convert and open a file from dired.

(defun emo-dired-convert-to-org ()
  "Converts files pandoc can convert to org files for easy editing. Use in dired."
  (interactive)
  (let ((endelse (file-name-extension (dired-get-file-for-visit)))
        (filnavn (dired-get-file-for-visit))
        (buffernavn (concat (file-name-nondirectory (dired-get-file-for-visit)) ".org")))
     (with-output-to-temp-buffer buffernavn
       (princ (shell-command-to-string (concat "pandoc -f " endelse " -t org --wrap=none \"" filnavn "\""))))
     (switch-to-buffer-other-window buffernavn)))

Emacs' built-in tempo mode for templates (snippets)

A reason to use LLMs that is often repeated is that they can write boilerplate which speeds up the programmer. Why not use templates or snippets instead? They use far less energy and do not contribute to climate change or nuclear waste unlike LLMs, they don't hallucinate, you don't have to give US$ 200 a month to Microsoft to get half-decent results, they don't ruin the internet with scraping, they don't ruin text based browsing, you know the output is correct since you wrote it yourself, you will never get sued for using your templates or snippets unlike LLM code whose legal status is questionable because of stolen, non-licensed and copyleft licensed training data, and you waste less time trying to "engineer" a prompt that will yield a usable result. There is some work up-front writing the templates or snippets, but you do that once and reap the benefit for as long as you use the same editor or IDE. I anticipate using GNU Emacs for the rest of my life since it has already been around for 40 years (or 52 if you count MIT Emacs) and is still developed for and by a vibrant free software community, unlike most IDEs and text editors which seldom survive more than a decade or two.

I have been thinking for a while that I would check out the snippet package Yasnippets which is recommended by a lot of Emacsers. I discovered tempo recently by stumbling upon Thomas Ingram's website. Tempo is a built-in template or snippets package in Emacs without any built-in documentation (unlike most Emacs packages). There is an info manual on David KÄgedal's homepage and some examples of its use and if you follow the link to Ingram's site, there is also some information there. The documentation is very readable when you find it. I tend to prefer built-in packages unless there is functionality only available in external ones that I want or need, and tempo looked like it had many interesting features, so I tried it.

There are two main ways of using tempo. Either you insert a template into a buffer and it can ask you interactively in the minibuffer for things to fill in into the template, like for instance names of function, type annotation or variables and the like. To use it this way, set tempo-interactive to t. The default way of using it will instead insert the template into a buffer and then use the command tempo-forward-mark to go to the next place in the template where you should fill in some value. There is also a tempo-backwards-mark to go back if you change your mind about something you already filled in.

There is also a third way where you mark a region, and use the universal argument before calling the function with the name of your template. You can use this whether tempo-interactive is t or nil. This includes the region in the part of the template with the r keyword and then either prompts you in the minibuffer for things to fill in or you do it with tempo-forward-mark and tempo-backward-mark depending on your setting of tempo-interactive. This may be useful if you want to wrap some code in a function definition, a class definition, a loop or an if-statement etc.

To me, the default "non-interactive" way of using it seems the fastest, so I set tempo-interactive to nil. Since I do not anticipate that I will switch to doing it that way in the future, I wrote my templates without prompts for the minibuffer. Whenever there is a p or an r, you can wrap them in parenthesis and add a string which will become the minibuffer prompt if you use tempo with tempo-interactive set to t, but this is optional and not needed if you, like me, use it the default way.

There are also different ways to insert a template into a buffer. Every template becomes a function you can run interactively with M-x with the name "tempo-template-" and the name you have given your template. The other way of invoking it is to write a tag and then run the function tempo-complete-tag which replaces the tag with the template. Thomas Ingram also writes that you can use abbrev mode to insert a template with the help of its function name, but since I have yet to learn abbrev mode, I thought using tags and binding the function to replace them with templates would be fastest for me. It also avoids having to configure tempo templates another place in the config, so even if/when I learn abbrev mode, I may continue to use it this way.

I have my own keymap using the menu key which I have rebound my CapsLock to on my GNU/Linux machines, and which I have as a separate key next to Alt gr on my Windows 11 work laptop. I could have bound Caps to Hyper on GNU/Linux, but then I would not be able to use that keymap on Windows without a lot of setup. I have set menu-n to tempo-forward-mark, menu-p to tempo-backward-mark and menu-a to tempo-complete-tag. To get a template inserted, I write the tag and hit menu-a. Then I hit menu-n to go to where the next p or r is in the template and fill it in.

This way of using tempo seems very efficient so far, as long as the tag names are short enough. I thought it was a good idea to start tags related to Python with py, Elisp with el, JavaScript with js, C with c etc to keep them short. The challenge is probably to remember the tags, but as with keybindings, the ones I use often will become second nature. Since every template becomes a function with a name starting with "tempo-template-", finding templates if you cannot remember their tags is easy through M-x and completions.

The first template I made was a template to create tempo templates with the name "definition" so the function name would be "tempo-template-definition" and with the tag tempo. This template makes it easier for me to create future templates. So far I have only made two for function definitions in Python and Elisp, but I will make more and more complex ones over time. I think tempo will increase my tempo when I have written enough templates to speed up writing boilerplate. And since I use Emacs for a lot more than programming, I may use tempo for boilerplate in other text as well.

In the code block below, you can see how I have configured tempo thus far. To not slow down Emacs start-up I don't ensure that it is loaded, but load it on demand when the function tempo-complete-tag is run (which I do with the keypress menu-a after writing a tag for a template).

(use-package tempo
  :ensure nil
  :commands tempo-complete-tag
  :config
  (setq tempo-interactive 'nil)
  (tempo-define-template "definition"
                         '("(tempo-define-template \"" p "\" '(\"" r "\") \"" p "\" \"" p "\")")
                         "tempo" "A tempo template to define tempo templates.")
  (tempo-define-template "python-def"
                         '("def " p " (" p ": " p ") -> " p ":\n"
                           "    \"\"\"\n    " p "\n    \"\"\"\n    " r)
                         "pydef" "Create a Python function definition.")
  (tempo-define-template "elisp-defun"
                       '("(defun " p " (" p ")" n> "\"" p "\"" n> r ")")
                       "eldefun" "Create an Elisp function definition.")
  )

LLMs ruin text based browsing

I am an Emacs user. I have recently started to do more of my browsing in Emacs' built-in EWW browser. It is a text-based browser that also shows images, but it does not run JavaScript. It's not for running webapps, but it is a great browser for web pages. It has a nice reader mode to focus in on the content of the page and get rid of clutter. It also integrates well with my RSS reader (elfeed) and makes it easy to open links I find in other documents within my text editor.

Large Languague Models ("AI") are making the lives of people hosting websites harder by scraping their content which add cost to the owners of the sites for data transfer or spinning up extra infrastructure to not go down with the extra load. The scrapers tend not to respect robots.txt files that tell them not to scrape the sites. The legality of this scraping under current copyright law is questionable. The LLMs' owners are especially interested in software source code since this is an area where companies and users are willing to pay serious money to use LLMs. Free software git forges like codeberg.org and sourcehut.org are scraped so hard that it almost constitutes DDOSing. One of the companies doing this is Microsoft, their market-leading, near monopoly competitor on git forges and owner of proprietary git forge GitHub, to improve their CoPilot LLM.

To combat LLM content scraping, many websites use a program called Anubis that runs some JavaScript in the browser of the user to check whether it is in fact a human with a browser and not an LLM scraper that has changed the user-agent string that identifies which browser is being used. This program demands that JavaScript is run before serving the content. This means that when I want to go to a site that uses Anubis with Eww, I get a message that I have to turn on Javascript, which I cannot do since I use a text based browser. So in effect, LLMs ruin text based browsing.

Emacs on Windows

Updated: January 14th, 2026

I use Emacs as my text editor. At work, I have a laptop with Windows 11. I use inter-present-mode for interactive presentations every day. Since I sometimes have pictures in my presentations and inter-present-mode changes face height, I need to use GUI Emacs. (Emacs is also available in the TTY and terminal emulators.) There are two ways to get GUI Emacs on Windows. The first is through WSL2 with the graphical features Microsoft calls WSLg.

Unfortunately, the Wayland stack is implemented in a non-standard way in WSLg that doesn't currently work properly. There are two bugs related to Wayland-native programs: the first bug makes Wayland native programs use XWayland instead of Wayland. The community found a fix for that bug in 2023 and told Microsoft about it in a GitHub Issues thread where a representative for Microsoft said they applied the fix to the codebase, but so far, Microsoft has not released that fix. You can fix it yourself if you like. However, there is another bug that makes Wayland windows unresponsive after locking the screen and unlocking it again. This is the show-stopper for WSLg for me. (There is also a similar bug for X windows where the windows disappear after screen locking, but if you open a new X window, you can alt-tab to the original window and use it.)

Since I need GUI Emacs and WSLg doesn't properly work, I have opted to use native Emacs on Windows. Unfortunately, all the free software tools that integrate with Emacs and that is just an easy install away on GNU/Linux (and its WSL2 lookalike) is hard to come by as native Windows programs. There are also some extra configuration needed in Emacs to get features that just work on POSIX to work on Windows. I gradually discovered how to get the necessary external packages and how to configure Emacs on Windows to get as similar an experience as possible to the one I have on GNU/Linux. I use the same literate configuration on both OSes to keep things as similar as possible.

People use Emacs in different ways, so you may find that you need something I don't, but I hope this blog post can give you a starting point. (It is also useful for me in case I need to set things up again.) Some other good starting points are Using Emacs on Windows 11: An Installation Guide by Dr. Peter Prevos and Properly Installing Emacs on Windows, Properly Setting up Emacsclient on Windows, Printing Directly from Emacs on Windows and Getting spelling to work in Emacs on Windows by Dr. Raoul Comninos on the EmacsElements website and YouTube channel. I have used their ideas in my setup, but tweaked things to my own liking.

Installation and basic use

I use the Windows installer from a nearby mirror of GNU.org as recommended on the Emacs website. Make sure to use runemacs.exe since it does not open an empty terminal before opening the Emacs GUI, unlike emacs.exe. It is a good idea to add runemacs.exe to your start menu and task bar to have it easily available. I have runemacs.exe as the leftmost icon in my task bar which means that I can launch it with Super-1.

You may also consider adding runemacs.exe as the default program to open .org, .md, .py, .js etc files. I find it easier to do so in File Explorer by right-cliking a file of that type and choosing Properties… and setting the application to open that file type instead of using the Settings app which doesn't work by file type, but by program which always seems a bit backwards to me. The way I use Emacs, I tend to have a frame open at all times and visit files from inside Emacs, but when I use File Explorer, I often want files to open in other programs, usually because I want to show my students the files in the programs they use (Thonny, VSCode, Word, Excel, MySQL Workbench…) even if I usually would use the files of the same file types inside Emacs, so I have only set a few file types to open with runemacs.exe. Since I don't use emacsclientw.exe on Windows, I don't want to double click files in File Explorer or open them through the start menu since that opens a new Emacs frame if runemacs.exe is set to open those file types. I like to almost always work in just one Emacs frame.

I have stopped using Emacsclient on Windows since it doesn't work the same way as on GNU/Linux. It does not respect my settings for faces (fonts) or scroll bars from my config. If I open Emacsclientw on Windows directly, it complains that I haven't opened it with a file. On GNU/Linux, if I open Emacsclient without a file, it opens up with the scratch buffer. Since I want to have an Emacs frame open at all times and more frequently open files from inside Emacs than from the File Explorer, I quite often want to open emacsclientw without a file. Another weird thing is that when I kill the buffer with the file I opened emacsclientw with, Emacsclient quits. It doesn't do that on GNU/Linux. Since I want to keep the frame for further work through the day, this behaviour makes emacsclientw more or less unusable for me. The third annoyance is that if I forget to use M-x kill-emacs before restarting or turning off the Windows machine, it uses forever to turn off. Together, these annoyances were just too much, so I went back to open an Emacs frame after booting the machine and continue to use it until I turn the machine off.

Installation of tools that interact with Emacs

Below is a table that shows useful programs I use on Windows to get the functionality I need or want from Emacs. More details can be found in the relevant sections below.

Package What it supplies Where to get it
chocolatey Package manager https://chocolatey.org/install Use Individual install.
Hack Free programming font https://github.com/source-foundry/Hack-windows-installer
Liberation Free variable pitch fonts Come with LibreOffice
imagemagick For showing pictures Install with Chocolatey
Pandoc Export org with ox-pandoc Install with Chocolatey
MikTex Export org via LaTex Install miktex.install with Chocolatey
Strawberry Perl MikTex needs Perl https://strawberryperl.com/
mupdf PDFs in doc-view-mode Install with Chocolatey
unoconv MS365 & ODF in doc-view-mode Come with LibreOffice
git Version control https://git-scm.com/downloads
hunspell Spell checking program https://sourceforge.net/projects/ezwinports/hunspell-1.3.2-3-w32.bin.zip/download
nb_NO.aff, nb_NO.dic BokmÄl hunspell dictionary Come with Libreoffice
Node.js and npm NPM to install LSP servers https://nodejs.org/en/download
Python Pip to install LSP servers NPM installs Chocolatey and Python as well, otherwise Chocolatey
LSP servers Completions, errors, linting pip and/or npm
LibreOffice See above https://www.libreoffice.org/download/download-libreoffice/

Setup of environment variables

Emacs looks for a .emacs.d directory or a .config/emacs/ directory or a .emacs file in $HOME. To set $HOME, press the Windows key, write environment and you should see the Edit Environment Variables program (Rediger systemmiljÞvariabler if you use Norwegian BokmÄl). Set the User variables for HOME to wherever you want it. I also found that it was useful for git to set LANG and LC_ALL since git and other programs compiled with MSYS2 respects the text encoding from those. I did this as part of my trial and error process to find ways around git's default conversion of text encoding and line endings, but I am not certain it is necessary after setting the system locale to UTF-8 and/or setting Git Bash's text encoding in the GUI (see the dealing with text-encoding section for more on this).

windowsenv.jpg

Dealing with text-encoding

Windows uses UTF-16 under the hood, but on the surface it uses different text encodings depending on your locale. (GNU/Linux, BSD and MacOS use UTF-8 unless you configure them to use something else.) Windows uses CR and LF to end lines while GNU/Linux, BSD and MacOS X use LF. (Mac OS < 10 used CR.) There are different strategies to deal with this:

  1. Use the locale's encoding on Windows and have git convert line endings on clone, pull and push.
  2. Use UTF-8 and Unix line endings for every buffer and file inside Emacs, but configure Emacs to work with yanking (pasting) and killing (cutting) to and from the clipboard in Windows locale's text encoding. Tell git to not convert files and line endings.
  3. Set Windows 11 to use UTF-8, set Emacs to use UTF-8 and Unix line endings and tell git to use UTF-8 and not convert line endings.

If you do 1, then you don't have to configure git, because that is its default behaviour on Windows. This supposes that you use your text editor(s) with Windows line endings, and possible also your locale's text encoding which makes writing a lot of glyphs, like emojis, Hangul, Hiragana etc, impossible. Even VSCode defaults to UTF-8, even on Windows. I think there is absolutely no advantages to this approach unless you never use any other platform than Windows.

If you do 2, then you have files with only UTF-8 and Unix line ending in your repos, but you have to configure Emacs to convert text when yanking and killing to/from the system clipboard. You also have to configure git not to convert CRLF to LF. (See the below section on how to do this.) Below is how you configure yanking and killing to work to and from iso-latin-1 which is the common text encoding for Windows in Northern Europe and North America. I tried this approach for a while, but would rather avoid another if-statement in my config if I could avoid it to keep things as similar as possible between Windows and GNU/Linux.

(if (eq system-type 'windows-nt)
   (set-clipboard-coding-system 'iso-latin-1)
  (set-clipboard-coding-system 'utf-8))

My strategy

I use the third strategy now. Windows 11 has a beta feature where you can choose to use UTF-8. You can set it up by following the step-by-step instruction from geekrewind.com. You still have to configure git not to convert CR LF to LF and vise versa on push and pull, but you don't have to configure Emacs to do anything when yanking and killing. To configure git to use UTF, I set the user environment variables LANG and LC_ALL since git and other programs compiled with MSYS2 respects the text encoding from those. In addition, I opened Git Bash, right-clicked the window title, selected Options…, selected Text, chose nb_NO and UTF-8 (you may want something else than nb_NO which is Norwegian BokmĂ„l) since I read somewhere that git uses the settings set in Git Bash. I am not certain if you need to do both, but I did and it works. In my .gitconfig in my $HOME, I made a section called [core] and on the next line wrote autocrlf = false. This means that git will not convert line endings on push and pull from Unix (LF) to Windows (CRLF). Since all my files use Unix line endings anyway, this is no longer necessary.

I still have configuration to always use UTF-8 and Unix line endings inside Emacs and save every file as UTF-8 with Unix line endings. This is useful for getting rid of other encodings in previously made files. (In case I want that other encoding, for example for files I want to use under emulation of older systems, I can omit saving and they would still be in their original encoding.) I hope Microsoft will make UTF-8 and Unix line endings standard in Windows 12. The only small problem I have seen since switching to UTF-8 is that a few Norwegian glyphs in HP's notification about driver updates don't display properly. Otherwise, I have had no problems. Below is the configuration I use to set Emacs to use UTF-8 and Unix line endings and write every file with UTF-8 and Unix line endings.

(prefer-coding-system 'utf-8-unix)
(set-default-coding-systems 'utf-8-unix)
(set-language-environment 'utf-8)
(setq-default coding-system-for-write 'utf-8-unix)
(setq-default buffer-file-coding-system 'utf-8-unix)

Spell checking

I used to use aspell with aspell-en and aspell-nb (or -no) depending on whether the distro ships both Nynorsk and BokmÄl in the same package or have separate packages (nb = Norwegian BokmÄl, nn = Norwegian Nynorsk, no = both Nynorsk and BokmÄl). I did not find aspell-no or nb on chocolatey or msys2 and I had the same problem with the hunspell package available for Windows which comes with British and American English which I sometimes use, but not Norwegian BokmÄl.

For a while, I turned off spelling on Windows, but I recently looked into it again and found that I could copy over the .dic and .aff files I get with LibreOffice since it uses hunspell as well. The LO installer installs Norwegian dictionaries with a "typical install" if you downloaded the installer by browsing to the download page with a Norwegian IP address. To use the dictionaries from LibreOffice, go to C:\Program Files\LibreOffice\share\extensions\dict-no\ and copy the files nb_NO.aff and nb_NO.dic. If you use another language, have a look in the extensions folders to find the folder with your relevant dictionaries. Go to the share\hunspell directory under where you installed hunspell. I use C:\Program Files\Hunspell\share\hunspell\ and paste the files there.

In addition I have taken the settings suggested by Getting spelling to work in Emacs on Windows and modified them slightly for my use. I now also use hunspell on GNU/Linux. I have also made a convenient function in my Emacs config to toggle between Norwegian BokmÄl and British English, and bound it in my keymap to C-z i.

(use-package flyspell
  :hook ((prog-mode . flyspell-prog-mode)
         (text-mode . flyspell-mode))
  :init
  (when (eq system-type 'windows-nt)
    (setq ispell-program-name "C:/Program Files/Hunspell/bin/hunspell.exe"))
  (setq ispell-dictionary "nb_NO")
  (setq ispell-dictionary-alist
    '(("nb_NO" ":alpha" "[^[:alpha:]]" "[']" nil ("-d" "nb_NO") nil utf-8)))
  (setq hunspell-default-dict "nb_NO"))

Dictionary lookup

On my GNU/Linux systems, I install a dictd server and some dictionaries so I don't need to be connected to the internet to use dictionary-lookup-definition. Since there is no dictd server package for Windows, I first tried to use dict.org to look up words. When I tried dictionary-lookup-definition, Emacs just froze. It did not use a lot of CPU, but it just did not respond do anything, including C-g. I had to kill it with the three-finger salute (Ctrl-Alt-Delete). Maybe the relevant ports are blocked by my network at work, so it might work for you even if it did not for me. Below, you see my configuration for dictionary mode. I check if I am on GNU/Linux and otherwise, don't load it since I cannot get it to work at work.

(use-package dictionary
   :if (eq system-type 'gnu/linux)
   :config
   (setq dictionary-server "localhost"))

Viewing MS365 and Open Document Format documents

Emacs can show .xlsx, .docx, .pptx, .odt, .odp and other MS365 (Formerly Microsoft Office) and LibreOffice (Open Document Format) files in doc-view-mode. It is very practical to go directly from dired to doc-view-mode in stead of waiting for LibreOffice or MS365 to start. To show these files it needs a python script called unoconv that comes with LibreOffice. You also need to set the path to that script to get it to work. Since newer versions of LibreOffice stalls when you open them on Windows 11, either if you launch Writer or use unoconv from Emacs, I had to install version 24.2.0.3 to get this to work properly. You find it with the Archive link on the LibreOffice download page.

Pandoc and LaTex for export and import from Org mode

I use pandoc with Emacs and also ox-pandoc to be able to export from Org mode to .docx format. Upper Secondary schools in Norway use MS365, so it is useful to be able to write .docx documents occasionally. I use LaTex a lot for export of PDFs from org files I have used with inter-present-mode in class. Both pandoc and LaTex can be installed with Chocolatey, but when using LaTex to export PDFs on Windows 11, I always got an error that wrapfig.sty was not installed. It probably doesn't come with the LaTex package from Chocolatey. The solution is to use MikTex instead. Install the package miktex.install with chocolatey. MikTex needs Perl to function, so you also need to install Strawberry Perl from its website to get the export functionality to work. As with any external programs, you also need to set the exec paths (see further down this blog post) to get the actual functionality, unlike on GNU/Linux where it just works.

PowerShell in Shell mode

I prefer to use Eshell for most of my Shell needs. Since it is built in Elisp, it works just as well on Windows as on GNU/Linux. It is a much more pleasant experience than PowerShell and it integrates well into the rest of Emacs. However, sometimes it is useful to have PowerShell in Shell mode for doing something in Windows that you can only do through PowerShell, like turn on or off Hyper-V or delete a WSL2 distro.

By default, you get cmd.exe in Shell mode on Windows. I had some trouble finding good documentation of how to set it up with PowerShell. Some people suggest just setting PowerShell to explicit-shell-file-name, but that only partially worked since it gave me an error that PowerShell was invoked with a wrong argument. A lot of people pointed to someone on the Microsoft blogs that set up PowerShell in Shell mode, but in a way that removed the prompt. He had made an Elisp workaround to get the prompt back, but it seemed like there should be an easier way. The trouble is that comint mode, the mode shell mode is built on, sends -i by default to the shells it interacts with as an argument. I tried a couple of things and it turns out the solution is really simple.

(use-package shell
  :config
  (add-hook 'shell-mode-hook 'ansi-color-for-comint-mode-on)
  (add-to-list 'comint-output-filter-functions 'ansi-color-process-output)
  (add-hook 'comint-output-filter-functions 'comint-osc-process-output)
  (add-hook 'shell-mode-hook (lambda() (company-mode 0)))
  (when (eq system-type 'windows-nt)
    (setq explicit-shell-file-name "C:/Windows/System32/WindowsPowerShell/v1.0/powershell.exe")
    (setq explicit-powershell.exe-args '("")))
  (when (eq system-type 'gnu/linux)
     (setq explicit-shell-file-name "/bin/bash")
     (setq system-uses-terminfo t)
     (setq comint-terminfo-terminal "xterm")))

In the code block above, if on Windows, I tell Emacs to run PowerShell and give it the arguments "" (ie, nothing) which remove the default -i argument, but adds nothing else. And now I have PowerShell in Shell mode. The rest of the configuration turns off company since the shells have their own tab-completion and turns on ansi-colours which both Bash and PowerShell can work with. If you prefer to use PowerShell 7 instead, use the path to it instead of the path to the built-in Windows PowerShell.

Language Server Protocol servers

LSP is a standard Microsoft made for adding IDE-like language support to text editors. It was made for VSCode, but can also be used in other editors. In Emacs, you have to have the LSP servers you want installed and eglot, company and eldoc, if turned on, makes use of them in the mode for the associated programming or markup language. I tend not to like documentation constantly popping up with eldoc-mode since I find it visually distracting, but use the completions and warnings from LSP servers through eglot and company. Below is a table of the LSP servers I use and how to install them on Windows.

Language LSP-server names install with Comment
Python python-lsp-server (pylsp) pip or npm i -g FOSS, flake8 is an optional dependency
Bash / Shell shellcheck, bash-language-server npm i -g FOSS
JavaScript, TS, JSX typescript-language-server, typescript npm i -g Microsoft, LSP depends on typescript
CSS vscode-css-languageserver-bin npm i -g Microsoft
HTML vscode-html-languageserver-bin npm i -g Microsoft
JSON vscode-json-languageserver npm i -g Microsoft

The Microsoft LSP servers give you the same completions, documentation and warnings as in VSCode. You may find more LSP servers at https://langserver.org/.

In addition, you have to turn eglot on in the relevant modes. I turn it on for all programming modes.

(use-package eglot
  :hook (prog-mode . eglot-ensure))  

Python Shell

Python mode in Emacs on GNU/Linux works out of the box with no setup if you have Python installed on your system. On Windows, you have to set python-shell-interpreter (even if the exec path includes the path to Python). In the code below, I also set the docstring-style to Django which I prefer over the default pep-257.

(setq python-fill-docstring-style 'django)
(when (eq system-type 'windows-nt)
  (setq python-shell-interpreter "c:/Python313/python.exe"))

Paths that need adding

For Emacs to integrate with external packages on Windows, the exec path needs to include the file path to those packages. Below is my extra configuration for adding exec-paths in Windows. You may have placed the programs you have installed manually, like Hunspell, in other places, so adjust accordingly. You may also do this with customize, but I want to have it as part of my config since sometimes I let the custom-vars file where I keep the changes from customize drift a little bit away from the upstream emacs_config repo on some machines.

(when (eq system-type 'windows-nt)
  (custom-set-variables
 '(exec-path
   '("C:/Program Files/MiKTeX" "C:/Program Files/ImageMagick-7.1.2-Q16-HDRI" "C:/Python313/"
     "C:/ProgramData/chocolatey/lib/findutils/tools/install/bin/" "C:/WINDOWS/system32"
     "C:/WINDOWS" "C:/WINDOWS/System32/Wbem" "C:/WINDOWS/System32/WindowsPowerShell/v1.0/"
     "C:/WINDOWS/System32/OpenSSH/" "C:/Program Files/dotnet/" "C:/Program Files/Git/cmd"
     "C:/Program Files/nodejs/" "C:/ProgramData/chocolatey/bin" "C:/ProgramData/chocolatey/lib/mpv/"
     "C:/ProgramData/chocolatey/lib/mupdf" "C:/Users/AFK01217/AppData/Local/Microsoft/WindowsApps"
     "C:/texlive/2025/bin/windows" "C:/Users/AFK01217/AppData/Local/Programs/Microsoft VS Code/bin"
     "C:/Users/AFK01217/AppData/Roaming/npm" "C:/Users/AFK01217/AppData/Local/Pandoc/" "."
     "C:/Program Files/Hunspell/bin" "c:/Strawberry/perl/bin/" "C:/Program Files/LibreOffice/program"))
 '(image-load-path
   '("c:/Program Files/Emacs/emacs-30.1/share/emacs/30.1/etc/images/" data-directory load-path "c:/python313/")))
)

Skype and Microsoft

Skype was brilliant. It was end to end encrypted when voice, video or text chatting with another Skype user and you could send SMS and call phones with cheap rates from it. Then Microsoft bought it and removed the encryption. Skype was still good for calling cheaply from one country to another. Back in 2009, I bought a Skype feature phone with a "3 VÀnner" subscription. At the time I lived in Malmö in Sweden, spent my days at the Danish Royal Academy of Music in Copenhagen, worked evenings and nights at Kone elevators outside Copenhagen and freelanced as a baroque cellist mainly in Jutland and Southern Sweden with the occasional gig in Norway. Skype and the Skype-phone was brilliant to call friends, colleagues and family anywhere with my own phone number from anywhere I was at cheap rates. Most of my fellow musicians also used Skype, so I also chatted in text, voice and video a lot. My parents started using Skype as well, so I could video chat with them from wherever I was as well.

Gradually, Microsoft did numerous overhauls of the user interface and every time, it got worse. The amount of bots and scams also skyrocketed under Microsoft's ownership. Microsoft also used the Skype name for their incompatible Link product which became Skype for business. Over time, the superior technology from Skype was incorporated into Skype for business and Teams. My use of Skype decreased with the Microsoftification of the once brilliant Nordic instant messenger, phone and video chat program.

A few weeks ago, I found out Microsoft is going to kill Skype and instead try to get consumers to use Teams even if Teams is for internal business communication and not very well suited for individual users. Skype will stop working on May 5th 2025. My personal Microsoft account only exists because of Skype, so I am now in the process of exporting all my data from Skype and afterwards, I will delete my Microsoft account. If you have a Skype/Microsoft account, it might be a good idea to export your data before it is to late, and if you don't need that account for anything else, you may as well delete it.

I have been curious about the free software decentralised platform Matrix for a while, so I think I will see if I can find a Matrix server that is open for new users or set one up myself. I have tried the Matrix app Element in the past, and it was rather good. There is also an Emacs package called ement.el that seemed good when David Wilson of SystemCrafters had a look at it a while back in one of his live streams. Maybe this is the push I need to start seriously looking into Matrix again.

Why I replace Bash scripts with Elisp functions

Lately, I have spent some time replacing my Bash scripts with Emacs Lisp functions inside my Emacs configuration. I like programming and I haven't really gotten deeper into Elisp, so one reason was just to learn more Elisp and have some fun. Another reason is that replacing the Bash Shell scripts with Elisp functions removes the need to clone down an extra repository when I install a new system to get things up and running. It simplifies my installscripts a little.

Another advantage of having useful functionality inside my Emacs config is that whatever window manager or maybe even operating system I use, I can still use my functions from inside Emacs. Bash Shell scripts only run on GNU/Linux and POSIX Shell scripts only run on POSIX systems. But Emacs functions can be run inside Emacs on every platform it is available for without any external configuration. I might have to change my settings for wallpaper-command and wallpaper-command-args if I use another window manger, desktop environment or operating system, but most things will just work no matter where I am. Having the functionality in Emacs makes it easier if I ever were to change window manager from Sway as well.

The scripts I was able to replace with Emacs functions this weekend was my radio stream script, my two tv scripts for watching the latest news or satire broadcast from NRK, and my two wallpaper setting scripts, one that goes to the next file in a folder and sets it as the wallpaper so I can cycle through (and also around again when I get to the end) and another one that picks a random wallpaper from within the same folder. During the weekdays I was able to make a script to update my homepage and copy a youtube RSS feed link from a yewtu.be URL in primary selection. It was a lot of fun to dive into Elisp even if it took a lot of time since I was constantly searching for functions I could use for my purposes, both within Emacs and online.

I can still launch my scripts with keyboard shortcuts from my Sway config with emacsclient -e '(functionname)'. I start an Emacs server when I launch Sway, so I can always rely on having Emacs running. For the scripts that need user interaction in an Emacs frame, I can add -r to either reuse an open frame or make a new one.

How I generate my blog from Org files

I have used org-static-blog to generate HTML from org files for a while, but I have changed how I get those files onto my website. Org files are markup files used in Emacs Org Mode. The syntax is more regular than Markdown, there is only one standard unlike Markdown and the facilities in Org Mode to write these files make it a really great format to work with for any Emacs user.

In the past, I would manually delete all files except robots.txt, style.css and my media folder from the folder I exported to with org-static-blog. The reason is that org-static-blog only creates html files from org files where the html file does not already exist and then updates index.html, archive.html and rss.xml to reflect the changes. However, I sometimes edit older blog posts or my about page or change the header or footer which applies to all html pages, so I want to generate all the files every time and to achieve this, I delete all the html files before generating the new ones with the function org-static-blog-publish from my posts folder full of org files. I would then either use scp or FileZilla to upload those to my web server.

What I do now is use Codeberg Pages to serve my website instead. I have forwarded https://mostad.eu/ to https://einar.codeberg.page/ so visitors to mostad.eu get to the URL where html files in my Codeberg repo called pages are served by Codeberg instead. I have also made a shell script (that I will replace with an Elisp function in the future) that removes the previously generated html files, generates the html files with Emacs, and once closed, adds, commits and pushes the files to the repository Codeberg Pages hosts my website from. This way, I can get out a new blog post a lot faster than I would in the past and most of the process is automated.

Insecure sudo settings in RaspberryPi OS

I have a RaspberryPi 5. Since Debian does not supply an image for use with the RPi5 and Ubuntu Server comes with a lot of software I do not want preinstalled, I use RaspberryPi OS Lite and run my own script to set it up with Sway and the other packages I like. It is very similar to Debian even if it adds an extra repo, some settings that are different and a few programs for changing settings, both directly related to the hardware and some that replicate standard tools like localectl, passwd, systemctl enable etc in a more convenient TUI.

For a while, I have wondered why I only needed to write my password once when using sudo and then never again. It means that if you are logged in as your user, you have all the privileges of root if you just once wrote your password. It is convenient, but it is like logging in with the root user which is not a very good idea.

I had a look at visudo, the command to change the settings for sudo and everything looked quite normal. Except that in the end, the file sources any file in the directory /etc/sudoers.d/. So naturally, I had a look in that directory. There are some files there that cause problems. The first one is 010_pi-nopasswd which sets up sudo to never time out the sudo password typed by the first user created on the system.

Another is that sudo isn't per shell, terminal or tty, but global. This is in the file /etc/sudoers.d/010_global_tty. Usually, you would have to type your password to get sudo privileges in each terminal, shell or tty, but on RaspberryPi OS, sudo accepts the password I typed once in tty1 in every shell, terminal or tty.

Finally, there is a file called 010_proxy which accepts sudo from any proxy logged in as the first user, ie since I typed a password once in tty1, any proxy logged in as me doesn't have to type a password ever again to escalate privileges with sudo. Not the best setting either.

To mitigate the problem, you should make sure you are added to the sudo group by typing sudo usermod -aG sudo username in a terminal and press return, but replace username with your actual username. This is because we are going to delete the file that lets your users type your sudo password only once, but still want your user to be able to use sudo. The sudoers file on RaspberryPi OS is set up so users in the sudo group can use sudo.

Then you should write sudo rm /etc/sudoers.d/010_pi-nopasswd and return to delete the file that gives your user the ability to only type your password once. Continue with sudo rm /etc/sudoers.d/010_global-tty and return to remove the settings that doesn't ask for a new password in every tty, terminal or shell. Go on with sudo rm /etc/sudoers.d/010_proxy and return to avoid proxies not having to write a password. Finally, write sudo visudo and look for a line that says Defaults env_reset. Move your cursor to the end of that line with the cursor keys and hit return to get a new line. Write Defaults timestamp_timeout=5 to get a five minute timeout for sudo. Then press ctrl-o, return when it asks for a filename to save to and then ctrl-x to quit Nano. (RaspberryPi OS does not respect your settings for $EDITOR and will use Nano.)

My installscript for Debian checks if I am on RaspberryPi OS and does the things I have listed above, except add the timeout in the sudoers file. It is supposed to be edited only with visudo, so I tell the user to do this manually in the end of my script. (It also checks if the user is on Debian or RaspberryPi OS and installs Firefox on RaspberryPi OS and Firefox-ESR (Extended Support Releas) on Debian. (I tried installing Firefox from Debian Unstable first, but there were dpendency problems with that approach.) Emacs is installed from Backports to get then newest one backported to work with Debian Stable, whether you are on RaspberryPi OS or Debian. In the past, I used the Emacs snap, but Emacs from backports is faster and I trust the Debian maintainers more than the proprietary Snap Store. Since Debian has a stricter interpretation of what Free Software is than the FSF, I also have to install the non-free repos to install Emacs documentation.)

DOSbox and SDL error on Wayland

I tried installing DOSbox tonight to run some old games from the 90s. On first run, I got Exit to error: Can't init SDL No available video device as output in my shell (Shell mode in Emacs). I looked up the SDL packages I had installed and seemed to have everything needed. After an extensive search that did not really give me any solution, I tried something someone in a forum had tried, but in a slightly different way than they did and it worked.

I echoed out $SDL_VIDEODRIVER and got wayland as my answer since I run the tiling window manager Sway. I checked to make certain I had xwayland installed and then tried launching DOSbox again with SDL_VIDEODRIVER=X11 dosbox in a terminal and it worked. It will probably work for other programs that use SDL that won't launch on Wayland as well.

My search for solutions found a lot of users of different programs that used SDL that had trouble with getting their programs to run and with no credible solution given in any of the forums I visited. I hope this blog post will help people in that situation. Since most of the major desktop environments use Wayland by default now and some of us tiling WM users also use it, these kinds of problems should hopefully be eliminated by developers of most FOSS projects in the not too distant future. X11 has not been under active development since 2012 except for security updates, and Wayland is no longer the future, but has been the present for a long time.

Interactive presentations

I often present new material for my students in class. I teach programming and information technology at a vocational school, so I often need to run code as examples of what I am presenting. When a student has a question about how the code works, I can show the answer by tweaking the code and rerun it. I might ask my students something and write down their answers in my presentation as well or I might hand out individual tasks, collect the answers and use the presentation to share the results with everyone on the screen. (We have large 4k touch screens that also have whiteboard functionality in every classroom.)

Emacs Org mode is a tool for outlining ideas (and a lot of other stuff like calendaring, todos and project planning) in a pure text markup format with support for inline images and code blocks in almost any programming language. You can run the code blocks when you want or tangle them out to a separate code file a la literate programming. Emacs is extendable and hackable enough that it can be made to work as presentation software. Ric Lister has made an Emacs package called org-present which I use. I make my presentation in org mode as an org file (org markup is similar to markdown), and add the images and code blocks directly within the text with the markup. When I am in class, I run the function org-present to start a presentation.

Each top level heading in my org document becomes a slide. I can write directly into the slides while I present them since they are just text files in org markup displayed with larger font sizes and nicer headlines etc, which makes it possible to do things like ask my students something and write down their answers. I can also run code blocks by hitting Ctrl-C Ctrl-C with the pointer above the code block and the results pop up underneath in a separate results block within the text of my presentation. Another advantage is that if I alt-tab into another program like Firefox or Thonny, my presentation within Emacs does not switch out of presentation mode like most presentation software like PowerPoint tends to do. I can come back to my presentation after showing a Youtube video with Firefox and continue where I left off.

After class, I export the presentation including code blocks, images and results of running the code to a PDF and put it on our learning platform to make it easy for students not present to see what was happening or for later review before a test or an exam. I have set up org-present to work the way I like with a bit of code in my Emacs config. I turn on display of inline images and set a standard width that usually works (that I can easily change with some metadata above an image if needed) and use org-present-big to make everything large. I then hook my configuration into the start of org-present and also have a function that resets my configuration that I hook in when org-present is quit. I highly recommend org-present if you want interactivity within your presentations, especially if you already use Emacs and Org mode. It lets me hold interactive presentations presentation software like PowerPoint, Prezi or Keynote cannot.

Setting the background wallpaper for Sway and managing music with Emacs

I just watched an old video by Luke Smith which gave me the idea that it would be cool to change background in Sway from Emacs. I thought I would use dired and either open an image to see how it looks directly or use image-dired to get a preview of all the images in a folder. I would probably have to make a shell script to do the work and launch it with async-shell-command from an elisp function. It turns out I don't have to do anything. The functionality is already built into Emacs and it even gets which window manager or desktop environment is in use and selects the correct command to change the background for that WM or DE. The documentation tells me this functionality came with Emacs 29.1, at the same time a lot of other improvements were made to image-dired and opening images in general. I used image-dired in 28.2 and the improvements with 29.1 were many and greatly appreciated!

Moon_blue.jpg

A few months ago I did the same type of discovery. I was looking for a way to interact with mpd, the music player daemon, possibly through the command line tool mpc from within Emacs. EMMS and Bongo are often mentioned by people in the Emacs community and I have tried both, but they are both unable to list albums with many artists and/or many recording years as one album. All other mpd players I have tried, both TUI and GUI-based have the same problem, so this is not a unique shortcoming in these packages. Until recently, I have relied on a shell script I wrote that lists all the albums in the mpd database with fzf and lets me select the one I want to play. However, sometimes I don't want to play a whole album, but I still want my music sorted by album since I have been carefully tagging my files so I can easily find music by album.

(I kind of had to make a system for album names since having 11 albums named "Bach cello suites" doesn't really help me find the one I like to listen to when I have six different recordings, they usually span two albums and two recordings are by the same artist at different times. Hence, I have made a system that is fine grained enough for me to find the right album without being too detailed to avoid too long album names. For instance, I don't include first name initials of the composer in the album name when I only have one composer with that last name in my database (even if more exist), and I don't list artist in the album name when I have only one recording of a work. Every time I ripped an album, I manually changed the tags to match my system even if MusicBraniz through Rhythmbox and earlier, iTunes, often gave me terrible album names for classical albums when I ripped them, otherwise I would not be able to find anything.)

A few months ago, I discovered a built-in mpc mode in Emacs that gave me exactly what I wanted. I could continue to use mpd and mpc to manage my music playback and use mpc mode which looks very much like Rhythmbox, but has the advantage of having all of Emacs' superior keyboard centricity and text handling. I can easily search with C-s for an album name, add it to the playlist and start playing it and then q to quit out of that mode with the music still playing and I am back at whatever I was doing in Emacs before, all without having to lift my hands from the keyboard. It is really convenient. In mpc mode, the albums are correctly listed even when there are many artist and/or years on the same album. Since I can sort my music by album, I can easily also find a single track if I am so inclined.

These kinds of discoveries make me love Emacs and the Emacs community. Emacs is hackable enough that if you want some functionality, you can get it. And since the project wasn't started yesterday, someone has often already thought of my use-cases and spent some of their spare time to code up that functionality and often also even gone to the trouble to include it in the editor itself. Thank you!

Rapid Photo Downloader Error on Wayland on Arch

If you try to run rapid-photo-downloader on Arch on Wayland, you get this error message:

qt.qpa.plugin: Could not find the Qt platform plugin "wayland-egl" in "" This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Fatal Python error: Aborted

Current thread 0x00007fa0cd669740 (most recent call first): File "/usr/lib/python3.11/site-packages/raphodo/ui/viewutils.py", line 975 in any_screen_scaled_qt File "/usr/lib/python3.11/site-packages/raphodo/ui/viewutils.py", line 991 in any_screen_scaled File "/usr/lib/python3.11/site-packages/raphodo/rapid.py", line 7489 in main File "/usr/bin/rapid-photo-downloader", line 33 in <module>

Extension modules: PyQt5.QtCore, gi._gi, zmq.backend.cython.context, zmq.backend.cython.message, zmq.backend.cython.socket, zmq.backend.cython._device, zmq.backend.cython._poll, zmq.backend.cython._proxy_steerable, zmq.backend.cython._version, zmq.backend.cython.error, zmq.backend.cython.utils, psutil._psutil_linux, psutil._psutil_posix, gphoto2._widget, gphoto2._version, gphoto2._result, gphoto2._port_log, gphoto2._port_info_list, gphoto2._list, gphoto2._filesys, gphoto2._file, gphoto2._context, gphoto2._camera, gphoto2._abilities_list, PyQt5.QtGui, PyQt5.QtWidgets, PyQt5.QtNetwork, tornado.speedups, PyQt5.QtXml, PyQt5.QtX11Extras, PyQt5.QtWebChannel, PyQt5.QtTest, PyQt5.QtSvg, PyQt5.QtSql, PyQt5.QtQml, PyQt5.QtQuick, PyQt5.QtQuickWidgets, PyQt5.QtPrintSupport, PyQt5.QtPositioning, PyQt5.QtLocation, PyQt5.QtOpenGL, PyQt5.QtDBus (total: 42) Avbrutt (SIGABRT) (kjerne lagret i fil)

Reinstalling the program does nothing. It turns out that there is a missing dependency. I have spent a lot of time trying to figure this out, but finding the information is hard, so I thought I would help my future self and maybe some others by supplying the fix I have found. It is not, as many suggest online, enough to install Python-PyQt5. It is already a dependency and installed. You need to install qt5-wayland to get it to work. On some distros, you also need to install egl-wayland, while on others, it comes as a dependency of qt5-wayland.

This is not just a problem with rapid-photo-downloader. There is a lot of discussion online about this error message with other Qt5 and Qt6 packages from different distros like Debian, Ubuntu and Arch. qt5-wayland is a dependency only if you run Wayland, so maybe that is why it does not come with the package as a dependency even if I think it should. Now that the larger desktop environments are all Wayland by default, I would guess X11 users are the minority of GNU/Linux users. Therefore, Wayland dependencies should come with all packages that need them. Legacy X11 users would probably not worry too much if a small extra package they do not need is installed. If they really worried about bloat, they would not have used X11 in the first place since it is a baroque collection of legacy cruft.

Update August 6th, 2023: I have experienced the same issue with Kdenlive on GNU Guix as well. It turns out that both Qt5-wayland (qtwayland@5.15.8 on Guix) and egl-wayland are missing dependencies for Kdenlive for Wayland users.

Maximize screen real estate

Real estate is expensive. Bad room layout can make a large flat seem small. A space with too much furniture can seem small even if it is large and a place with just a few select pieces of furniture can seem large even if it is small. All of this also applies to screen real estate. Especially with smaller laptops with lower resolution displays, it is nice to get as much space as possible for the actual content and waste as little as possible on distracting UI elements that makes the screen seems smaller than it is. By having more space for the actual content, you also minimize scrolling.

I achieve max pixel efficiency by using the tiling Window Manager Sway. Since it is a tiler, it automatically places windows in a tiled layout. Compared to working in a floating WM or Desktop Environment, I save a lot of mousing around to move my windows. I have a nice wallpaper, but no icons that clutter up my desktop. I have set up Sway to have 2 pixels of border around each window and no title bar on top to get as much space as possible for the programs I work in. The two pixels are needed to see where one window ends and another starts and also to distinguish between the active window with a red border and the inactive window(s) with a blue border. One pixel was hard to see, so I went for the somewhat wasteful setting of two pixels in stead.

I have also set smart_borders on which means that if I have only one window on a virtual desktop, it is without any border at all. This saves four pixels in both directions and looks nicer. I use a small 12 inch Thinkpad X230 with an internal 1366 x 768 pixel display as my main machine and usually just one program per virtual desktop, so the smart_borders make a difference. On my external 2560 x 1440 pixel 25 inch wall mounted screen behind my standing desk, I am more inclined to have two programs side by side if I am actively working on something in one window and just need to look something up or do a related task in another window. Humans are generally worse at multitasking than we think, so I like to separate different tasks on different virtual desktops even on large screens to not get distracted.

I do not use a panel on the top or bottom of my screen since this wastes pixels in the directions most screens have the fewest (height). I have set up the built-in Swaybar to autohide. I use scripts launched with keyboard shortcuts for the few things I need that most people keep in their bar or panel, like getting battery status in a notification or turning wifi or bluetooth on or off. A benefit of using scripts launched by the keyboard in stead of a bar with lots of information or system tray applets is that I save mousing around in submenus of my system tray or clicking on my panel to get things done. Since Sway implements the system tray of Swaybar in an xdg standards compliant way, but most programs still use a legacy Gnome implementation, most tray applets do not work anyway and this is what forced me to think closer at what functionality from the system tray I actually needed in the first place.

Over time, I have gradually switched out some of the larger GUI programs I used with smaller, simpler, more customizable and easily scriptable tools. Some of them are terminal programs, some are Emacs packages and some are small GUI programs. Many of the small GUI programs also have a minimal GUI that only present a few very useful elements and is otherwise controlled through keyboard shortcuts, like zathura or mpv. By having very few user interface elements, these programs give more room to the actual content you read or watch. The same applies to the TUI programs and Emacs packages I use.

Since switching from vim to Emacs, I have integrated some of the tasks I used to do in separate programs into it. Emacs is very efficient since it is so keyboard and text centric and by having fewer programs, I save the cycles my brain would use for context switching with different keyboard shortcuts for different programs. Emacs also has the ability to run both in a GUI which is what I normally use (since it adds support for different fonts in different contexts, pictures and PDFs), but can also be used in a terminal emulator or the tty with most of the same functionality. An example of how I gradually have integrated my workflows into Emacs is that I recently stopped using PCManFM as my file manager and instead now use Emacs' dired and the GNU coreutils in a terminal (inside or outside Emacs).

To save space in Emacs, I turn the menubar, toolbar and scrollbar off which saves some pixels on the top and right side of every window. I instead use F10 for the occasional dive into the menu and keyboard shortcuts like C-v and M-v to scroll down or up and M-< and M-> to go the the start or end of a document. I also turn on showing column and line numbers in the modeline and do not turn on line numbers on the start of every line since I can easily find the right line with the modeline if I am debugging something with an error on a specific line. It looks a bit cleaner and saves some space on the left of the screen. Usually, this does not matter much since screens are generally wider than they are tall, but when having three windows with code side by side on a small laptop screen, it can be the difference between having to scroll horizontally or not.

All in all, by saving some pixels here and there, I get more space for the content I work with, watch or read while also reaping the efficiency benefits of a more text and keyboard-centric workflow that came as a consequence of having fewer visual clues on screen and using the mouse less. A lot of functionality is not obvious at first sight, but since I have set this up myself and know my keybindings and the available functionality, it works well for me. Sometimes less really is more.

Offline dictionary lookups within Emacs

There is a dictionary-mode in Emacs. It used to be a separate package, but now comes as part of Emacs. The usual way to use it is to (setq dictionary-server "dict.org") in init.el (or equivalents) to tell Emacs to look up dictionary definitions from the internet when used. There are a lot of dictionaries in dict.org. The availability of the full text of the Webster 1913 dictionary within it has been much lauded in the Emacsphere by wordsmiths eager to vary their outpourings' formulations. However, I am not always online. I like to keep as much functionality as possible available to me offline to not become over-reliant on the internet or loose functionality when the internet is unavailable.

The solution is simply to install the dictd server and the dictionary packages you want on your computer. In Debian, these are available as dictd and a number of packages that supply dictd-dictionary for it. In Arch, dictd is an ordinary package in the community repo, but the dictionaries has to be added through the AUR. The dictd server and related dictionary files are however not available yet for GNU Guix. The Arch Wiki has an excellent page on dictd if you want more information on its usage. Once installed, you can just change the aforementioned dictionary-server variable from "dict.org" to "localhost" and Emacs will find your installed dictionaries. Depending on the distro, you may also have to systemctl enable dictd.service and systemctl start dictd.service to make certain dictd runs at every startup as well as immediately.

The selection of freely available Norwegian BokmĂ„l dictionaries is rather slim. I only found an English - Norwegian dictionary that seemed slightly useful to me. I wish there was as Norwegian BokmĂ„l - English dictionary as well since that would sometimes be useful for me even if I have a decent English vocabulary. There are some dictionaries from other European languages to Norwegian BokmĂ„l, but I seldom use other languages than English these days. (I used to play opera, cantatas and masses and then those would have been useful to me.) There is also a Norwegian Nynorsk - Norwegian BokmĂ„l dictionary by freedict. It could occasionally be useful when I read very old Nynorsk (Landsmaal). I wish there were a comprehensive Norwegian BokmĂ„l dictionary with word definitions, synonyms, IPA pronunciation, example of usage and expressions. I would use it especially for synonyms and spelling. Since I have lived and worked some years in Denmark and Sweden, my BokmĂ„l spelling isn't as good as it used to be, and ten years of using English as my working language after I returned to Norway did not really improve it either. I naturally blame the morons in the government of Denmark-Norway that decided to support Napoleon for all my current spelling troubles. Or maybe the Swedes that broke up the Kalmar Union should ultimately be to blame? Ok, maybe I need to take some responsibility myself as well…

American English is well covered by the GNU version of the Collaborative International Dictionary of English (dict-gcide) that includes the full text of the 1913 Webster's Unabridged Dictionary, the 1906 Century Dictionary and some other additions. I also installed WordNet (dict-wn) for synonyms. There are also some good computer term dictionaries like the Jargon File (dict-jargon), Virtual Entity of Relevant Acronyms (dict-vera) and the Free On Line Dictionary of Computing (dict-foldoc) available. I miss a dictionary with both British and American spelling and also IPA pronunciation since I try to stick with British spelling and RP. It is a pity that Oxford University Press do not release the Oxford English Dictionary or my favourite, the Oxford Advanced Learner's Dictionary, under a free culture license so it could be included as well. I have the Advanced Learner's Dictionary as a paperback in my bookshelf, and there is a website with it available gratis, but leaving Emacs breaks my flow when writing, the internet is not always available and my paperback is only available in my home. In my opinion, a university should use free culture and software licenses for everything they produce since when public money is used, it is only fair that the tax-payers get access to the works they funded. Also, the freedom to use, study, modify and share information should be the core values of any school or university.

I use both M-x dictionary-search and M-x dictionary-lookup-definition. The former lets you write in a search term while the latter looks up the word at point. The latter is obviously very useful while reading while the former may be more useful when writing, except if you want to find a synonym while revising your text where the latter becomes useful again. There is no need to change dictionary language for dictionary-mode unless you have installed too many dictionaries or dictionaries of languages with a lot of collision of vocabulary and spelling. Norwegian and English share a lot of vocabulary, but seldom collide in spelling, so I see no need to exclude any of the relevant dictionaries in either language. If you are overwhelmed with hits, it is possible to change dictionary inside the dictionary-mode buffer to limit the number of entries you get.

Combined with recently setting up flyspell-prog-mode for prog-mode and flyspell-mode for text-mode and (setq ispell-dictionary "british") in my init.el, I now feel more confident than before when writing text in Emacs, whether in code or not. (Dictionaries for lookup with dictionary mode and dictionaries for spell checking are separate and aspell or hunspell has to be installed with relevant dictionaries on your distro for ispell-dictionary to be set to the language you want for spell checking.) It's nice with spell checking for variable names and comments. Maybe I should add a toggle function with a keybinding for ispell-local-dictionary between "british" and "nb" to avoid having to use ispell-change-dictionary.

I Love Free Software Day

I want to thank all the developers, contributors, translators, designers and project leaders who have given me so much great software on I Love Free Software Day! I also want to thank a harpsichordist from Bergen who many years ago showed me that GNU/Linux was a good alternative to Windows or MacOS. Even though I did not do anything about it at the time, some years later, curiosity led me to try out various GNU/Linux distros in VirtualBox on my Mac and that was the start of a gradual transition from Mac OS to GNU/Linux. I already used some free software like LibreOffice, Firefox and Thunderbird on my Mac and that helped ease the transition.

Free Software is about freedom. In practical terms for a normal user, it is very obvious how the users' interests is important for free software projects while non-free software often is more about forcing the users into usage patterns that strengthen the corporate interests of their creators even if it makes for a worse user experience. An example is how Microsoft tries to force people to use Bing, Edge and MSN by not respecting the user's browser and search engine settings when doing a web search from the start button in Windows 11. It makes advertising money for Microsoft, but it is very user-hostile, especially since the users already paid for Windows as part of the cost of their machine. This is just one small example, but there are many more.

I also like how I can help improve free software by contributing to projects I like. I have contributed money, bug reports, translations, feature requests and a bit of very simple code, and hope to do more of this in the future. It is also possible to influence the direction of a free software project by contributing to it. This puts the most active users in the driving seat. In a worst case scenario where a project goes in a direction people dislike, it is possible to create a fork since free software licenses give the freedom to modify a program and distribute your changes. A famous example is how OpenOffice was forked to create LibreOffice which is now the default Offie suite on most GNU/Linux distributions. (OpenOffice is no longer actively maintained.)

I also like how Free Software empowers me as a user to customize it to my liking and learn how to programme in the process. With Free Software, my computer is personal again. Not only can I choose between a lot of desktop environments or window managers to match my preferred workflow, I can also customize these further to my liking. While I prefer a tiling window manager with a keyboard-centric workflow without any panel or bar for maximum screen real estate for my programmes and a minimum of mouse clicks and movement to get things done, other people prefer a full desktop environment either of the more traditional type or a reimagination with new user interfaces like Gnome. GNU/Linux is modular enough to give us those choices by design.

GNU Emacs is another piece of software that is very customizable and when you customize it, you also learn how the code of the program itself works since you customize it in the same language as it is made with by adding your own functions and modifying built-in variables. The documentation of the program is very helpful for learning how to do this. It was the first programme made by the GNU project and a prime example of the freedoms of free software put into practice.

All in all, free software has empowered me as a technology user and put me in control of my own use of technology. It has also freed me from giving up my privacy, which is usually the cost of "free" non-free software.

Happy I Love Free Software Day!

Elfeed with useful scripts

Elfeed is an RSS feed reader package for GNU Emacs. RSS is a standard for getting content like podcasts, video channels from LBRY and Youtube, Mastodon and Twitter, blog entries, news articles etc from the web without using a browser. Before I started using elfeed, I used Newsboat, a terminal program, as my RSS reader. I was inspired by Napoleon Wils0n to add scripts to Newsboat so I could launch videos from RSS feeds directly in mpv or download them with youtube-dl (and later yt-dlp). After I started using Emacs, I wanted to try to integrate most of my computing into it and I looked at the two built in feed readers before trying the highly recommended elfeed package. I liked it, so the next step was to find a way to get the same functionality I had in Newsboat in elfeed.

I don't know Elisp well enough to script this myself yet, so I looked online. I read up on the documentation for elfeed on GitHub and also found some inspiration on Reddit that I tweaked to make some elisp scripts to be able to hit m if I want to watch a video in mpv and M if I want to download it with yt-dlp to my "Nedlastinger" (Downloads in Norwegian) folder. I tried a couple of different solutions before I was able to get what I wanted. The suggestion from Reddit was to use start-process to launch an external process with the url from the entry as its argument. That worked well with mpv. For yt-dlp that was less successful and I also wanted to change directory to ~/Nedlastinger before launching the yt-dlp process so I read up on how to run shell-commands asyncronously and used that functionality instead. I also made certain that any shell command run asyncronously doesn't display a new window. (A "window" is a split within an Emacs "frame" (an X11 window) in Emacs parlance. Emacs is from before the Macintosh introduced the desktop metaphor's now common vocabulary (that Microsoft later copied in Windows), so it uses its own vocab for these concepts.) The reason why there are two scripts for each functionality is that I can use those keyboard shortucts both inside the view where you show the specific entry and in the view where you see all entries while one is selected.

;; Dette gjør at Async Shell Command ikke vises hver gang man kjører en shell kommando med & fra inne i Emacs 
(add-to-list 'display-buffer-alist
  (cons "\\*Async Shell Command\\*.*" (cons #'display-buffer-no-window nil)))

;; Gir meg muligheten til å bruke m i elfeed for å åpne en rss entry i mpv
(defun browse-url-mpv (url &optional single)
  (start-process "mpv" "*mpv*" "mpv" url))

(defun elfeed-show-mpv-open (&optional use-generic-p)
  "open with mpv"
  (interactive "P")
  (let ((browse-url-browser-function #'browse-url-mpv))
    (elfeed-show-visit use-generic-p)))

(defun elfeed-search-mpv-open (&optional use-generic-p)
  "open with mpv"
  (interactive "P")
  (let ((browse-url-browser-function #'browse-url-mpv))
    (elfeed-search-browse-url use-generic-p)))

(define-key elfeed-show-mode-map (kbd "m") 'elfeed-show-mpv-open)
(define-key elfeed-search-mode-map (kbd "m") 'elfeed-search-mpv-open)

;; Gir meg muligheten til å bruke M i elfeed for å åpne en rss entry i yt-dlp
(defun browse-url-ytdlp (url &optional single)
  (shell-command (concat "cd ~/Nedlastinger &&" "yt-dlp -f 'bestvideo[height<=720]+bestaudio/best' " url " &")))

(defun elfeed-show-ytdlp-open (&optional use-generic-p)
  "open with ytdlp"
  (interactive "P")
  (let ((browse-url-browser-function #'browse-url-ytdlp))
    (elfeed-show-visit use-generic-p)))

(defun elfeed-search-ytdlp-open (&optional use-generic-p)
  "open with ytdlp"
  (interactive "P")
  (let ((browse-url-browser-function #'browse-url-ytdlp))
    (elfeed-search-browse-url use-generic-p)))

(define-key elfeed-show-mode-map (kbd "M") 'elfeed-show-ytdlp-open)
(define-key elfeed-search-mode-map (kbd "M") 'elfeed-search-ytdlp-open)

Those scripts worked fine for video channels from LBRY and Youtube, but not for podcasts which use an enclosure url to give the url to the actual episode's video or audio while the general url field in the RSS entry is used for show notes. I tried searching for variables within elfeed with the built in self-documenting features of Emacs, but did not fully understand how to find the enclosure url. After some searching aorund the internet, I found a way to get the enclosure-url and recycled most of my previous code again with the new url to make two functions making it possible for me to listen/watch a podcast with mpv by hitting P and downloading it with yt-dlp with K. I only implemented this for one of the two views.

;; Gir meg muligheten til å bruke P i elfeed for å åpne en podcast (enclosure) i mpv
(defun elfeed-show-play-enclosure (enclosure-index)
  (interactive (list (elfeed--enclosure-maybe-prompt-index elfeed-show-entry)))
  (let ((url (car
              (elt
               (elfeed-entry-enclosures elfeed-show-entry)
               (- enclosure-index 1)))))
    (start-process "mpv" "*mpv*" "mpv" url)))

(define-key elfeed-show-mode-map (kbd "P") 'elfeed-show-play-enclosure)

;; Gir meg muligheten til å bruke K i elfeed for å laste ned en podcast (enclosure) med yt-dlp
(defun elfeed-show-dl-enclosure (enclosure-index)
  (interactive (list (elfeed--enclosure-maybe-prompt-index elfeed-show-entry)))
  (let ((url (car
              (elt
               (elfeed-entry-enclosures elfeed-show-entry)
               (- enclosure-index 1)))))
    (shell-command (concat "cd ~/Nedlastinger &&" "yt-dlp -f 'bestvideo[height<=720]+bestaudio/best' " url " &"))))

(define-key elfeed-show-mode-map (kbd "K") 'elfeed-show-dl-enclosure)

I have set my default browser with my environment variables to Firefox and even though I like Emacs' built in browser eww a lot for text-based content with the occasional picture, I want to keep Firefox as my default browser for now. However, when I read an RSS entry in elfeed and it does not supply the full blog post, it is nice to stay within Emacs and read the linked blog post with eww instead of launching a heavy external browser. So I had to make two functions for the two view modes for that as well. So for those RSS feeds that do not supply the full content, I just hit B and the content opens up in eww. There is built in functionality to open the linked content in the default browser by hitting b in elfeed, so whenever I want or need to open the content in Firefox, I just hit b. For some content that is dependent on JavaScript or is full of media, I sometimes use that built in function, but usually, I use B instead.

;; Gir meg muligheten til å bruk B i elfeed for å åpne en rss entry i eww
(defun elfeed-show-eww-open (&optional use-generic-p)
  "open with eww"
  (interactive "P")
  (let ((browse-url-browser-function #'eww-browse-url))
    (elfeed-show-visit use-generic-p)))

(defun elfeed-search-eww-open (&optional use-generic-p)
  "open with eww"
  (interactive "P")
  (let ((browse-url-browser-function #'eww-browse-url))
    (elfeed-search-browse-url use-generic-p)))

(define-key elfeed-show-mode-map (kbd "B") 'elfeed-show-eww-open)
(define-key elfeed-search-mode-map (kbd "B") 'elfeed-search-eww-open)

Comparing my present elfeed setup with my former Newsboat setup, one thing that is much nicer with these scripts and elfeed is that I don't have to use an external program for podcasts. Newsboat comes with podboat which is intended for use as a podcatcher after you have qued up the content within Newsboat. That process always felt cumbersome and I actually didn't use it because of that. With elfeed and a few scripts, I have all kinds of feeds within the one reader and use a few different keyboard shortcuts to get everything done that I want. Another nice thing with elfeed is its search functionality which is very powerful.

My Emacs journey is still in its infancy, but the more I delve into Emacs, the more I like it. It's powerful, personal and pleasant. Emacs extends the hackability of GNU/Linux further by allowing you to tweak not only your DE or WM through configuration and shell scripts, but also the program you do most of your tasks inside. Integrating more functionality into Emacs means less friction and context switching between different tasks. Thus far, I have only integrated RSS reader, email, pdf document creation (org mode with latex export to pdf), blogging (org mode and org-static-blog), some web browsing (Firefox is still my default browser, but I use eww more and more), note-taking in org mode (I used to use vim and markdown) and of course general text-editing.

It's interesting how much faster for instance navigating around my emails is in mu4e within Emacs than in Thunderbird which was my previous email program. I think the reason is that Emacs is both text and keybord-centric (while also allowing for mouse use if you are so inclined). Elfeed has also become more useful than Newsboat used to be for me since I now also use it for podcasts. The hackability of Emacs means you can add functionality you want or customize things to your own preferences easily. Emacs also uses less system resources than other programs while doing more. Fewer resources means less power use and longer battery life on laptops. You can save money and possibly also CO2 emissions if your electicity is produced in environmentally unfriendly ways.

I see Emacs as the ultimate step in my gradual move towards less resource usage for my computing that started when I switched from Mac OS X to GNU/Linux in 2011, moved to a light-weight desktop environment (LXDE and later LXQt), then to even lighter weight window managers, gradually switched some GUI programs with terminal programs and scripts and then in the end the gradual integration of many tasks into Emacs. (I did this mainly out of curiosity, but I have reaped other rewards like less resource usage and more freedom as well.) If you see Emacs as only a text editor, then it is more resource hungry than vim (but less than VSCode), but if you see it as what it is: an integrated, hackable computing environment, then it is less resource hungry than the combination of programs you would use to do the same tasks. It is also the ultimate expression of the FSF's ideal of empowering users through the use of free software. I am definitively going to delve deeper into Emacs in the months to come.

Vim vs Emacs for fast text editing

vimvsemacs.jpg

Introduction

I used vim for 2 years and got it into my muscle memory before my Emacs curiosity led me to try out GNU Emacs in the spring of 2022. Many people say vim is the faster text editor, but Emacs is wonderfully extensible. After having used both, I don't think vim is faster than Emacs, so I am going to show how many consecutive key presses you need to accomplish some common tasks in both and compare. Of course, you can use evil-mode in Emacs and edit text the vim way, but I am comparing the usual non-evil default keybindings of Emacs with the defaults in vim. There is also the common halftruth about crazy key chords in Emacs contra simple one-key presses in vim. This is true for many workflows, but not so much for actual text editing. For text editing, the keyboard shortcuts in Emacs are usually just a modifier key plus an alphanumeric key.

I believe that pressing two keys at once takes the same amount of time as pressing one key. I call both "a keypress". On the other hand, pressing three keys consecutively takes three times longer than pressing three keys at once because you have to depress one key, lift up your finger, then depress the next key, lift your finger and then depress the next key and lift your finger. Therefore the actual speed of editing is determined by the number of consecutive keypresses to get something done, not the total number of keys depressed. As an example, I often press C-c C-, s (Ctrl-C Ctrl-, s) to insert a code block in org mode which is three consecutive key presses and a total of four keys (I hold Ctrl down from the time I start pressing c until I have finished pressing ,). This could have been faster if it involved fewer consecutive keypresses even with the same amount of totalt keys, like for instance the keypress C-M-S-, (Ctrl-Alt-Shift-,) which is just one keypress, but also four total keys. My point is that when thinking about the speed of editing, it is the number of consecutive keypresses that matter, not how many keys you press at once (although fewer is less akward for the hand).

In this blog post, I will use Emacs symbols for keybindings in Emacs where C = Ctrl, M = Meta (Alt or press and release Esc), S = Shift and s = super (Windows/Tux/Purism/Apple Commmand Key/…). Emacs keybindings are generally written with a dash when pressed together and with a space in between when consecutive, for instance M-b C-p means Alt and b pressed at the same time and then Ctrl and p pressed at the same time. When the same modifier key is used for two consecutive key presses, it does not have to be released like the example above with C-c C-, s shows. When writing about Vim, I will use Esc for Escape and use no space between consecutive keypresses which is the usual vim way, for exampel 2gj for the three consecutive keypresses 2, g and j. All other glyphs just represent themselves.

Comparison of keypresses for common editing tasks

Before starting to write anything in vim, you have to press i (or a or o etc). In Emacs, you just start writing. That's one keypress for vim and zero for Emacs. After you have written a sentence, maybe you want to move back and do an edit. Let's say you want to move to the start of the sentence you just wrote and add something in front of the first sentence. In vim you would press Esc to get to normal mode and then 0 to move to the start of the line (not necessarily the line you see on screen, but the start of the chunk of text since the last newline character) and then you would have to press i. In Emacs, you would press C-a (or M-a if the sentence is longer than one visual line) and start to write. In vim, you would need three consecutive key presses and in Emacs one before you started to write your new first sentence. After you have written your new sentence, maybe you want to go to the end of your paragraph and add something. In vim, you would press Esc, then A and then start to write. In Emacs, you would press C-} and then start to write. Again, vim has two consecutive keypresses and Emacs has one before writing.

Maybe we want to move two visual lines up and correct the misspelling of the word "icnonsequently" next. The word is two visual lines up, but starts four columns (four letters) to the left of where we are now. In vim, you would press Esc to get to normal mode, then 2gk (that is not one keypress, but three consecutive key presses) and then 3h (two key presses), then d, l, i and c, which is 1 + 3 + 2 + 1 + 1 + 1 + 1 = 10 consecutive key presses. In Emacs, you would press C-2 C-p (or C-p C-p) (two consecutive key presses to move up two visual lines since Emacs works on those), then C-2 C-b, then C-t (to use the function transpose chars with the cursor at the third letter), ie 5 consecutive key presses.

I could probably think of more examples, but the point is that for most edits, Emacs demands fewer consecutive key presses than vim. You can check out Emacs Rocks' episode 3 and 4 where Emacs is faster than vim for a couple of Vim golf tasks. Protesilaos Stavrou has also made a video where he shows off Emacs Macros for solving Vim Golf tasks. I think most of these are faster than vim as well. There are probably more examples floating around the internet if you care to find them.

How can vim be slower than Emacs? Everyone think it is the opposite…

The reason why we get more consecutive key presses and spend more time to get from one point to another and start writing in vim is because of the modal editing. Since we constantly have to hit Esc to get to normal mode before moving around and then hit a, o, i, r, c, A, O, C or I before actually getting to start typing our text, we generally need two or at least one (when combining movement and getting into insert mode like with A) more consecutive keypresses for moving around and starting to write in vim than in Emacs. Even if you count the total number of keys depressed and disregard that it is faster to press two keys at once than to press the same two keys after each other, Emacs usually ends up with fewer total number of keys pressed for doing the same edits.

Modal editing, as shown above, is slower since you have to go in and out of modes. In addition, it is very unlike any workflow most of us have ever used before, which means that it takes more time to learn text editing in vim than to learn text editing in Emacs. As someone who has spent time learning both vim and Emacs, I found vim to have a much steeper learning curve for text editing. The people that say vim is intuitive on the internet are lying to seem leet. Emacs can also do everything else than text editing, so you can continue to learn Emacs after your muscle memory has adjusted to its text editing workflow and that is the reason why many people think Emacs is hard to learn, but for text editing, it is easier to learn than Vim. Most Emacs users were (Neo)Vim users in the past, but there are very few (Neo)Vim users that were Emacs users. I think this means that when Vim users try Emacs, they never go back.

Both vim and Emacs have good tutorials that you should spend some time with when trying them out for the first time, but for vim, I felt like I had to go back to the tutorial a lot of times before I really mastered the concepts of modal editing and the keyboard shortcuts for doing things. When I finally made my own vim cheat sheet for my Norwegian keyboard layout and hung it on the wall underneath my screen, I finally started to get its keyboard shortcuts into my muscle memory. With Emacs, I felt that the text editing keyboard shortcuts were more intuitive and easier to learn and remember since many of them are mnemonic.

Conclusion

The joke that Emacs is a good operating system that just lacks a good editor is just a joke. It is a slightly faster text editor than vim and it is easier to learn for text editing because of its non-modal nature. There are other reasons for choosing a text editor than text editing speed, like using the same tool as your colleagues or fellow students, having the possibility to do more things within a hyper-efficient text-centric interface or having a tool that is very minimal. I think both (Neo)vim and Emacs are good choices for investing some time into learning since they both have strong communities that will make sure they will be around for fitfy years more. Even if you use a GUI-centric editor as your main editor, you will probably be in a situation where you need to edit a configuration file from at tty and then vim and Emacs are readily available where the GUI-centric editors are unusable. Nano is an option, but it is very inefficient compared to vim and Emacs, although it is a lot more noob-friendly since it lists the most used keyboard shortcuts inside the window.

Both editors demand a bit of configuration and going through a tutorial to learn how to do basic text editing in them which is a different approach than many of the newer GUI-centric editors with more of a one-size-fits-all approach with or without extensions that may tweak things a little, but not a lot. I think those editors are short term solutions that will disappear when the priorities of the companies or individuals who make them change, like Atom exemplified. Another reason they are not long-term solutions is that they will get enshittified by the companies that make them to nudge/force you to use their other services or to harvest your data. An example is how VSCode integrates with GitHub, but not other git forges, how it gathers telemetry (probably for LLMs as well as for usage statistics) and how it promotes GitHub Copilot over other LLM tools. Microsoft's marketing of it as open source is of course a lie. Long term Emacs users remember other editors coming and going while Emacs and ed forks (ex, vi, vim, NeoVim…) where always there. In the end, you choose the tools that work the best for you. Just don't lie and say you use vim because it is faster if you haven't given Emacs with default keybindings a try.

I now use org-static-blog to create this blog

I have moved from WordPress to Hugo to nothing and now on to org-static-blog to create this blog. One reason to move to org-static-blog is that I have switched from using vim to using GNU Emacs as my text editor. When I used Hugo, I wrote my blog posts in vim and Hugo made it into a bunch of static pages that I uploaded to my webserver. Hugo has many features, like themes, RSS feeds, tags etc and is very practical to use if you use markdown on a regular basis. Since I was a vim user, my idea was to use markdown for everything and use Hugo for my website and pandoc to convert my .md files into LaTex-styled PDFs, LaTex Beamer presentation PDFs, ODTs and the occasional .docx when needed. I converted most of my older documents to .md and worked like this for a while. Then my Emacs curiosity got the better of me, and this spring, I started dipping my feet into Emacs.

I soon realised the power of Org Mode and that it could replace my former markdown workflow with practical features like automatic tables, lots of easy to use keyboard shortcuts for creating the .org markup syntax and very easy exporting to all the aforementioned formats plus many more. Not to mention that it is also a calendaring and todo-system, that you can use for literate programming, that it can also be used for journaling, a personal note taking system with reverse-linking etc. Naturally, I have been looking for a way to write my blog posts in Org Mode as well. Many people use Hugo and just convert their .org files to .md files with the emacs package ox-hugo. To me, this seems to be one step more than what I would actually like to do and what is actually necessary. After the war in Ukraine started, I left my website with just a static HTML page, but I have recently wanted to get back into blogging. I had started to work on making a program to make a static site from a bunch of .org files when I discovered the Emacs package org-static-blog that did the same. My plan with my program was to make it first in Bash Shell since I am more familiar with that language and then move it to Elisp for easy integration with Emacs later. Org-static-blog made all that work unneccessary.

Org-static-blog makes a nice index page with a blog-roll of the newest pages, an archive page and an RSS feed. You may also add links to other static pages you would like to include. If you use the tags feature, you can also get RSS feeds for each tag. Personally, I want to just keep things simple for now and have opted out of that feature. To make a new post, you just write an .org file with a title and date and optionally also a description and file tags metadata on the top and then just write your content. Each .org-file becomes a blog post. You can also use org-static-blog-create-new-post to automatically make that document with the correct tags for you which is nice for people like me that have yet to start using metadata heavily in Org files and would enjoy a helping hand with that.

When you are ready to publish your blog, you just run org-static-blog-publish in Emacs, and org-static-blog spits out all the HTML-files you need in your chosen export folder. To make the site look nice, you should make a style.css file that you put into your export folder and link to it in your header as described in the README. There are no themes, but the author links to his own website's Git repo where you can grab his style.css and tweak it to your own liking. As a dark mode lover that also likes to keep things simple, I have opted for a simple black and white look with the occasional light blue for links. The CSS styling is set it and forget it, so after the initial tweak, you are good to go. Just org-static-blog-publish and upload your static files to your website and there you go.

org-static-blog.jpg

The advantage of using a static site generator over something dynamic is faster load times and easier access to content for non-JavaScript enabled users. Not having unecessary JavaScript running just to show some content that is easily accessible without it also saves power for the site visitors which is good both for the environment and their economy and especially important when Europe is going through an energy crisis caused by Putin's invasion of Ukraine and energy war with Europe.

Migration to Hugo

This is just a short blog post to tell you why things look differently on this site now than it used to. I used to use WordPress to manage the site. WordPress is nice because it gives you a nice GUI to manage everything, lots of nice templates to choose from for a nice layout of the site and many plugins available for extra features like contact forms, comments and whatever else you may imagine.

There are however a few negative sides of using WordPress as well. Since a lot of sites around the web use WordPress, the login for any WordPress site gets constantly hammered by bots trying to break in. The security of plugins might vary. I get a constant flow of spam from my contact form. Since WordPress is quite complex and dynamically fetches content from its database as you view the site, sites using it are a bit slower to load than static sites where all content is stored in files on the server. Usually, this doesn't matter, but for people on slow connections or using text based browsers, it can make a difference. It can also matter if a site gets lots of traffic.

Hugo is a static site generator. I first heard of it in a video by Bryan Lunduke on LBRY. What Hugo does is that it makes it easy to write content in Markdown, pick a theme for the website and generate the files for a static site from it. You just upload those files to your web host and then you have your site. You get the speed of a static site, but the advantage of not having to make all the cod manually. It is sort of a best of both worlds approach where you get the conveniance of a CMS (Content Management System) with the speed and security of a static site. Hugo can even make an RSS feed out of your static site so people can follow you without having to visit your site all the time.

Making the content with markdown is smart because markdown is pure text that you can edit in any text editor on any device. It also appeals to me that I can make the content locally on my machine, spit out the static site, have a look at it with Hugo's built in web server and do any necessary changes before uploading it to my web host. I often revise things after seeing the end result, and maybe I can improve my content before uploading by having the ability to see the end result before it is online. I know I can do this with drafts in WordPress, but drafts are also online when using WordPress and they are included in RSS feeds before actually being posted (which I think many news sites around the internet is not fully aware of).

A script to play radio streams through mpv

Update 2022: You can find this script as well as some others at https://codeberg.org/einar/scripts/.

In this video, I show a script I have made to play radio channels through mpv after having selected which channel to listen to through bemenu.

Emulating a G4 Mac on GNU/Linux

In this video, I show you how to emulate a G4 Mac on GNU/Linux by using QEMU.

My minimal Sway desktop

I have made a video where I show off my minimal sway desktop.

My Openbox Desktop

I used to use LXDE and later LXQt as my desktop environment on Linux, but recently, I have switched to the Openbox Window Manager instead. I made a video about how I use it that I uploaded to LBRY. There are lots of videos of how people use tiling WMs. Most videos with Openbox uses it in a #!-inspired way with tint2 and conky, but since my use of it is quite different, I thought I would share how I use it and maybe someone might be inspired to use it the same way.

In the video, I don't go into the rc.xml since the default is quite good and I have only added a few things to get volume keys and brightness keys to work in addition to a few keyboard shortcuts, but I show how you can use synapse for launching apps through the keyboard and stalonetray for a systemtray in the built in "dock" feature of Openbox.

Link to video here.

How to install Steam on Ubuntu

For some strange reason, installing Steam directly from the Software Centre doesn't always work, and I have often had to look it up. Someone needs to put in the logic to add i386 repositories and enable the partner repositories before trying to install Steam from the Software Centre.

There are lots of different advice out there and not all of it actually works, so I thought I would write a blog post to remember how to do it and possibly help others with the same problem. This worked for me in Ubuntu 19.10 and Ubuntu 18.04 and it will probably work in future versions like Ubuntu 20.04 as well.

For any of this to work, you have to have enabled repositories from Cannonical partners in your Software Sources control panel since Steam is in those.

Then open a terminal and execute the following:

sudo dpkg --add-architecture i386
sudo apt update
sudo apt install steam-installer

The first command adds the i386 architecture to your repositories. This is important because most Steam games are i386, not AMD64, so you need to get the i386 versions of libraries for things to work properly. Notice that before add, there are two dashes (they just look like a long dash here.=

The second command updates apt's list of packages available. You should always do this after adding an architecture or a repository.

The third command installs the steam-installer. When you run this later on, it downloads the newest update to the Steam runtime and installs Steam properly.

Since Steam uses the Microsoft Arial font a lot, you might also want to install the Microsoft fonts with this command:

sudo apt install ttf-mscorefonts-installer

You may also just use the Liberation Fonts since those are free software and are made to match the Microsoft Fonts without any of the license restrictions of the MS Fonts.

Another option is to not just install the Microsoft fonts, but all of the Ubuntu restricted extras while you are at it for better DVD-reading/ripping support and such:

sudo apt install ubuntu-restricted-extras

Reasons I have deleted my Facebook account

I have deleted my Facebook account. Everyone should do the same. Don't take my word for it. Read a few articles about Facebook instead and make up your own mind whether you should give them your personal data and thereby legitimise their business practices:

  1. Facebook is a law-breaking "digital gangster," UK government report says.
  2. Facebook may face multi-billion dollar fine by the US Federal Trade Commision for Cambridge Analytica scandal
  3. Facebook is told by American lawmakers to stop spreading Anti-Vaccination propaganda that has led to US outbreak of measles
  4. Facebook has misused a developer certificate for iOS to get data from underage children's mobile phones even if it violates Apple's terms of service.
  5. And the list goes on and on and on about how this company has no morals and a lot of greed and treats their users as garbage for the sake of earning money.

I would suggest not just deleting your account, but also actively blocking any Javascript from Facebook through browser extensions to avoid them building a shadow profile on you. They are known to build profiles on anyone visiting any site with a Facebook "like"-button or Facebook "Share this on Facebook"-button, even for people that are not Facebook users. Ie, even if you are not a user, you are contributing your data to Facebook if you do not actively block their Javascript on all sites on the internet.

(Blocking all Javascript that is unnecessary for the sites you actually use to function is a good way to make the web experience faster and more secure (since a lot of malware comes in the form of advertising, or malwaretising, that runs Javascript on your machine through your browser) and generally a good idea. A good way to do this is to use Firefox with NoScripts. I also add uBlock Origin and https everywhere for added security against man-in-the-middle attacks and malwaretising.)

How to calibrate the screen on a Thinkpad X230 on Linux

If you run Gnome or KDE Plasma as your desktop environment, there are built in tools for you to calibrate your screen. You just need to find an .icm or .icc profile file that matches your screen to calibrate it. The best is to make one yourself with a hardware calibrator, but if you do not have a calibrator you may get close by using a profile another user of the same screen has made even if it will be slightly less accurate. (See below to find one that matches the X230 with the IPS screen.)

I have run LXDE up to now and have just switched to LXQt. Neither of these lighter and smaller desktop environments have a built in screen calibrator, so I needed to find another solution. The solution I found will work in any desktop environment or window manager as long as you use X11.

Flower.jpg
Figure 1: Flower

On the Arch Wiki I found a good solution called xcalib. This is a command line tool that takes an .icc colour profile and calibrates the screen with it. I tried with the .icm profile I had extracted from a Windows executable supplied by Lenovo on their site and it didn't work. I then DuckDuckWent and found on a Thinkpad forum that there was a colour profile for the X230 available in the Display section of a review of the X230 on notebookcheck.net. The profile is hidden on the bottom of a table with technical info on the right of a picture with the text "distribution of brightness" underneath. (If it should ever disappear, contact me through my contact page and I will happily email you a copy.)

I downloaded the .icc profile file and fed it to xcalib and the colours changed. I also have a Thinkpad W520 with a calibrated screen and know how my pictures on Flickr should look from seeing them on that screen, so I took a look at the same pictures on the X230 screen and they looked as they should as far as I was able to ascertain. It was really obvious that they did not look right before the calibration, but after the calibration, they looked alright.

To make this change permanent, all you need to do is to execute the xcalib command with the .icc profile file that fits the screen at the start up of your desktop environment or window manager. In LXQt, you can use the Session Settings to autostart xcalib thenameoftheprofile.icc. In LXDE, you can use the LXsession session manager to do the same. I put the .icc profile file in my home folder to be certain I back it up properly.

To me, getting the screen calibrated was the one missing piece to make the Thinkpad X230 an excellent ultraportable machine that can replace my Thinkpad W520 as my main machine. I like the small and light 12 inch form factor, the IPS screen, the excellent keyboard, the relatively powerful i7 M-class processor, the long battery life and the generous selection of ports.

The advantages of Linux seen from a Mac user's perspective

WelcometoUbuntu.png
Figure 1: Welcome to Ubuntu

Lately, many Mac users have been disappointed in the hardware and to a lesser degree also the software that Apple makes. It seems like Apple is focused mainly on iOS since their earnings mainly stem from it. Some of the core Mac users in creative industries that have used Macs since the 80s are now leaving or thinking about leaving since it seems like Apple no longer makes the best hardware for these use-cases. For video editors that need the ultimate in processing power, graphics processors, RAM and storage space, there hasn't been a good Mac since 2013. Therefore, some companies like Pixar that traditionally used Macs have been using System76 machines with Ubuntu for some years now.

For long time Mac users, Windows 10 doesn't necessarily look like a good alternative to macOS. Linux is the lesser known alternative, but it is in many ways more similar to macOS than Windows, although there are of course a lot of differences as well. Since I have gradually switched from Macs to Linux over the last few years, I thought it would make sense for me to share some of my thoughts about the main advantages of Linux seen from a Mac user's perspective.

Choose the hardware that best fits your needs

The main advantage of Linux is freedom of choice. Since Linux runs on a vast range of hardware from embedded devices to supercomputers, you can choose whatever hardware suits your needs when using Linux. With Macs, you have to live with the machines Apple make, or you can hack together a useable, but often not upgradable hackintosh solution that will usually be a hassle to maintain. Windows is also installable on lots of different computers, but Windows limits your choices in other ways. Read about desktop environments, the influence you have over software projects, the Unixy goodness and the choice of Linux distribution to understand what Windows lacks that Linux has.

With Linux, the easiest way to get good hardware support is to buy hardware with Linux preinstalled. However, building a desktop computer yourself from parts may give you more freedom of choice as to what to prioritise, and buying new or second-hand computers that originally came with Windows will give you many more models to choose from, but no customer support from the vendor. On most hardware, Linux just works, especially if you use one of the more newbie-friendly distributions (distros) like Ubuntu and derivatives (Mint, Ubuntu MATE, Lubuntu, Xubuntu, KDE Neon, Elementary OS…), PCLinuxOS or Manjaro. To avoid buying hardware that is less than ideal on Linux, if you do not buy hardware with Linux preinstalled, you should do some research before buying. So, when it comes to hardware, you have more choice with Linux than with macOS.

Choose the core technologies you prefer

Unlike on macOS, where you have a couple of supported versions of the same operating system, on Linux, you have hundreds of Linux distributions (distros) to choose from. Some are tailored to special use cases like media production, security audits, servers without a GUI, education… while others are more general-purpose desktop distributions. Some come with long term support and stay on the same version numbers of software while delivering security updates for five (Ubuntu LTS) or ten years (CentOS, Red Hat, Ubuntu LTS if you pay for extended support), while others churn out new versions every 6 months (Ubuntu non-LTS, Fedora) or at other regular intervals. Some distros only have new releases when they are absolutely certain the next version is stable and ready for use (Debian, Makulu) and yet again others are continually rolling out updates after a short period of testing so that you never have to reinstall (Arch, PCLinuxOS, Solus, Manjaro). Some distros focus on a particular technology, while others focus on designing a pleasant user interface with tailor-made apps to suit the desktop environment.

The abundance of choice is sometimes portrayed as a problem by non-Linux users, but in reality, it means that no matter what sort of user you are, you will find a distro that suits your needs and wants. The many distro projects also contribute free and open source code to the wider free and open source software ecosystem which means that even if an app, a library, a command line tool or a desktop environment was made for one particular distro, it will often find its way to other distros if it becomes popular among users. With the GPL licences giving people the freedom to use and change the software at will, every good idea that comes along can be furthered by everyone else to fit their needs or tastes. This sharing is one of the core philosophies of free software and the GNU/Linux world.

Although the many possible choices may be intimidating for a new user, starting out with a user friendly distribution with good hardware support and a pleasant desktop environment will give you all of the benefits of the wider Linux ecosystem, while keeping things easy to manage. If you or your company then over time learn that there are particular tools available in another distro, or maybe you prefer another desktop environment or other core technologies, then it is usually easy to change from on distro to another. The hardest part is to switch from Mac OS X to Linux. Once on a Linux distro, there are very few lock-ins, so it is usually easy to change distro. Some do this so often that they are considered "distro hoppers".

Choose the desktop environment you like

On macOS and Windows, you either have to use the graphical user interface your operating system (OS) delivers or use another OS. On Linux, most distributions (distros) have lots of desktop environments and window managers (lower weight and simpler desktop environments) to choose from. If you like the core technologies of a distro, but dislike its desktop environment (DE), then you can install another DE instead. Some distros come with only one desktop environment by default (elementaryOS with the Pantheon DE). Other distros ship more than one desktop environment that the user can choose at install time (Antergos, Debian, Arch…) while others have different editions with different DEs (Manjaro, Linux Mint). Yet again other distros come with one official desktop environment, such as Ubuntu (with Unity), but with official and/or unofficial community projects, flavours or respins that deliver other desktop environments like Lubuntu (with LXDE), Xubuntu (with XFCE), Ubuntu MATE (with MATE), Ubuntu Gnome (with Gnome), Kubuntu (With KDE), Ubuntu Budgie (with Budgie).

elementaryOS.png
Figure 2: elementaryOS

Even where only one desktop environment is available in a distro, other desktop environments and window managers are usually available in the software repositories, and it is trivial to install your favourite. This also means that if a family shares a desktop computer, the mother might like to use KDE, the father might prefer Unity, the oldest daughter might like LXQt while the youngest son enjoys Joe's Window Manager. These different desktop environments and window managers will happily live on the same system and with multiple users logging into their favourite. It is also possible to use Gnu/Linux without a user interface at all and just log into the command line interface. Most servers (whether on real hardware or in virtual machines) are setup this way.

Use familiar Unix command line tools

Just like macOS and the BSDs, Linux has its roots in Unix. Unix had multi-user environments, networkability and stability as some of its strengths. The Linux kernel itself was originally made by Linus Torvalds to make a usable Unix system out of a desktop PC, even if it is now used on a vast range of devices and hardware architectures. Many of the command line tools used in Mac OS X are the same or have the same name as the GNU utilities used in Linux. That is why Linux distros are also called GNU/Linux or GNU+Linux. This means that if you used Unix back in the day, or if you have become familiar with the Mac OS X terminal, most of that knowledge is usable on Linux as well. So, for macOS power users, the Linux terminal will be a cosy and familiar place.

Linux is the natural choice when operating system does not matter

Sometimes, the operating system does not matter at all, and the choice is more down to economics and practicalities. In these cases Linux is a natural choice as it runs well on lots of different hardware, can be used cheaply, gives you better security than Windows during the supported lifespan of your distro while giving you maximum flexibility. This is the case when you use software that is running in "the cloud", such as Microsoft's Office 365, Google Docs, Visma Enterprise… The trend is that many programs that used to be native to Windows or macOS, but did not ship a Linux version is now available in the cloud through any browser. This means that some software that in the past was unavailable to Linux users (or at least only available through the use of Wine or a virtual machine that ran Windows) is now available. If you prefer to continue to use MS Office even after trying LibreOffice, Calligra and WPS Office, then you can use Office 365 in the cloud. Or you could continue using Office 365 while gradually checking out and getting used to the alternatives. For some users, this takes care of their "I would use Linux if only X was available" problem.

You could argue that when using web based software, then ChromeOS might be the natural choice, but the advantage of using a better Linux distro than ChromeOS (ChromeOS is actually based on Gentoo Linux with a custom made desktop environment and Chrome) is that in addition to the cloud services and web apps, you can also run desktop software and if you are a developer or sysadmin, you have access to the terminal. A Linux distro gives you everything ChromeOS does and runs just as great on the same type of low end hardware that ChromeOS runs on, but gives you a lot more flexibility and freedom of choice. ChromeOS also has the disadvantage of being tied into the Google ecosystem, which means that you have no privacy, as Google's business model is to learn as much about you as possible and use this information to give you targeted ads. You can run the same webapps on any Linux distro as on ChromeOS, but block ads and spyware if you like.

In addition to cloud services, there are also more traditional scenarios where the operating system does not matter, like for instance when a developer uses her laptop just as a terminal to gain access to the server where all the code is hosted and the software is built or a system administrator just needs a machine with SSH to monitor all his virtual servers in the cloud or machines at different locations. Many of the more technical, newer Mac users that came to Mac OS X in the early 2000s was enticed by the Unix underpinnings and the Aqua interface on top and the shiny hardware, but have recently found macOS to be gradually more locked down and less Unixy while the hardware have become less good (for instance with keyboards that makes your fingers hurt like on the new MacBook and MacBook Pros). At the same time as Macs have become less enticing, Linux distributions have become more user friendly and Linux desktop environments have become more polished. Combined with great hardware now on offer, many of these users now embrace ultrabooks with Linux preinstalled. Dell has specifically targeted developers in its line of Developer Edition computers with Ubuntu and this bet seems to be paying off for them. System76 and Entroware also have a great offering of high end laptops and desktops for pro users and are selling even more Linux machines than Dell.

Open standards without lock-in

Most programs you run on a Linux system use open standards for organising and saving documents. This means that if you want to switch from one photo library program to another one, you probably do not need to spend a lot of time exporting pictures or rearranging folders or anything like that. Just install the new software and start using it. The same applies to other categories of software like music players, word processors, spreadsheet programs, presentation software… Some programs like the GIMP or OpenShot use their own document formats, but they usually also open and export all the open standard formats in addition to a few well known non-open standard formats.

The use of open formats give you more freedom of choice. If you dislike the direction a program is going in, then you may switch to another program without any hassle. This is much harder if you are using programs with proprietary document formats (like MS Office), or where the content is stored inside a database you have to import or export from (like iPhoto). Once you have transitioned from the lock-in of the non-open formats to the open formats, you can continue to use these documents with whatever software you like for years to come, but if you stay with the non-open formats, those have a tendency to change every now and then, not because there is a need for change, but because Microsoft, Apple and others like to make it impossible for people with an older version of their software to open documents made in newer versions, and thus force people to pay once more for the same programs in a new version.

With more and more countries and regions switching to open standard formats like Open Document Format on their official websites, the future of these formats are much more guaranteed than the proprietary, ever-changing, non-open formats of Microsoft Office and others. Even if you use MS Office, iWork or Google Docs, you probably have to exchange documents with people that do not use the same programs as you, and the use of open standard document formats guarantees a higher rate of success, since most programs imports and exports them.

Economic advantages

Depending on what you use your computer(s) for, the use of Linux instead of Windows or macOS may save you some money. Most distros include a lot of free and open source software both preinstalled or in their software repositories. Much of this software can handle tasks you might have had to buy software to do on a Mac or Windows PC just fine. Most free and open source software is initially free of cost, but if you use the software, you are encouraged to contribute back either monetarily or by helping develop the software further through coding, design, translations or documentation or by simply spreading the word about it. This means that you can evaluate software without buying it, and when you decide which software you will continue using, you are free to postpone contributing back until you have the money, knowledge or time to do so. You are also in a position where you can influence the direction of a project by taking part in it.

Even if you primarily use paid for software (whether open source or closed source) and are a decent person contributing to your distro of choice, you may end up saving some money by getting hardware that is more future-proof or suited to your needs than what a Mac might deliver. With Apple going in the direction of non-upgradable hardware with built in forced obsolesensce and a focus on thinness over functionality, especially users which need high-end GPUs, CPUs, lots of storage and RAM or writers depending on good keyboards, will probably be better off economically by buying more upgradable hardware from other vendors. And you can choose the hardware you want, not the hardware Apple thinks you should want.

Macs have traditionally been more expensive, but you used to get a longer life-span out of the machines than their PC counterparts, but now, they are more expensive, but with the same standard PC parts as other X86 PCs, but with less future-proof designs. A high end laptop from Entroware, System76 or Dell beats a MacBook Pro both on price, raw performance, customisability and longevity, and thus delivers lower cost of ownership per year. Apple is also notorious for charging a lot for built to order options, even if these options are the only way to future proof a machine that is not user upgradable. If you use Linux, you can choose whatever hardware you like, and many vendors cater for both high end, mid-range and low end use cases.

Ubuntu1404MacBook.png
Figure 3: Ubuntu 14.04 on a MacBook2,1

If you do not need high-end hardware, the choice in low-end hardware for reasonable prices for Linux use is much greater than on macOS. Older Macs that no longer get security updates to their installed Mac OS X version and that are unable to be upgraded to later versions of Mac OS X can run many Linux distros just fine. (I used to run Ubuntu side by side with Snow Leopard on my late 2006 white MacBook.) For really low-end needs like thin clients, any used netbook, desktop or laptop from the last ten years will work fine. Just use a lightweight Linux distro like Lubuntu, Peppermint OS, Puppy Linux or AntiX. Even PowerPC Macs are still usable with Linux. And for digital signs, media centres, routers, firewalls, DNS servers and other low power needs, a Raspberry Pi or Intel Compute Stick works well. I use a Raspberry Pi3 with LibreElec for my entertainment system. It cost less than half of an Apple TV and does everything the Apple TV does and more.

Free and open source software gives you influence

With Apple, what you get is what you get. You can choose to postpone to upgrade, but at some point in time, you will no longer get security updates and you need to move on. Many long time Mac users have been bitten by Final Cut or Mac OS X updates that went against their wishes. Sometimes, Apple discontinue software either to replace it with something else that is worse (iPhoto) or not at all (ClarisWorks/AppleWorks, HyperCard, FrontRow). If these programs were open source projects, the code would be available and the users that relied on them could influence what features were implemented and what features were removed. In worst case scenario, they could fork the projects.

If you are dependent on a particular free and open source software, you might want to participate in the project. You can do this by donating money, report bugs and missing features, make translations or take part in the coding of the software. When you do that, you also get the power to influence the direction of the project together with other users. This means that if you need the software to work in a certain way, you can make that happen through participation. Often one user with good ideas can have tremendous influence on a project if she engages with the community in a friendly way. Most projects consists of users of the software, and more often than not, there are many people which want the software to fulfil the same needs. Most projects welcome constructive feedback that will help them towards being more useful for more people.

If the project nevertheless goes ahead in another direction than you wish, if the software is free and open source software, then you have the right to fork it. Forking software means that you make a new project based on the source code of the other project, and develop it further in the direction you and your like-minded would like it to go. It is a huge undertaking to fork a large project, but sometimes the fork becomes more popular than the parent project if enough people are onboard. A famous example of such a fork was when OpenOffice forked into LibreOffice and Apache OpenOffice. LibreOffice became the more popular fork and is now the standard office suite on many Linux distros as well as hugely popular on Mac and Windows as it has better compatibility with foreign file formats and many more features than OpenOffice.

This might all sound a bit theoretical. Most people are not programmers and do not have the knowledge or time to fork software projects. However, if you work for a firm that relies heavily on a particular software project, knowing that the source code for the program is available and that the licence allows you to fork means that you could put an in-house developer or an external contractor to work if you find that the project is moving in a direction that is bad for your business. This ability empowers users to make of the software what they want. It also ensures that open source projects do not become like the proprietary software makers that first and foremost think about how they can sell you more software as often as possible with new versions with change for the sake of change (often to the detriment of functionality) and new document formats that are incompatible with the old in an attempt to force people to update to be compatible with the rest of the world. Free and open source software is there for their users, not for the sake of a company, a project or a foundation.

MacOS 9 in QEMU on GNU/Linux

This is a video where I show how you can run Mac OS 9 in QEMU on GNU/Linux. I followed the documentation on the Arch Wiki and on the QEMU website to get things going.

How to scale LibreOffice to work better on the M10 FHD Ubuntu tablet

The M10 FHD has a 1920 x 1200 resolution on a 10 inch screen. By default, LibreOffice is installed as one of the Xapps, but it is not scaled, so it looks tiny on the high resolution display. I used to scale the documents themselves by using the slider in the lower right corner in LibreOffice Writer, but this was a bit annoying since even if the document was scaled, the user interface was not.

I have found that by simply choosing “Options
” from the “Tools” menu and selecting the “View” tab, it is possible to choose scaling of the whole programme. As with Firefox, I have found that 180% works well. This makes LibreOffice the same size it would be on a 1067 x 667 screen of 10 inches and that works fine. Everything is large enough to be easily viewed, but at the same time there is enough space for content.

I also like to remove the toolbars by deselecting “Formatting” and “Standard” in View > Toolbars and in stead drag the Sidebar out from the right to show more options and be more useful. With the tablet in landscape orientation, this gives me the most space for contents on the page as long as the document is in portrait orientation (which almost all LibreOffice Writer documents are). It gives the least amount of scrolling and the largest possible view of the page. Especially on smaller screens, making the most of the available space is really nice (but I also do this on my 24 inch desktop screen).

Fun with the iBook Clamshell G3 300MHz

I made some videos in 2016 about fun things you can do with an iBook Clamshell G3 300MHz like switch out the hard drive with a CF-card, max the RAM and install Debian 7 on it. I orginally posted these videos to vid.me and later when they disappeared moved on to LBRY and Odyssee. Since I have room to spare on my website and this is a place I have control over myself, I thought I'd post them here now.

In the first video, I show how you can install Debian 7 on the iBook. In the second video I show you how I maxed the RAM and exchanged the ancient and clicking hard drive in my Blueberry iBook with a CF-card and CF-to ATA board. In the third video, I show how the iBook runs after the upgrades from the second video.

How to watch YouTube channels in gPodder

This video shows how you can subscribe to a Youtube channel with gPodder.

Update 2020 This method no longer works, but it is possible to find and RSS feed from a youtube-channel at yewtu.be and copy that link into your RSS reader.

How to use an Apple remote with KODI on Ubuntu on an Intel NUC

I use an Intel NUC i5 as my desktop computer. With Ubuntu 16.04 and KODI (formerly XBMC) it also doubles as a home theatre PC. To make this media centre really usable, I was plannig to use an infrared remote to control KODI. It’s much more practical when sitting at a distance than using a wireless keyboard or trackpad. Most (if not all) of the Intel NUCs have an infrared sensor.

I happen to have a white Apple remote that I got with my white MacBook in 2006. It’s a really minimalist infrared remote control that originally was meant for use with FrontRow before Apple discontinued it when they launched the Apple TV and Mac OS X 10.7 “Lion”. It is literally made for controlling media playback.

I found an excellent guide on how to set it up that worked very well for me, so I wanted to share it and write it down here to remember where I found it for later reference. It’s not too hard to follow and after setting it up with the correct addresses for each key, I am now able to remote control KODI. 🙂

2 Comments on How to use an Apple remote with KODI on Ubuntu on an Intel NUC

Carlos Santos 3rd August 2016 at 12:35 pm

Thanks for the reference 😉

Reply Einar 3rd August 2016 at 2:21 pm

Thank you for finding the information in the first place! It’s easy to follow your guide, but it must have taken a lot of time to figure it all out. 🙂

Second impressions of Ubuntu touch on the BQ M10

With OTA 12 and many app updates, Ubuntu touch is gradually improving. Last time I travelled, I did not take my laptop, and I could do everything that I needed with the tablet. All the basic needs like email, web browsing, chatting, podcasts, watching TV series, listening to music
 The BQ M10 is good enough for it now.

The most important fix in OTA 12 for me was that alt gr now works on external keyboards. This means that with an external keyboard, I can write just like on the desktop in LibreOffice and Firefox. However, there is still a bug with accented characters in native apps (but not the traditional X apps) and this is a bummer, especially for people using languages like French, Spanish, Portugese, etc that use accented characters a lot. Special glyphs that you get to with alt gr work fine, but accented characters do not in the native apps. Hopefully, this will be fixed soon.

As I have used the tablet more recently, I have noticed some more bugs and missing features. In the music player app, I found some minor annoyances such as albums with more than one artist showing up as more than one album in the album view, that there is too little space for album and artist names in album view and artist view and that I would like to have a list view for easier navigation with a lot of music.

After OTA 12 shipped, I also noticed that traditional X apps disappear from the launcher after a restart. This is a bit annoying, as it is easier to get to the launcher than to go to the Xapps scope to launch a traditional app like Firefox.

There are probably a number of small changes in OTA 12 that I have not noticed or tried yet. For instance, I know that it is now possible to use Aethercast to connect to an external screen from my M10, but since I don’t have an Aethercast-compliant Miracast dongle, I haven’t tried it. I haven’t used the tablet much with external screens this far (I have a desktop computer at home), but I have tried it and it worked fine. For presentations, lectures or just watching films at a hotel room, the Aethercast support is cool, but if you really want to be certain that you will be able to connect, an HDMI cable seems a safer bet, since not all Miracast devices support Aethercast.

Another missing feature in Ubuntu touch at the moment is the ability to choose default browser. I would like to be able to set Firefox as my default browser on Ubuntu touch, since I use some add ons and syncing in Firefox that I would rather not be without. With no such setting, any links from any app will open in the Ubuntu touch browser.

Another small annoyance is that it is presently impossible to copy and paste between traditional X apps and the native Ubuntu touch apps. Especially since Firefox is not the default browser and clicking a link opens it in the Ubuntu touch browser, I would like to be able to copy it from there and paste it into Firefox, but there seems to be no way of doing this presently. A bug is open, and it seems to be fixed for the libertine sandbox X apps run inside, but not in all the other projects needed for it to work. So, this will probably be fixed soon.

Some of the other important bugs for everyday use, such as calendar syncing and contacts syncing have not been fixed yet. This is disappointing, but given time, I am certain someone will fix it. Syncing through Google works, but standards compliant ways of syncing or importing/exporting to other services do not. Since Google is not exactly the FOSS enthusiasts’ most obvious choice of syncing service, as their business model is to use all your private data for advertising purposes, it seems strange that the Ubuntu touch developers found time to implement Google syncing, but not syncing to other more privacy respecting services through standards like iCal and CalDAV, since most Ubuntu touch users at this point is Linux enthusiasts.

All in all, Ubuntu touch is really impressive when bearing in mind that it is only a few years old and that it is developed by quite few people compared to Android or iOS. It is already a viable alternative for tablets and phones (unless you speak a language reliant on accented characters and want to use an external keyboard, but this will be solved soon) and in not too long, the Unity 8 interface used on the tablets and phones when in desktop mode will also come to the regular Ubuntu distro on laptops and desktops. This means that all the work going into the tablets and phones will also benefit the desktop in the long run.

I really like the M10, and even if the software is still a bit rougher around the edges than an iPad or Android tablet of the same size would be, I find it exciting to take part in the Ubuntu touch journey as it is maturing. The hardware itself is very good with its high DPI 1920 x 1200 screen, quad core 1.5 GHz processor and I particularly like the well sounding speakers. LibreOffice and Firefox are quite heavy programs, but they run decently on the M10 FHD with a bit of time to start up. They might not be as usable on the slightly slower white M10 HD tablet (1280 x 800 screen and 1.3 GHz processor with slightly slower GPU as well), so I am glad I bought the more expensive and slightly faster and higher DPI black FHD version. The Ubuntu touch experience on the M10 FHD is nice, and gradually improving to become even better. With OTA 12 it is a bit closer to being ready for everyman, but there are still quite important bugs that need fixing and some features missing.

Making Lubuntu 16.04 more pixel efficient

With the panel on the left or right, you get more visible space for content in portrait orientation, like word processing documents and websites and you don’t have to scroll as much. Ubuntu‘s Unity desktop environment got that right.

If you have a low resolution screen this is even more important. If you only watch films on your computer, then the “traditional” Gnome 2 and Windows layouts work fine. The traditional layouts also make more sense on “traditional” a 4:3 screen since the screen has more space in the height compared to the width than modern wider screens (16:9 or 16:10).

In addition to scrolling less and seeing more content, I also find this layout functional and a bit more beautiful than the «traditional» layout. It is possible to use a more fancy dock like docky or plank in stead of the LX panel that comes with Lubuntu, but then you also need compositing and that makes the machine a bit less energy efficient, even if it looks beautiful, so I prefer to just use LX panel. It is possible to use translusency without compositing and it looks quite nice in my opinion. My tweaked Lubuntu with LibreOffice Writer open My tweaked Lubuntu with LibreOffice Writer open

The advantages of using Lubuntu with the LXDE desktop environment in stead of standard Ubuntu with Unity is mainly that it is faster, runs better on older hardware, uses less RAM and CPU and GPU cycles, uses less energy (= longer battery life on laptops) and is more tweakable. Even if I like Unity, Lubuntu lures me back time and again and I enjoy using it a lot. At present, I use it on my laptop after a period of Manjaro Gnome. I am probably more of an LTS kind of guy even if I like the idea of a (slow) rolling distro.

I have made a video showing how to tweak LXDE to be more pixel efficient than it is out of the box on Lubuntu. I also change some other aspects of the look and feel more to my liking. The goal is to get something like what you see on the screenshot above. (There is no sound in the video.)

Here is a step by step guide if you didn’t get all of it from the video.

Openbox configuration manager

  1. Choose “Lubuntu-small” theme in “Theme” tab
  2. Make font sizes 10 in “Appearance” tab
  3. Make 4 desktops and name them in “Desktop” tab in Openbox configuration manager
  4. Set left margin to 33 in “Margins” tab

Customize look and feel

  1. Set icon theme to “Ubuntu-Mono-Light” in “Icon theme” tab
  2. Check / set that theme is “Lubuntu-small” in “Window border” tab
  3. Check / set font size to 10 in “Title bar tab”
  4. Check /set font sizes to 10 in “Misc” tab
  5. Choose “Small toolbar icon” as “Toolbar icon size” in “Other” tab

Desktop preferences (right-click desktop)

  1. Set font size to 10 for “Font of label text”
  2. Deselect “Use desktop as a folder (show icons on it) by path:” in “Advanced” tab

LXpanel (right-click it and choose “Panel settings”)

  1. Set “Edge” to “Left” in “Geometri” tab
  2. Set height to 100 percent
  3. Set width to 32
  4. Set Icon size to 30
  5. Select “Solid color (with opacity)
  6. Click color field and choose a nice light grey and set opacity to 128 and click “OK”
  7. Set Size to 7 under Font.
  8. Remove everything except “Menu”, “Spacer”, “Volume control”,”System tray” and “Digital clock” in “Panel Applets” tab
  9. Move “Digital clock” to before “Volume control” by selecting it and clicking “up”
  10. Select “Stretch” for the spacer
  11. Add new “Spacer” between “Menu” and “Application launch bar”.
  12. Set width of new “Spacer” to 4 pixels by double clicking it.
  13. Add programs to “Application launch bar” by double clicking it

(14. Set Tux image as menu icon by double clicking “Menu” in the “Application launch bar” tab and selecting the Tux image in the open dialog.)

A special thanks go to Leszeck Lesner for the Lubuntu screencasts from some years ago that taught me how to tweak Lubuntu! 🙂

The netbook - a cheap and flexible alternative in the tablet and ultrabook age

There has never been a better time to buy a netbook than today. Netbooks are being replaced by tablets and ultrabooks by a lot of people and the netbook is no longer the new and exciting device it used to be some years ago. Prices are low on the used market and the later netbooks with dual core processors can be had just as cheaply as the less powerful earlier models. There are also netbooks with GPUs (not just integrated graphics), USB 3.0 and HD screens that you could buy cheaply used.

Different people have different needs for different tasks. Fore some, an ultrabook is perfect, for others a tablet, for some a laptop, for some a chromebook and for some a netbook. There are different considerations, such as which operating system(s) you want to use, what form factor(s) you like to use, how much money you are willing to spend, whether mobility or screen real estate is more important to you, how much storage space you need, how long battery life you need, if you want a keyboard or not, if you like touchpads or touch screens or both…

I am touch typist, so I really want a keyboard on my device, but I also want a small and ultraportable devices that is easier to bring with me than my 13,3 inch MacBook Pro. It is just too big and heavy. The 10 inch form factor of most netbooks is very portable, but big enough that the screen, keyboard and trackpad are useable even for adults. There are also netbooks with 11 and 12 inch screens if you prefer a slightly larger size and some people get along fine with 7 and 9 inch netbooks as well. I have got thick fingers, so smaller keyboards than the one on my 10 inch Asus EeePC would be too hard to write on for me.

Netbook keyboards are of varying build quality and size, but I find that the Asus EeePC 1015 PEM I have got is ok to type on, even if it has taken some time to get used to the 93% keyboard size. People often use tablets with bluetooth keyboards, but then you have to carry two devices and you are back to the clamshell form factor of traditional laptops anyway. For me, the price of a tablet combined with apps for it and a keyboard is just overkill when I can get a netbook much cheaper that suits my needs better. I also prefer a full desktop operating system and a full set of ports. For others, a tablet with iOS, Android or Tizen might be perfect. And for the people that want more processor power in a light and portable package, an ultrabook might be right. Personally, I really like the good old-fashioned clamshell laptop form factor.

One advantage of netbooks is that they have all the usual ports like USB, Ethernet, VGA and/or HDMI, sound in and out and SD card reader. If you ever use a USB stick or mobile broadband or want to plug your device into a projector, this might be important to you. Combined with a full desktop operating system, you get all the flexibility of the traditional desktop computer in a light, compact and mobile package. You can run any version of Windows or any Linux distro you want. You can even hackintosh it if you are so inclined. And if you prefer a simpler interface, you might try running Android, MeeGo, Tizen, JolliCloud or any tablet/phone operating system in stead. Choice is good!

Battery life is a reason many people state as their main reason to use a tablet in stead of a laptop. Since netbooks are now getting really cheap on the used market, you could buy a netbook and a high-capacity battery for half the price of a tablet and get more or less the same battery life (some Asus Eee with dual core processors can get up to 13 hours of claimed battery life, which is probably more like 8 to 10 hours in real life). Of course, netbooks with GPUs have shorter battery life, while netbooks with integrated graphics have longer battery life. On my netbook, I am getting around 4 and a half hours of normal use with Wifi on and the screen brightness set to maximum with the three year old low capacity battery that came with the netbook. So far I haven’t bought a high capacity battery, but I am thinking about it. Might be smart to do so before they become too scarce.

With a netbook you have more upgradability than on a tablet or ultrabook. RAM is usually easily upgradable. It is also so cheap now that there is no reason not to max the RAM. Most older netbooks came with 1 GB of RAM and maxed out at 2 GB, but some of the newer ones max out at 4 GB. More RAM will usually increase speed, specially if you are multitasking a lot. A tip if you are running a Linux distro is to maximise the RAM and set the swappiness to 0, so that the netbook will use the faster RAM in stead of using the swap partition on your hard disc as long as there is still RAM available. Since disc writes and reads are draining the battery more than RAM writes and reads, this will also increase battery life as well as make the overall experience faster.

If you buy one of the newer netbooks, they usually come with 160 GB or 250 GB hard disc drives. Compared to tablets which often have 16, 32 or 64 GB SSDs, there is a lot more room for movies and music and whatever you might want to bring with you on most of the newer netbooks. On some netbooks, the hard drive is easily swapped out for another disc if you need more space by just opening a hatch on the back of the computer. On my Asus EeePC, the hard drive is harder to get to, but there are tutorials on youtube and blogs for upgrading it, so it is still user upgradable. Be aware that 2,5 inch SATA drives come in different heights and that your netbook might use a 7 or 9 mm high drive and taller drives might not fit. With hard disc drives up to a Terabyte being quite cheap now, it is not very expensive to get more storage space or a faster hard drive if you want or need to. SSDs bring silent computing since the fans don’t have to remove excess heat produced by a spinning disc. They also bring longer battery life, since there are no moving parts and motors, but the price is high per GigaByte. It is probably overkill to invest in an expensive SSD for an inexpensive netbook. On the other hand, a SATA SSD might be brought over to a newer device or put in a USB, eSATA or FireWire enclosure at a later time, so if you really want one, you might be able to justify it somehow. Personally, I am thinking they are still too expensive and for now, the 250 GB hard disc that came with the netbook is large enough. I keep my ripped DVDs on my MacBook Pro.

Another upgrade choice I mentioned in an earlier paragraph is the battery. Unlike many new ultrabooks and tablets, the battery is usually user replaceable in a netbook. This means that you will be able to use the device for a longer time, since you do not need to pay an authorized serviceperson to open your device to change your battery and you don’t get the dilemma of buying new or a high price for a repairsperson to fix the machine when it is getting old. More user-upgradability means that the device will stay in service longer, which is good for the environment.

There are many things to love about netbooks, but there are also some drawbacks. The main drawbacks are usually the processor, GPU or lack thereof, screen resolution and keyboard. Most netbooks have a screen with a resolution of 1024 x 600, which is useable, but somewhat limiting, specially the 600 pixels of height. Some netbooks have GPUs and higher definition screens, usually 1366 x 768. Even if my Asus has an integrated Intel graphic chip, I have had no trouble utilising projectors or external screens in addition to the internal screen when using Lubuntu. Video playback is fluid. Usually this is not a problem with the newer netbooks.

Keyboards on netbooks are usually smaller than 100%. Some are mushy and very small, while others are quite ok, once you get used to the smaller size and the placement of the keys. I think the keyboard of an Asus EeePC 1015 PEM compares quite well to the chicklet keyboard on the Macbook and Macbook Pro. The main difference is the size and that the keys have slightly more resistance on the Asus. Asus actually used to produce Macs for Apple in the past, so they certainly know how to produce well designed computers.

The processor is usually the main drawback of netbooks. Earlier netbooks had single core Intel Atom processor and later have AMD fusion or dual core Intel Atoms. Even the later netbooks are quite slow compared to full-fledged laptops with Core 2 Duo, i3, i5 or i7 or AMD processors. The ultrabooks, which usually have a slightly bigger screen and a slimmer body beneath the keyboard, have more processing power, but they usually lack the upgradability of netbooks and cost much more.

For most daily tasks like email, websurfing, watching movies, listening to music, podcasts and internet radio, watching online videos and streams, writing documents, making spreadsheets, instant messaging, video conferencing, VOIP &c a netbook is really all you need, but it might take some seconds more to boot the operating system and launch programs than an ultrabook would have used. That is the main trade off for the small size and the quite long battery life. For the low prices of netbooks on the used market, getting a quite new, high-end netbook is a no-brainer if you want a very portable computer and do not need a lot of processor power or a high resolution screen.

After I got my netbook, my huge and heavy 13,3 inch MacBook Pro has become my desktop computer. I still use it a lot at home and when I am away for longer periods at the same place, but for mobile computing, the 10 inch Asus is much more practical. Of course, if you are not a touch typist or don’t want to or need to write on a traditional keyboard, then maybe a tablet might be just as good, but for me, the freedom to install whatever operating system I want and the ability to connect with VGA to a projector or an external screen or use USB to connect to my camera or phone or a mobile broadband USB stick is invaluable. It is much lighter in my backpack than my MacBook Pro. Of course, I might as well have used a small 11 or 12 inch ultrabook, but it would have cost at least triple what I payed. Since I don’t really need the extra processing power, a netbook is perfect for me.

Ubuntu 14.04 on MacBook 2,1 (late 2006) and how to get iSight working

Ubuntu 14.04 "Trusty Tahr" runs quite well on my MacBook 2,1 from late 2006. Now that security support from Apple is (silently) ended for Mac OS X 10.6 "Snow Leopard", installing Ubuntu is a good choice if you want the latest software, want to stay secure and don't rely on Mac-specific programs. (It is possible to dual-boot or keep one of the OSes on an external FireWire hard drive you can boot from if you want to have both. Or you could upgrade to Mac OS X 10.7 "Lion" to get security support from Apple a while longer, but lose Rosetta and FrontRow.)

I initially ran Ubuntu 12.04, the previous long term support (LTS) version, but Ubuntu 14.04 is faster and leaner and comes with more up-to-date programs. If you are thinking of using Ubuntu on your MacBook, use the newest LTS. There is a new version of Ubuntu every six months, but personally, I prefer staying on the long term support version that comes out every two years. This gives me stability and security and I don't need to upgrade or reinstall that often. The LTS release is supported for five years, so even after the next LTS is out, you have some time before needing to upgrade.

Ubuntu1404MacBook.png
Figure 1: Ubuntu 14.04 on the MacBook (late 2006)

Ubuntu 14.04 comes with all the newest programs and everything "just works". All the hardware on the MacBook works fine out of the box, except the internal iSight camera, the internal microphone and the fans. Apple doesn't supply drivers for their fans for Linux or Windows, which means that although you can run Windows or Linux on the machine, the fans are either off or on at full speed. This makes the machine more noisy when not running Mac OS X and also shortens the battery life. The solution is to install macfanctl. You can find it in the Ubuntu software centre or by using apt install macfanctl.

To get the webcam working, I found some tips in an old how-to on the Ubuntu MacTel support wiki,but the page was somewhat hard to understand and I had to do some additional thinking and experimenting to get it working. So I thought I'd share the solution here:

  1. Step one was to get the iSight firmware from a machine/disk with Mac OS 10.6.8 Snow Leopard installed. You have to go to system/Library/Extensions and find IOUSBFamily.kext. Then ctrl-click (or right-click) on it and select "Show contents". Then navigate to the

Contents folder within it, and to the PlugIns folder within it and ctrl-click on AppleUSBVideoSupport.kext and select "Show contents" again. Then navigate into the Contents folder and into the MacOS folder and copy the file "AppleUSBVideoSupport" to a USB memory stick.

  1. Open a Terminal and write sudo apt-get install isight-firmware-tools and hit enter and write your password and hit enter again. You need to install this program to extract the parts of the firmware file that Ubuntu will use and place it where it should be. Don't close the Terminal window yet, you will need it later.
  2. Insert your USB memory stick and copy the "AppleUSBVideoSupport" to your home folder. 4. In the Terminal, write

sudo ift-extract -a /home/yourusername/AppleUSBVideoSupport (with the name of your user instead of "yourusername") and hit enter. (You might have to write your password again.) If everything works fine, you will get notified that isight.fw have been added to /lib/firmware. Now restart, and you can enjoy using your iSight webcam and internal microphone with Skype or Cheese or whatever program you like.

There is also another minor annoyance in Ubuntu for me: the Norwegian Macintosh keyboard layout does not correspond to the physical Norwegian Macintosh keyboards on one key, which makes it impossible to write apostrophes. All other glyphs and modifiers work fine. My solution is to use the Norwegian [PC] keyboard layout and remap the right command key (called the right Win key) to Alt-Gr with the Keyboard system settings panel (as shown above).

Update as of 28th August 2019: I got a message through my contact page that the above procedure to get iSight working also works with Debian. Since Ubuntu is downstream from Debian, that seems natural, but it was nice to hear from someone that has actually done it with success.

How to bring Rhythmbox radio streams from one computer to another

I recently installed Ubuntu on a new machine and wanted to bring along my music collection to use with Rhythmbox. This was trivial, I just copied the Music folder from my old machine to my new via an external USB hard drive and let Rhythmbox on the new machine search through the folder at first run. Then I wanted to listen to the radio and tried the radio tab in the sidepanel in Rhythmbox, but all the stations I had added to my old installation was no where to be found. So I did a little digging around the internet to come up with a solution.

Rhythmboxradio.png
Figure 1: Rhythmbox db

It turns out that the Rhythmbox radio stations are stored in the same database file that the whole music library database is stored in. Unfortunately, I could not just copy the database file, since the links in the file are hard links and the user names (and home folder names) are different on the two machines. Changing all the song entries would have been tedious, but I found another way.

What I did was open the file ~/.local/share/rhythmbox/rhythmdb.xml in gedit. (Open a terminal and write gedit ~/.local/share/rhythmbox/rhythmdb.xml and press return.) Then I searched for "iradio" by clicking on the magnifying glass and scrolled down until I found the radio stations I had added. I then selected everything from <entry type="iradio"… until entry> after the last of my added radio streams and copied it (press ctrl-c). Next, I opened a new file in gedit and pasted my text (ctrl-v) and saved the new file to a USB thumbdrive. On the other machine, I inserted the thumb drive, opened my saved file in gedit (right-click the file name in Nautilus and select "Open with" and "Text editor") and copied everything in the file (press cttrl-a and ctrl-c). Then I opened the ~.local/share/rhythmbox/rhythmdb.xml file in gedit (open a terminal and type gedit ~/.local/share/rhythmbox/rhythmdb.xml and press return), searched for "iradio", scrolled down to the last radio station, set the marker after the last "/entry>", hit return, pasted my radio station entries (ctrl-v), checked that there were no extra empty lines before or after my radio entries and then I saved the file. When I opened up Rhythmbox, my radio stations were there and streaming radio was working fine.

How to switch between programs on different workspaces in Ubuntu (with Unity)

One of the things I always customise when using the LXDE desktop environment is to get alt-tab to not only change programs on one desktop/work space, but on all of them. On Unity I was looking for a way to do the same and discovered that I don’t need to change anything, there is aleady a built-in keyboard shortcut: ctrl-alt-tab. Although slightly more akward than just alt-tab, it works.

The Mac is dead, long live the Mac!

The 30th anniversary of the Macintosh

I start up that old Quadra 700 in System 7, and I am back at the personal computer that lets me put whatever I want in the Apple-menu, a truely Wozniakian machine. I’m back at the desktop where I ResEdited all the desktop patterns and changed those STR# resources so my Mac would tell me «Welcome to Einar’s Mac» at start-up, back at the computer where I could put a picture in a special StartUpScreen format in the system folder, and see my picture as the background when the machine booted. I am back at that operating system that lets me choose which control panels and extensions should run, the system that lets me allocate the amount of RAM I want for my programs, the amount of virtual memory used and whether I would like a RAM-disk or not.

about.gif

These were the days of System 7: The IBM-compatibles were the machines of the corporate office drones, opening their 3,11 Windows so their 1,6 children could Excel in Word with 4 colours. On my Mac, I could publish «newspapers» with the kids in my neighbourhood using ClarisWorks, while others were struggling with config.sys, autoexec.bat and extended memory. I could write orchestral scores in Finale at the age of learning my first words of English at school. I could program my own games in HyperTalk, make a contact database in ClarisWorks or chill with Prince of Persia or Maelstrom. I could draw superbly in SuperPaint even if not on paper. I could MacDraw, MacPaint, MacLISP and MacWrite II. These were the days of PowerBook 140s, the days when PCs didn’t have norwegian characters in the fonts used by MS-DOS while Macs had whatever keyboard layout I would like and the fonts to match them. These were the days of WriteNow, PageMaker, GraphicConverter, Netscape, iCab, WordPerfect and PhotoShop.

Alas, it had to end. Steve Jobs’ second coming at Apple brought a revolution. Bill Gates from MICROSOFT! was presented as Apple’s saviour at MacWorld. Hell had frozen over and Steve Jobs held a funeral for Mac OS 9. Our corporate overlords decided that everything on screen should be grey from now on and that the Apple logo should loose its colours. Resistance was futile and the brushed aluminium age of Apple Inc. had commenced. All the colour, charm, humour and personality of the good old Macintosh System Software was gone. Forever lost to retro-computing was Clarus the dog-cow, the view of the Cupertino campus hidden in «About Finder», the program menu from the days of ye olde MultiFinder, the customisable and colourful Apple-menu, and the illogical charm of logging into a network server over AppleTalk with the Chooser DA.

It was a new jungle of Panthers, Tigers, Snow Leopards and Mountain Lions. It was a Quartz Extreme time of Carbonised Aqua and imprisonment in brushed metal interfaces. It was a time of confusion of keyboard shortcuts, and a time of mousing into the menu after not having had to do so since System 6 in the late 80s. It was a time of every program having a menu called the name of the program, but not containing much other than «Settings..» and «Quit», in stead of the File menu being next to the Apple menu, as Atkinson intended and sense predicted. It was mayham and confusion. It was a time of accepting being a user, not a poweruser. It was brutal, but I adapted.

Macs are more popular than ever, with the Mac-hating sheep of the MS-DOS days now flocking to the glass-walled, consumerist temples that are the Apple stores. For the new converts, the Mac delivers the friendly interface Windows users never knew they could have. (Try out the control panel on a Mac and compare with Windows, and you get what I mean.) But for me, the magic has faded with the six colours. I still use Macs, and in many ways, they are greater than ever, but I don’t like that Apple’s designs are forcing obsolesence while Cook is talking green on stage. I find myself drawn towards the open source world, where lots of the exciting new technological developments are happening. Maybe it is just a matter of wanting to think different(ly)?

This is the legacy of the Macintosh: the idea that a computing device needs a user-friendly Graphical User Interface (GUI) to be efficient and compelling. It’s everywhere today, not necessarily greatly executed, but everywhere. I love my iBook, Macintosh Server G3, MacBook, MacBook Pro and EeePC, but nothing gets me moofing like starting System 7.6.1 on the Quadra, hearing the major chord chime, seeing the happy Mac, and booting into the good old Finder. I get the warm feeling of coming home to my personal computer.

Things to do to get the most out of Debian Wheezy

I have recently installed Debian Wheezy with LXDE on my netbook. As anticipated, there were a number of things that needed to be done to get it to work as I like. Debian is a bit more work than Ubuntu, but also slightly lighter on resources, and I enjoy learning how to do this stuff. Having used some time to find out how to do things, I thought I might make a list to remember it all and share some Debian info with the interwebs.

(There are two ways of getting root, which you need to install software. Either you have no root account and you use «sudo» in an ordinary terminal, or you have a root account and do not use «sudo», but in stead use the root terminal. If you do the latter, you have to subtract «sudo» from all terminal commands mentioned here to get them to work.)

Adding software sources:

Debian’s package installer APT uses the file /etc/apt/sources.list to determine where to get its software from. By adding new lines to this file, new software repositories can be added. I like to add the following to my software sources:

  • Adding «contrib» and «non-free» software sources (for non GPL software like drivers, fonts, media codecs): How to and more on software sources at Debian sources.list
  • To get newer versions of software in Debian repos, add Debian Backports
  • To get newest Mozilla software, add Ubuntuzilla

Software from the Debian repos:

  • MSttcorefonts (TimesNewRoman, Aerial and so forth, «contrib» must be in your sources.list): open a terminal, write «sudo apt-get install msttcorefonts», hit enter and type your password and enter again.
  • How to add drivers for the Asus EeePC 1015PEM

Software installations from backports (to get newer versions):

To install programs from backports, open a terminal and write «sudo apt-get -t wheezy-backports install <Program name>». These are the programs I like to install from backports:

  • libreoffice, the free and open source office suite (if it is already installed, you must first deinstall the old version by opening a terminal and writing «sudo apt-get autoremove libreoffice», and then install the newer version from backports.)
  • gpodder, a podcatcher
  • vlc, a video/audio player that plays most formats
  • liferea, a RSS and Atom feedreader, to avoid having to visit lots of site to see new content
  • fbreader, an ebook reader that reads most DRM-free formats
  • gimp, the GNU Image Manipulation Program, great for editing photos or images
  • rhythmbox, an audio player and music organiser with live radio streams

Newest release of FireFox and Thunderbird (And Seamonkey if you like):

Debian Wheezy’s Icedove (Thunderbird) package doesn’t properly display my calendar and tasks with the matchning Iceowl-extension (Lightning), and the Debian Mozilla group’s slightly newer versions don’t work either, so I had to look elsewhere. The Ubuntuzilla project keeps up with Mozilla’s newest builds and the repos work on APT-based distros like Mint, Ubuntu and Debian.

  • To install FireFox: «sudo apt-get install firefox-mozilla-build» (the Ubuntuzilla sources must be in your sources.list.)
  • To install Thunderbird: «sudo apt-get install thunderbird-mozilla-build»(the Ubuntuzilla sources must be in your sources.list.)

Other software installations:

Some software is not available through the above mentioned repos, and must be installed from other sources. Here is a list of a few of those that I like, and how/where to get them:

  • LibreOffice dictionaries: LibreOffice Extensions
  • BitTorrent Sync user package, a brilliant way to sync files between computers: BTSync User
  • Skype, the instant messanger, VOIP and video call program: Installing Skype on Debian (As Skype comes as a 32 bit «multiarch», you need to read the section for amd64 on this page to get it to install properly on a 64-bit Debian install)
  • Flashplayer, to be able to play some contents online: Debian Wiki

LXDE:

Adding radio streams’ URLs:

Unfortunately, my favorite radio streams are not available by default in Rhythmbox, so I have to add them manually. (Find your European favorites on listenlive.eu.):

Other stuff:

  • to browse the Debian repos, check out Packages for Debian Wheezy

How to add drivers for the Asus EeePC 1015PEM in Debian Wheezy

I used some time to find out how to add wireless support and the use of the function keys on the Asus EeePC 1015PEM after installing Debian «Wheezy» 7.2 with LXDE. I thought others might be having the same issues, so I wrote this post. (And to remember how, if I ever need to do this again.) You have to be connected to the internet via ethernet to install the software that solves these issues.

Wireless network

To get the wireless working, I had to install a driver called brcm80211. This is how:

  1. If you haven’t already done it, add the non-free package sources to your sources.list file. Write sudo leafpad etc/apt/sorces-list in the terminal, then press enter and write your password, then add «contrib non-free» after the line saying deb http://http.debian.net/debian wheezy main so it reads deb http://http.debian.net/debian/ wheezy main contrib non-free and save.)
  2. Then write sudo apt-get update in the terminal and hit enter. This updates the package index from the sources in the sources.list file.
  3. Then write sudo apt-get install firmware-brcm80211 and hit enter to install the driver.
  4. Then write sudo modprobe -r brcmsmac and hit enter. This will remove the driver from the Linux kernel if it is already installed.
  5. Write sudo modprobe brcmsmac and hit enter. This will add the driver module to the Linux kernel.

Brightness keys, hibernate key and wireless on/off key

To get the brightness keys, the on/off wireless network key and the hibernate key do what you would expect, you have to install a package called eeepc-acpi-scripts. And of course, you have to use Fn tgether with the key. The volume keys still don’t work after this package is installed. This is how:

  1. Open a terminal and write sudo apt-get install eeepc-acpi-scripts and hit enter and write in your password. When/if apt prompts you, press y and enter to finish the install.

My sources for these solutions:

This is where I found these solutions originally, in case you want to know more:

Fix Alt Tab in Lubuntu

I usually keep one or a couple of similar programs running at each desktop. On the Mac, I use 9 Spaces that I alt-tab or ctrl-arrowkey to and from, but when using 4 desktops in LXDE on my netbook, alt-tabbing doesn't show me all my programs, but only the programs running on the current desktop. Of course, I could alt-scroll to the right desktop and then alt-tab if there are more than one program running there, but it seems a bit too complicated.

While trying out some distros that had openbox in virtualbox, I discovered that there is a way of alt-tabbing across all desktops. This method will work in any Linux distro that uses the LXDE desktop environment and/or the openbox window manager, if the version of openbox is 3.4 or higher. (Lubuntu, LXLE, Debian LXDE, Mint LXDE, Semplice, #!…)

  1. Open ~/.config/openbox/lubuntu-rc.xml (Either use PcManFM, rightclick and choose "show hidden" when in your home folder, then double click the .config folder, double click the openbox folder, then double click lubuntu-rc.xml or open a terminal and write leafpad ~/.config/openbox/lubuntu-rc.xml and press enter.) In other distros this file might be called lxde-rc.xml or just rc.xml.
  2. Scroll down to the "keybindings for window switching" section and find "keybind key="A-Tab”
  3. Change the text so it looks like this:
<keybind key="A-Tab">
<action name="NextWindow">
<allDesktops>yes</allDesktops>
</action>
</keybind>
<keybind key="A-S-Tab">
<action name="PreviousWindow">
<allDesktops>yes</allDesktops>
</action>
</keybind>
  1. Save.
  2. Open a terminal and type “openbox -reconfigure and hit enter. Hopefully, you will now have a working alt-tab between all desktops. (Thank you Peppa, for the tip!)

If it doesn't work or if you get an error message when trying to use OpenBox configuration manager, it might be because you didn't remember to delete the backslash (/) after "action name="NextWindow”, so that the later "/action" breaks the syntax of the XML file.

Update February 2021: Since this is a problem with the OpenBox configuration and not the desktop environment on top of OpenBox, the problem was still in Lubuntu after the switch to LXQt. I reported a feature request to be able to alt-tab between all desktop, and the Lubuntu team implemented my fix in the next release, Lubunut 20.04. Since then, there has been no need for this fix.

Inside Macintosh Quadra 700 or Essential upgrades

Link back to the main Macintosh Quadra 700 page

open.jpg

There are many different ways of upgrading your Quadra, but the easiest and most essential upgrade is to maximise the RAM. This makes it possible to run later versions of Mac OS that need more RAM to run properly, it makes multitasking smoother, it makes it possible to make the disk cache larger for faster reads from disk and it makes it possible to add a RAM disk. (I wonder why Apple didn't include the possibility to make a RAM disk in Mac OS X…)

In addition to maxing the RAM, I needed to change my PRAM battery. This is the battery that keeps settings for screen resolution, sound volume, disk cache, virtual memory, boot disk, etc. and keeps the date and time counter going even if the machine is off.

I was buying some other stuff from OtherWorld Computing anyway, and saw that they still sold RAM for the Quadra, so I thought I'd better order some while it is still available. I also got a PRAM battery. Sadly, they do not offer VRAM for Quadras anymore.

Before I started upgrading the machine, I consulted the Macintosh IIcx/IIci/Quadra 700 hardware repair manual that I found somewhere on the internet. (It's copyrighted by Apple, but I suppose they don't mind if I make it easily available.) I then put the Quadra on its side and opened the lid by pulling up the tabs on the back of the machine. There was no screw to unscrew on this Quadra, even if it is supposed to be one in the middle of the back of the computer. The last time this computer was opened was probably when the hard drive failed in the late 90s some time. It was naturally very dusty inside. I blew off the dust before taking the picture below. The power supply is easy to remove once you have pressed the latch

power.jpg

Initially, I had some trouble getting the power supply out. After a long while of fiddling about underneath the power supply, I found the latch that the repair manual mentions. It is a white latch located on the underside of the slot the power supply is resting on, on what is usually the top of the computer. After I found this latch, it was easy to lift the power supply out of the computer.

I then followed the repair manual's sections for removing the hard drive and removing the floppy drive and disk mount. And finally, I could see the four SIMM slots for RAM and the PRAM battery next to it. I wonder why the RAM slots and PRAM isn't situated on the part of the motherboard that isn't covered by the disk drives and the power supply. It could have been much simpler to upgrade this machine and there is plenty of room above the two expansion slots. Strange design decision.

The repair manual suggests using a special SIMM removal tool to get the RAM SIMMS out of their sockets. I don't have such a tool, so I looked closly in the repair manual at the illustration showing what the SIMM tool does and then I looked closley at the SIMM sockets and realised that all I needed to do to get the sockets to release the SIMMs is to press the two black latches on each side of the SIMMs away from the SIMM circuit boards with something. Two small flat screwdrivers worked well for this job.

The new SIMMs from OWC was slightly taller than the old ones, wich made me worry about wheter the disk mount would still fit into the case on top of the new SIMMs. I installed the new SIMMs anyway by sliding them into the slot from the side and raising them until they were vertical. There was no loud click of the black latches, but after raising the SIMMs to 90 degrees, they sat firmly. I had to start with the one furthest to the right, since all of them had to be slided in from the left. Quadra 700 without the power supply

wopower.jpg

The PRAM battery is sitting inside a small black plastic box, next to the SIMM slots. Yesterday, I changed the PRAM battery in my Beige G3, so I didn't have to look up how to get the battery out of the box (as I had to yesterday). The trick is to stick in a small, flat screwdriver on both of the short sides of the box, between the inner plastic covering the poles of the battery and the upper plastic cage and lift the plastic cage upwards. When changing the battery, it is important to remember wich way the battery sat. I took out the battery without thinking about that until it was too late, but luckily there are + and - indicators on the bottom of the battery cage in the Quadra 700.

Then I reassembled the machine by putting everything back. My worries about the SIMMs being to high turned out to be unnecessary. The disk mount and the power supply both fit perfectly even with the higher RAM and the lid closed properly afterwards. Then I plugged the Quadra into my monitor through the VMAC-1 VGA to Apple DB 15 plug and plugged in the keyboard and mouse, connected the ethernet through the Farrallon AAUI to RJ45 plug to my Macbook Pro, turned on internet sharing on the Macbook Pro and turned the machine on.

Bong! The machine booted just fine into Mac OS 7.6.1. In the "About this Macintosh" (in the Apple menu) it said I now have 68 MB or RAM. I then went into the Memory control panel and upped my disk cache and into the Date and Time control panel to set the current date and time. Everything seems to be working fine. My plan is to install Mac OS 8.1. Mac OS 7.6.1 is a good operating system, and it is possible to bring some of the newer features of Mac OS 8 back to 7, but since I never used Mac OS 8 back in the day (I jumped directly from a Performa 450 with 7.6.1 to an iBook Clamshell with 9.2.2 in 2002), I am looking forward to trying out the latest operating system the Quadra can run. My plan is to use this Quadra as I used my Performa 450, that is for musical notation, sequencing, patch editing, word processing, picture editing, HyperTalking and some light gaming. With iCab and Transmit, the old gal can even surf web pages and upload files to my web hotel. :-)

naked.jpg

The Quadra 700 after removing the power supply and the disks

about.gif

The About this Macintosh desktop accesory in Mac OS H-7.6.1

Why i switched to Ubuntu from Lubuntu on my netbook

When I got my netbook in january, I backed up the Windows 7 starter restore partition before installing Lubuntu. I had been playing with Ubuntu, Lubuntu, Bohdi, Xubuntu and other Linux distros in virtual machines on my Mac for a while and I had been thinking that it would be practical to have a smaller, more portable computer. So I watched some sites where people advertise used stuff for sale and got myself an Asus EeePC 1015PEM cheaply.

Ubuntu seemed to be the best distro for a Linux newbie like me, with lots of online documentation, lots of available software that is easily installed and a big community of users and developers, but the Unity desktop environment that comes with stock Ubuntu was a bit too slow on my netbook. I looked into Xubuntu, but I didn’t really like it that much and it wasn’t really that much faster than Ubuntu, so I went a step further in lightness to Lubuntu. I found it user-friendly and fast. The look is slightly Windows 95ish, but it is tweakable and generally quite pixel efficient, wich is important on a netbook. So I tweaked away the bottom panel and changed some font sizes and was generally happy with it.

However, I have allways liked Unity. The integrated menu and window title bar saves some vertical pixels and the content of my programs get more space. It makes a lot of sense, specially on smaller screens. The dock on the left side also saves some vertical pixels compared to a panel or dock at the bottom of the screen. I am also a fan of the dash. Using the Windows Super key to get to the dash and just starting typing whatever you are searching for is very efficient. I am looking forward to seeing what types of «lenses» for the dash will be available in the near future.

Some time ago I read on OMGUbuntu (or was it Phoronix) about how much faster Unity was in Ubuntu 13.04 Developer Beta than in previous versions and how stable the developer beta was. I tried the beta, and it was actually stable enough for day to day work and much faster than 12.04 and 12.10 on my netbook and on par with Lubuntu 12.04.2. I went back to Lubuntu because in the developer beta of Ubuntu 13.04, I had trouble setting up external monitors properly without mirroring the internal monitor and limiting my resolution options because of it. I need to be able to connect to projectors sometimes when I am substituting as a teacher, for showing a video or presentation, even if I usually don’t have log on credentials to the school computers. And using beta software is not that smart, since things can stop working with the next update.

But using the faster Unity desktop environment of the developer beta of 13.04 was enticing. When Lubuntu 13.04 came out, I upgraded, but the speed wasn’t much faster in 13.04 than in 12.04.2. (12.10 was troublesome for me, so I went back to 12.04.2.) Lubuntu 13.04 wasn’t as much faster compared to previous Lubuntu versions as Ubuntu 13.04 was compared with 12.04. Some weeks ago, I tried the final version of Ubuntu 13.04 on the Live CD and tried out the screen settings panel and discovered that it no longer limited my choices when it came to mirrored or unmirrored screens and that it gave me independent resolution settings for each screen, just as in Lubuntu.

After half a year of Lubuntu on my netbook, suddenly my reasons for choosing Lubuntu over Ubuntu had disappeared. Ubuntu 13.04 is just as fast on my netbook and Unity has matured and become faster and more good-looking than in 12.04 and 12.10. And the screen settings panel has become much more useable for me.

I have also switched back to Firefox from Midori. Midori had a tendency to crash all the time and whenever I turned off my computer without first quitting Midoring, it said that it had crashed last time it ran and asked me wether or not I wanted to restore my tabs. Annoying stuff. Firefox might be slightly slower, but not having to deal with bugginess is better than speed. I might swith back to Midori if a later version is more stable.

2 Responses to "Why I switched to Ubuntu from Lubuntu on my netbook"

  1. vayne says: 05.07.2013, kl. 00:16 hello what are the specs of your netbook i have a netbook sony vaio with ubuntu 10.04 (its the only that dont cause trouble) i test lubuntu to but i thinks it has battery problems so i install 10.04. i have a 1gb ram do you think is a good idea to change? thanks
  2. Reply Einar Mostad says: 08.07.2013, kl. 17:08 Hi Vayne! My netbook is an Asus EeePC 1015PEM with a dual core Atom at 1,5 GHz and 2 GB RAM. Lubuntu ran fine on it and earlier versions of Ubuntu were slow, but in 13.04 the difference in speed between Ubuntu and Lubuntu more or less disappeared, so I chose Ubuntu, since I like the Unity desktop environment. 1 GB RAM is not much, so a more lightweight linux distribution, like Lubuntu, is probably faster on your machine. (I would max my RAM to whatever the machine can take. It is usually quite easy and cheap these days, and then you will get a bit more speed.) I have heard lots of good things about Peppermint OS, which is based on Lubuntu, so maybe that is worth a try. Another option if you want a modern looking desktop that is lightweight is to try Bohdi Linux, which is based of Ubuntu, but uses the Enlightenment desktop. I’m very tempted to switch to it, but the setup panel for screens keep me away for now. Anyway, you are probably better off with a newer version than 10.04. I would try 12.04 which is a long time support realease (LTS) or 13.04, which seems faster, but might be more unstable, to keep up with security updates and to get access to newer versions of software. Might be smart to look for any issues concerning your specific machine model and any version of (L)Ubuntu you are thinking of installing on Ask Ubuntu to see if others are experiencing problems before installing it. If you want to try Bohdi or Peppermint OS, then those are based on Ubuntu, so they probably have the same issues as the (L)Ubuntu version they are based on.

How to import Mac OS X Adress Book contacts in Thunderbird

I am migrating from Mac OS X Mail to Thunderbird (to make syncing between machines easier) and as part of that process I wanted to import my contacts from the Mac OS X Address book. It is possible to use contacts from the Mac OS X Address book without importing them, but since I am going to sync Thunderbird on my MacBook Pro with Thunderbird on my netbook running Ubuntu, I want to import the contacts.

On the help pages for switching from Mac OS X Mail to Thunderbird it is suggested that one could drag and drop contacts from the Mac OS X Address Book to the Personal Address book inside the Address book window in Thunderbird. But sadly, it doesn't work. The «Personal Address book» will not get highligheted if I drag contacts to it and if I release them over it anyway, nothing happens.

In stead, many forums on the net suggest selecting all contacts from the Mac OS X Address book, dragging them to the desktop, and thus creating a .vcf file of all your contacts. When importing this file into Thunderbird, I experienced that half of my contacts were not properly imported and had blank firstnames and surnames. It might be a text encoding problem, since all names starting with «Å» were blank after importing, but on the other hand, names starting with «Ø» were imported correctly, so maybe it is not about text encoding at all. Many contacts without any sepcial characters were blank as well. Anyway, this way of importing contacts doesn't work either.

I also tried «asking a question» on the Thunderbird support pages, but that process just stalled when I hit submit. I am using the newest Firefox, so I suppose the browser is not the issue…

Finally, after having searched for a long time on many forums online for help and ending up with lots of broken links to scripts that were supposed to solve the problem, I found VCF to CSV. It converts vCard files (.vcf files) to the LDIF CSV format that Thunderbird imports. I just had to open Mac OS X Address book, select all contacts, drag them to the desktop, rename the file to the name I wanted for my new address book in Thunderbird, open the tab with vcf2csv.com in Firefox, select «Choose file…», select the file I had just created, wait for the conversion to finish and then choose «import…» from the «Tools» menu in the Address book window of Thunderbird, select «Address book» and select the newly converted file. And all my contacts were finally correctly imported.

I find it very strange that Thunderbird does not correctly import Mac OS X Address book without the use of some third party tool. It is probably the most used Address book after Outlooks address book. Ideally, the drag and drop method suggested in the oficial Mozilla documentation for switchers should work, but even if that didn't work, the importing of vCards should work. Neither does in Thunderbird 17.0.6.

How to sync podcasts between a Mac and Linux computer

I have been looking for a good way to sync podcasts between my Macbook Pro and Asus EeePC running Lubuntu. On the Mac, I have been using iTunes and for a while I just synced the \~/music/iTunes/iTunes Music/Podcasts folder from my Mac to my netbook with BitTorrent Sync. Then I only had to download the podcasts once on my Mac, and all podcasts would be synced to the netbook. The main problem with this apporach was that there was no way of seeing wich podcasts I had allready heard/seen without either remembering its file name or opening it to check if I had allready heard/seen it. There was also no nice GUI to see the metadata for the podcasts on my netbook without opening the files in a media player.

I stumbled across gPodder, an easy to use open source podcatcher for Linux, Windows and Mac. gPodder is a program that only does podcatching, but it does it really well.  It doesn't play video or sound by itself, but the user can choose any desired program to do that. There is a sync service built into the program, but I am not a fan of trusting third party servers in «the cloud», so I am not using that.

gPodder stores all its settings and all downloaded podcasts in a folder called gPodder in your user directory. The formats of the files in the folder are the same no matter which operating system you are running. This means that to keep the same settings and the same downloaded content across machines, you could just sync the gPodder folder with BitTorrent Sync from one machine to the other. The smart thing about this is that it doesn't matter if I am at my Mac or my netbook, I can now download podcasts on wichever machine and they will be available on the other machine as well.

With the same settings, syncing from one machine to the other, you are not able to choose different programs on each machine for playing your podcasts, and even if you choose the same program on the Mac and Linux machine, you will get into trouble, since they are not stored at the same place. What you need to do is set gPodder to use the «Default program» for both audio and video in the «General» tab in the «Settings» panel and change that program to whatever you like on each machine. On the Mac, mp3 files defaults to open in iTunes if you haven't changed this setting, and this is not ideal, since iTunes will, by default, add any files to its library, thus storing the same file twice on the machine.

I am using VLC as the default program for most video and sound files on both my Mac and EeePC. To set wich programs act as default on a Mac, choose a file of the desired format in the Finder, press command-I (or choose «Get info» from the «File» menu) and choose the desired program in the pull down menu on the lower left. Then click «Change all…» to make this change universal for all files of this type. On Lubuntu, just select «Default programs» from «System settings» in the Lubuntu menu and change to your desired programs. On Ubuntu, choose «System settings» from the dash or dock, then choose the «Details» settings panel and the «Default programs» tab from the menu on the left and set music and video to whatever you prefer.

How to sync files between computers securely and fast

Behold, the end of the time of the sneakernet has come! For a long time, I have wanted to sync some files back and forth between my various computers. So far, I have been using AFP over TCP/IP, FTP or sneakernet with USB dongles to transfer files between machines. The downside to this way of syncing files is that I have to manually copy any file I have changed from one machine to the other. It is easy to get conused about wich machine ha the newest version of a file. A disadvantage of using AFP over TCP/IP is that I have to have file sharing (or netatalk on linux) enabled all the time on one or more machines, wich might be a bad idea since it is probably not that hard to crack the password and get full access to my files. Or I have to turn it on and off every time I am tranferring some files back and forth.

The other option, so far, has been using one of the many cloud services out there. The problem with cloud services is that they are slow, since they have to transfer all your files from machine A to a server on the internet (or «the cloud») before machine B can download the files from that server. Even with a fast internet connection at both ends, this is much slower than just transferring the files manually over a local area network (LAN) from one machine to the other. It might also be slower than sneakernet.

The other problem with cloud services is privacy. DropBox was recently hacked and since it encrypts every dropbox folder of every dropbox client with the same encryption key, all data uploaded to DropBox was suddenly public information. Even if the companies behind your cloud service might have better security in place, you have no garantee that the data you upload to their servers will not be sold to marketing companies. You better read those terms of service… How much do you really trust Apple, Microsoft, Google, Dropbox or Cannonical?

The brilliant solution to the syncing problem is Bittorrent Sync. It is a new syncing service using peer-to-peer connections with the bittorrent protocol. If you are syncing two machines on the same local area network, these two machines will connect to each other and sync the data between folders on the two machines. This is much faster than any cloud service, since it doesn't have to upload any data to any server on the internet before downloading from the same server.

If the machines syncing folders are situated in different locations, the connection is made over the internet from the first machine to the second machine directly. Since no server is involved this is also faster than the cloud services.

If more than two machines are syncing a folder, the bittorrent protocol will make sure that data gets conveyed as fast as possible from the machines that have got the data to the other ones syncing the same folder, with different mchines contributing different parts of the folder, just as when you download files with a normal bittorrent client program.

Since all connections are made between the computers syncing the folder and no server in «the cloud» is involved, there are no third parties that will have a copy of the data transmitted. The connections between machines are encrypted, wich means that the data is not easy to sniff out either. Every folder you sync gets a random generated «secret», a key that you have to input at all the other machines syncing the same folder. By inserting the secret, the other machine gets to know wich machine(s) to connect to and wich folder to sync.

With some cloud services you have to put the files you want to sync in a special folder, but with Bittorrent sync, you can sync any folder on one machine with any folder on another machine. So, if you for instance want to keep your LibreOffice settings synced between a couple of Macs, you could sync the LibreOffice folder inside Application Support folder in your Libraries folder. Or you could update programs only on one machine and sync the program folder to all the other machines to avoid having to download the same programs more than once from the internet.

Another advantage of Bittorrent Sync is that there are no limitations on the amount of data you can sync, since there are no servers in «the cloud» that could limit your capacity. There are no extra fees for transferring more data than a certain amount and no need to buy extra space on cloud servers. However, If you want to, you may limit the upload and download bandwith BitTorrent Sync is allowd to use.

There is also a possibility to sync only one way. A scenario where this might be usefull is if you want to share some photos with some friends, but don't want to let them add their own files to the folder to be synced back. There is also a possibility to make a one-time «secret» that will let a person sync a folder only within 24 hours of the generation of the secret. These secrets might be one-way (read only) or full access.

At this point, Bittorrent Sync is only available for Mac OS X, Windows and Linux, but Bittorrent labs are working on making clients for mobile phones and tablets as well. The Linux version is managed through a webbrowser in stead of the program having its own GUI. Check out this blog post for the lastest Ubuntu and Debian user packages. Many thanks to tuxpoldo for making the packages!

Free sheet music on the internet

There are lots of old music prints, handwritten scores and parts and facsimiles of old editions that are in the public domain because their copyright have expired. There are also some generous people that publish their original music scores or their arrangements and transcriptions directly online for free use. Here are some links to some of my favourite sites for music prints and manuscripts:

A lot of libraries have digitised their collections lately as well:

Music links

Music organisations, music websites &c

Musicians

How to get the Ubuntu software Centre in Lubuntu

The Lubuntu software centre in Lubuntu 13.04 Beta is not yet populated. In other versions of Lubuntu, the software centre works fine, but there are more programs available in the Ubuntu software centre than in the Lubuntu software centre, so you might want to add the Ubuntu software centre anyway.

To add the Ubuntu software centre, open a terminal (Lubuntu menu \> Accessories \> LXTerminal) and type sudo apt-get install software-center. Make sure that you are spelling software-centre in the American way in stead of the British spelling (software-center, not software-centre). Type your password when prompted and press the return key. Then type y and press the return key when it asks wether on not you would like to continue. And wait untill the process is finished and you get a normal prompt. Then close the terminal window and if you want to check out the Ubuntu software centre, select it from Lubuntu menu \> System tools \> Ubuntu software center.

How to get rid of tap to click in Lubuntu, LXLE, MintPPC,

Debian LXDE etc

Tap to click is usually on by default, but I know that I am not the only one that disables it on all my computers to avoid clicking all over the place. In most desktop environments (Unity, MATE, Gnome, KDE..), the Mouse and trackpad system settings panel lets you turn off tap to click, but in LXDE, there is no such option in the Keyboard and Mouse settings.

However, there is a method that should work in LXDE on most distros that use it (Lubuntu, LXLE, Debian with LXDE, MintPPC etc) Unfortunately, this only works if your trackpad uses the synaptics drivers. This is how you do it: Open the LXDE menu > Preferences > Customize default applications for LXSession. Choose the Autostart tab. Choose config-only from the drop-down menu where it says "Disable autostarted applications?". Write "@synclient MaxTapTime=0" in the text field next to the "Add" button and hit the button. You will now see "@synclient MaxTapTime=0/”/ in the bottom of the list of"Manual autostarted applications”. Log out and log in. Now tap to click should be disabled.

Lubuntu 12.04 on an iBook Clamshell 300 MHz

Update 2022: Neither Ubuntu nor Debian support the 32bit PowerPC architecture any longer (PPC). Most of the information in this blog post is therefore only of historical interest.

I recently installed Lubuntu 12.04 on my iBook. Lubuntu is running slightly faster than Mac OS X 10.4.11 «Tiger» on the same machine, but slower than Mac OS 9.2.2. This is the Clamshell revision B with a 6 GB 4200 rpm hard drive, 300 MHz G3 processor and I’ve maxed the RAM to 576 MB.

Why Linux on an old PowerPC Mac?

Even if Mac OS 9.2.2 runs very well with 576 MB RAM on the iBook and AirPort works fine (but not with WPA and WPA 2 networks), the problem with using an old OS is that there are no current internet browsers, there is no up-to-date JAVA and Flash and there are no security updates (wich isn’t really that important on such a small and long dead platform anyway). OS 9 is very pixel efficient on the 800 x 600 screen and I like the good old familiar GUI, but there is absolutely no future in it and going to the internet bank or watching a youtube video is impossible. As I recently got my father’s Quadra 700, I am able to use all of my legacy System 7 – 9 software on that machine, so I don’t really need OS 9 for legacy software support. (Most of it is from my old Performa 450 and thus 68k or «fat banary» programs, so they will work just as well on a 68040 Quadra as on a G3 iBook.) The Clasilla browser is the only more or less up-to-date browser that is still maintained, but the browsing experience is far from FireFox on a modern OS.

Mac OS X 10.4.11 «Tiger» is capable of running on the iBook, but it is much slower than OS 9. Mac OS X 10.3.9 «Panther» is even slower in my experience. (Tiger is oficially not supported on machines without FireWire and is delivered on DVD, but it is still installable if you hack the installer to not refuse to install on your machine, start from a volum with Tiger allready installed (since starting from USB is only possible on PowerPC Macs with Mac OS X 10.4.7 or newer) and then install from an external HD via USB 1.1 with an external power source. It is not easy, but it is possible.)

Tiger is less pixel efficient and more cluncky on the small 800 x 600 screen and suffers from the same problem as OS 9 with no security updates and no up-to-date Flash or Java. TenFourFox is a port of FireFox that is up-to-date and it works well, but since Tiger is slow on my iBook and there is no Java or Flash, it is still not the best experience on the web. TenFourFox is also not very pixel efficient on the small 800 x 600 screen, even if it much better than many other browsers.

One of the advantages of Linux on the PowerPC platform is that there is a community of people maintaning, porting and building both OSes and programs for the PowerPC platform, wich means that up-to-date software is available for old PowerPC Macs and IBM Power machines. Open Source software available as source code also means that you could port any program to any platform (or OS) if you know how to compile software from source. I don’t, but if you really want a program that is unavailable, it might be something worth learning how to do.

Linux comes in lots of distributions or distros. At http://mac.linux.be/ there are some information about Linux distros for Macs, including PowerPC Macs. Distrowatch.com has a more comprehensive list of Linux distros. It seems like Ubuntu is the most popular distro and also one of the easier to use and configure for new users (as far as I know). The advantage of using a popular distro is that there are lots of people working on development and killing bugs and getting support is easy via forums or irc chat.

The Ubuntu «family» consists of Ubuntu and distributions based on it, but with different desktop environments and/or bundled software. There are also many other Ubuntu-derived distributions that are not part of the oficial Ubuntu «family». Ubuntu uses a desktop environment called Gnome Unity. It is quite Mac OS X-like, with a dock on the left side and menu on top of the screen, with a Spotlight-like «dash» on top of the dock. Kubuntu uses another desktop environment called KDE that is more highly configurable. Both of them are modern and slick and full of visual GUI goodies like half-transparent menus and such. This also means that they are quite demanding on the hardware and will run quite slow on machines with little RAM or slow processors.

For older machines, Xubuntu and Lubuntu are often recommended. Xubuntu uses that XFCE wich is quite light and fast. The looks are modern and it is highly configurable. Lubuntu is the newest memember of the official Ubuntu family and it is even faster and smaller than Xubuntu. It uses a desktop environment called LXDE wich is made specially for being small, lightweigt, visually appealing and configurable. Lubuntu also includes some preinstalled software that is among the lightest and fastest of its type, but with the options to install any program usable in Ubuntu. I like the graphical user interface in Lubuntu. It is very uncluttered and has an elegance of simplicity. It could also be configured to be very pixel efficient for my 800 x 600 screen. It seems very intuitive to me and after having used it for a while in a virtual machine on my MacBook Pro, I felt ready to install it on my iBook.

Installing Lubuntu on a PowerPC Mac

There are at least three ways of installing Lubuntu for PowerPC: The Live CD, the alternate installer and the minimal install (mini.iso). For most people, downloading the Live CD for PowerPC Macs (https://help.ubuntu.com/community/Lubuntu/GetLubuntu), burning it to a CD, starting your Mac from the CD by holding down the C key at startup and then answering the relevant questions in the installer will work fine. And it looks good too.

It might be a good idea to read the PowerPC Known Issues (https://wiki.ubuntu.com/PowerPCKnownIssues) and the PowerPC FAQ (https://wiki.ubuntu.com/PowerPCFAQ) before installing to avoid suprises. The page (https://help.ubuntu.com/community/OSXApplicationsEquivalents) comparing OS X programs to open source alternatives might also be interesting.

Installing, even if you can’t


Unfortunately, the CD-ROM drive in my iBook is starting to fail, wich means I got lots of I/O errors and bad sector alerts when trying to install from the Live CD. I also tried the alternate install, wich does the same as the Live CD, but with a text based installer, and it left me with the same problems. I also tried using a USB stick, but since booting from USB does not work unless Mac OS X 10.4.7 or newer is installed on a PowerPC Mac, I was unable to boot from USB. Not even an external Superdrive would work. I then tried the mini.iso (available here: https://help.ubuntu.com/community/Installation/MinimalCD), and since the mini.iso is so much smaller (27 MB compared to 700 for the live CD), there are less sectors for the CD-ROM to read, and I had more success.

This page (https://help.ubuntu.com/community/Lubuntu/Documentation/MinimalInstall) describes how to install from the mini.iso. The method described on this page is slightly out of date, but just boot from the CD (after having burned the mini.iso to it) by holding down C and just wait. The installer will start by itself, but if it doesn’t, type install. Answer the questions and if you do not know the answer, just go with the default. At one point, the installer doesn’t show any progress bar and seems to have freezed up, but just wait and after a quite long time, a progress bar will appear and it will continue to show you that it is still alive.

Fixing a few problems after install

There are a few things in Lubuntu 12.04 that does not work properly out of the box on the PowerPC platform. First, there is a crossed out Chromium symbol in the application launcher in the lower left side of the screen. This is because Chromium, wich is the standard browser in Lubuntu, is not available for PowerPC. In stead FireFox is installed by default. (Personally, I would switch to FireFox anyway, since I don’t trust the company that earns its money by tracking peoples browsing to not track my browsing if I am using their browser. I also like the user interface in FireFox better than Chromium.) To get rid of the symbol and replacing it with FireFox, direct your cursor to the panel on the bottom of the screen (the grey line) and press the F12 key. (F12 is the same as right-click in Lubuntu and F11 equals middle-click.) This will bring up a context menu. Choose «Panel settings». In the following window, choose the tab «panel programs». Then choose the second line on the left «Program launcher» and then press the «Edit» button. Choose the strange symbol and press the «Delete» button. Then press the little triangle on the left of «Internet» and choose «FireFox» and press the «Add» button. Now you have a FireFox launch button on your bottom panel.

The other thing that does not work, at least not for me, is AbiWord. It either crashes when I start it, or after a few seconds of running. I uninstalled it with the Lubuntu Software Centre and installed LibreOffice Writer in stead. It might not be as lightweight, but it doesn’t crash. (Of course, you might want to keep AbiWord, hoping it will be less buggy after the next update, and just add LibreOffice Writer to have something that works untill it gets fixed.) To get rid of AbiWord and install LibreOffice Writer, choose Lubuntu Software Centre from the System Tools submenu of the menu on the left of the bottom panel (click the Lubuntu logo and then move to System Tools and Lubuntu Software Centre.) Click «Installed software» and click on «AbiWord» and press the «Remove from the system» button. Write your password and it will be removed. It might still be visible in the «Installed software» even after you get a message that it is uninstalled. This bug should be fixed in 12.10. Then choose «Get software» and «Office» and scroll down to LibreOffice Writer. If you want the rest of LibreOffice as well, you could choose «LibreOffice» in stead, this will install all the LibreOffice components available for PowerPC. Click «Add to app basket» and then click «App basket» on the top right and then «Install packages» and write your password and wait. If you want to open LibreOffice Writer it will now be in the «Office» submenu of the Lubuntu menu on the lower left of the screen. If you want to add it to your program launcher next to FireFox, just direct your cursor to the bottom panel, press F12 and repeat what you did to add FireFox, but go to Office and add LibreOffice Writer in stead.

You might also want to install some Extensions to FireFox. My favourites are AdBlock Plus, Facebook disconnect, Google disconnect and Twitter disconnect. These extensions will make your surfing ad-free and you will avoid Facebook, Google and Twitter collecting data about wich sites you surf. I don’t really want these companies to sell information about my websurfing to anybody. Think about enabling ads for those sites you really want to support, since ads are what makes many sites economically viable.

Macintosh Quadra 700 hardware specifications

Link back to the main Macintosh Quadra 700 page

quadra.gif

There are lots of hardware specifications for the Quadra 700 on the internet, so at this time, I find no point in making my own, but in stead I present links to different sites with specifications here.

Sleipnir pÄ norsk og svensk

Jeg har de siste mÄnedene brukt nettleseren Sleinir fra Fenrir Inc. Det geniale med den er at man kan ha haugevis av faner liggende Äpne i ulike fanegrupper og navigere mellom dem ved hjelp av hÄndbevegelser pÄ styreplata. Det er en effektiv mÄte Ä navigere rundt pÄ nettet, sÊrlig om man ofte besÞker de samme sidene. Om man bruker ulike operativsystemer og smarte telefoner og dingser kan man synkronisere bokmerker mellom de ulike plattformene ogsÄ. De har versjoner av nettleseren for Mac, Windows, Android, iOS og Windows Phone.

Da jeg var inne for Ä oppdatere nettleseren til nyeste versjon sÄ jeg at Fenrir spurte etter frivillge til Ä oversette Sleipnir til ulike sprÄk. I og med at jeg liker nettleseren og ville likt den enda bedre pÄ norsk tenkte jeg at jeg kunne hjelpe til. Neste versjon av Sleipnir for Mac vil derfor komme med norsk og svensk lokalisering. PÄ denne siden kan man se hvilke andre lokaliseringer Sleipnir kommer med.

Where to find software online for the Macintosh Quadra 700

Link back to the main Macintosh Quadra 700 page

This is a list of links to sites where software comaptible with a Quadra might be found. I will add to it when I discover new sites, so this list will hopefully grow with time. Most of the software is useable on any Mac (or emulator) running System 7 or Mac OS 8. There are also some System 6 programs that might be usable in System 7 and 8. For use with a Quadra, the software must either be "68k" or "Fat Binary". "68k" indicates that the program is coded for 680x0-processors used in the early Macs. "Fat Binary" means that the program has code for both 680x0 and Power PC processors. "PPC" programs will only run on Macs with a Power PC prosessor.

Which operating system software to use on the Quadra 700

Link back to the main Macintosh Quadra 700 page

about.gif

The Quadra 700 (and 900) can run any system version between system 7.0.1 and Mac OS 8.1. Which system version is right for you is a matter of which features you want/need, how much RAM you have installed, wether you would consider buying a system version on CD or stick with what you have on diskettes, CD(s) or what is available for download from Apple and wether you are planning to use software which require a certain system version. The older system versions demand less RAM and hard drive space, but they have fewer of the modern features built in, so for machines with enough RAM, a newer system might be better. Many of the newer features are available even to older systems with additional innstallation of control panels, extensions and other software.

Allthough a Quadra can run Mac OS 8.0 and 8.1, these system versions demand lots of RAM, so unless you have 20 MB or more, they might not be very useable. They also use a lot of hard disk space. I have got 8 MB of physical RAM (16 with RAM doubler) and currently I am using H-7.6.1. H is Apple's code for norwegian software. Unfortunately 7.6 and/or 7.6.1 isn't available for free download from Apple and since 7.5.5 is more or less the same system but with fewer of the additional "modern" features as part of the system, it is probably the best choice if you haven't got a CD with 7.6.1. You just have to install a few more extra system extensions and control panels. Even with 7.6.1 there are a couple of extras needed to be installed for maximum useability in the modern world and on the internet. System7today.com have this page of ultimate updates for Mac OS 7.6.1 on 68k Macs.

I have also tried H-7.1 (which I have original diskettes for) and H-7.5.3. My idea was trying to use the smallest and fastest system possible since my Quadra only has 8 MB of physical RAM (16 MB with RAM doubler). My main reason for changing from H-7.1 to H-7.5.3 was that I had trouble setting up MacTCP and therefore had trouble connecting to other computers and the internet. In 7.5.3 it is possible to use open transport, and with it DHCP, which means that there is no configuring of IP adresses and such needed. (I'm slightly IP challenged and I have a dynamic IP adress with my internet provider.) With both 7.1 and 7.5.3 I used Tyler Sable's guide to installing a "modern" system 7.0.1 and System 7.5.5. However I found system H-7.5.3 with Sable's additional "modern" features quite unstable with lots of bombs and sudden stops in the middle of processes, especially network related processes, so I thought I would give H-7.6.1 a new chance. So far, H-7.6.1 has been much more stable than H-7.5.3. Unfortunately, the norwegian version of 7.5.5 isn't available for download, but H-7.5.3 is.

The one feature I would love to have available that comes in Mac OS 8.1 is the ability to read HFS+ volumes. It would make it easier to access some software that is actually compatible with system 7 and 68k macs, but that is distributed on a HFS+ volume in the form of disc images. (I have come across a few of those.) It would also make burning CDs for use on the Quadra from other machines much easier and faster. I am now using an external SuperDrive through the USB 1.1 port of my iBook Clamshell (G3/300 MHz) to burn CDs for the Quadra, since the version of Disk tools in Mac OS 10.6 "Snow Leopard" on my MacBook Pro has no support for creating disc images or burning CDs with HFS-volumes. Mac OS 10.4 "Tiger" on my iBook Clamshell supports HFS volumes. After I got my internet connection working (I needed open transport on a CD to do that), I have been using FTP to transfer files between my Quadra and my MacBook Pro.

Here are some information about different system versions compatible with the Quadra:

Essential additional hardware

Link back to the main Macintosh Quadra 700 page

…for connecting to modern networks and the internet

Farallon.gif

Farallon AAUI RJ-45 Ethernet transceiver

Because the Quadra 700 and Quadra 900 were made while there were two standard ways of connecting to an ethernet network (Coax with terminators in the ends and RJ-45), Apple chose to think differently and develop a third type of port called AAUI-15 for the built in ethernet. There is an article on Low End Mac about the AAUI Ethernet connector and it's history. Since RJ-45 Ethernet has become the modern standard for wired networking, an ethernet adapter is more or less a necessity if you want to connect your Quadra to the internet or network it with modern Macs or PCs. The other way to network would be to use LocalTalk, wich can be useful for networking with Macs without Ethernet ports (pre-Quadra Macs). There's an article by Adam Rosen on Low End Mac about networking with older Macs.

I found a used Farallon AAUI RJ45 Ethernet Transceiver on ebay that didn't cost much, even with shipping from the USA to Sweden. It works fine and connects my Quadra to the internet connection shared from my MacBook Pro. It's the one you see on the right here. There is also some types wich have two RJ-45 ports that allow you to connect more than one computer to your Quadra.

…for connecting to a modern screen

VMAC-1.gif

Viewsonic VMAC-1

The other essential hardware addition to a Quadra 700 or Quadra 900 is an adapter from Apple's DB-15 display port to a standard DE-15 VGA port to connect the Quadra to a modern screen. In the past, the manufacturers of screens for Macs included cables for their screens. The trouble is that the Quadra would use how certain pins on the plug are connected in the screen cable to figure out wich screen resolution, colour depth and what refresh frequency to use, so even if you have a cable that connects an older screen to your Mac and the port on the back of the screen is a VGA port, you can't use this cable with another screen with a VGA port if it is not capable of using the exact same resolution, colour depth and refresh frequency. I tried using a cable that came with my Radius 2 page greyscale display (21 inch) to connect my Samsung SyncMaster P2770HD screen/TV to the Quadra and the result was that I could only use 16 greys in 1152 x 870 and the screen looked very blueish. Even if it is possible to get a Mac DB-15 male to VGA DE-15 female adapter "block" such an adapter would not be of much use since there is no way of knowing wich resolution and colour depth it is made for when you buy it, except if it is stated by the seller. It might not match your screen at all and you will have no flexibility if you need to connect to other screens with other resolutions in the future.

After some research, I found that the Viewsonic Universal Macintosh Adapter VMAC-1 that has DIP swithces for changing resolution and sync mode would probably be one of the best options. I found this user guide online. I got one on ebay that was unused and in its original packaging. It has DIP switches for setting the resolution and sync mode, but these can be hidden by a lid when set. With this adapter I have been succesfully using 16 colours with a resolution of 1152 x 870 and a 75 Hz refresh frequency on my Samsung screen. The screen seems happy with the sync mode set to either Separate, Composite or Separate+Composite. Lately, I have switched to 832 x 624 to get 256 colours. (I have the stock 512 kB of Video RAM, so I can't get more than 16 colours at 1152 x 870.) 16 greys was fine on the Radius screen, but many programs seem to anticipate either black and white or 256 or more colours. My Samsung SyncMaster handbook does list Mac 640 x 480, Mac 832 x 624 and Mac 1152 x 870 in a "Table of standard signal modes" together with horisontal and vertical refresh frequencies and polarity, so maybe that is why it has worked so well for me. It doesn't list the other resolutions the Quadra 700 support and I haven't tried them either. "If it ain't broke…"

For more information about the internal graphics card in the Quadra 700 and Quadra 900, the article by Dale Adams, the original designer of the Quadra 700 and 900 built in video capabilities is the best place to start. There is also an article by Glenn Fleishman on TidBits discussing the advantage of the on board video of the Quadra 700 over later computers in the Apple lineup. Where to find these things in Europe

Places to look for items like these in Europe would be amazon.de, amazon.co.uk (they do not ship electronics to the rest of Europe for fear of mismatched power outlets, so if you don't live in Britain, use amazon.de in stead), finn.no, blocket.se, dba.dk, ebay.se, ebay.co.uk, ebay.de &c There are lots of cheap items from the USA on ebay. These can usually be shipped quite cheaply if they don't weigh much. If they are not too expensive, you don't have to pay customs either. For more costly or heavier items, it is usually better to shop in Europe since there is no customs inside the EU and shipping is less expensive. It's also better for the environment not to ship lots of heavvy goods around the world.

Network Time setup for Central European Time with summer time

Link back to the main Macintosh Quadra 700 page

Network Time is a control panel that sets the time and date of your Mac with the help of a network time server. You can download it from system7today.com. Network Time comes preconfigured with some time zones in America and it can use the settings of your "Map" control panel. Unfortunately, it doesn't work with the settings from the "Map" control panel if the name of the control panel is anything else than "Map", so unless you use some sort of english localisation this feature doesn't work. But it is easy to set up manually.

cet.gif

This is how to set it up to use Central European Time:

  1. Open the Network Time control panel and write "time.euro.apple.com" in the Time Server box
  2. Choose "Add/change Time Zones…" from the Time zone pull down menu.
  3. Click "New"
  4. Write "Central European Time" or whatever you like in the "Zone name" box.
  5. Click the "Universal time +" radio button
  6. Write 1 in the h box.
  7. Click "Use Daylight Savings Time".
  8. Click the "Add" radio button.
  9. Write 1 in the h box.
  10. Choose Begin: "Last" "Sunday" "in" "March" at "01.00" and End: "Last" "Sunday" "In" "October" at "01.00" as shown in the picture above. This wil automatically set Central European Summer Time at the right time.
  11. Click "OK" twice.
  12. Choose "Central European Time" (or whatever you called it) in the Time Zone pull down menu.
  13. Click "Set Time" to set time or choose a time interval at wich time will be set by writing in the "Every… hour" box.

EM's Quadra Pages

Welcome to my Quadra 700 pages!

quadra.gif

This is a collection of information and links concerning the Macintosh Quadra 700. Some of this info will also be useful for people with other Macs from the early 90s and for people emulating a Quadra with BasiliskII on a modern computer. Especially Quadra 900, Mac IIci and Mac IIcx users might find some nugget of relevant info, since the hardware of these machines resemble the Quadra 700 a lot. The Macintosh IIcx and IIci use the same case design as the Quadra 700 and can be upgraded to a Quadra by switching out the motherboard. The Quadra 900 was released at the same time as the 700 as its big brother and lives in a larger case, but is otherwise very similar to the 700.

I wrote these pages in HTML with Simple Text on the Quadra 700 for maximum compatibility with older browsers and minimum load times. All pictures are kept relatively small in size for the same reasons. Sometimes less really is more. If some letters look strange, you should set the character encoding in your browser to "ISO Latin 1", "Western European" or some other name indicating the "iso-8859-1" encoding.

The dates in paranthesis after a link is when I updated the page lastly, in dd.mm.yyyy format. I think I might have the newest pages on the internet designed on a Quadra 700. Of course, I also have my WordPress blog, but I want to keep these pure HTML pages for people using older browsers and slow connections. I am not hosting these pages myself on the Quadra (it might possibly be done with MkLinux and the LAMP stack if the machine's RAM is maxed), but the excellent Transmit FTP program let me upload it to my web hotel.

Format anxiety

I am a long time Mac user and have been through many transitions during the years. The 68k to PowerPC processor transition was allmost unnoticable for me as a user. When I switched from my Performa 450 with System 7.6.1 to an iBook Clamshell in 2002, the iBook ran all my programs just fine, even if many of them were from 1994 and for 68k processors. Everything continued to work well even after upgrading the Clamshell from Mac OS 9.0.4 to 9.2.2. No backwards compatibility problems at all.

The transition to Intel was harder. My iBook died when I stumbled in the power cord in 2006, so I bought myself a MacBook for Christmas. (I was able to ressurect the iBook in 2008, though.) I didn't use OS X on the iBook, so that was a new user interface to master and in addition to that, none of my old programs could be run on the MacBook since Intel Macs didn't support Classic Mode even if I was running Mac OS X 10.4 "Tiger". Luckily Apple supplied some great free programs in the iLife suite and I soon downloaded OpenOffice and some alternative browsers. I got a copy of AppleWorks 6 and that helped me slightly further (although not as much as anticipated, since it would not read my old ClarisWorks 2.1 documents, only my quite new AppleWorks 5 documents).

In 2009, I upgraded my MacBook from Tiger to Snow Leopard, wich was a huge improvement even if it was a bit buggy in the start (this is the only time I have been an early adaptor of a new Mac OS) and in 2010 my MacBook died and I bought a MacBook Pro. (Later I was able to ressurect my MacBook's hard drive, so even if it lacks a battery and optical drive, it works. I use it for wireless backup and for ripping DVDs with an external optical drive.) I also bought Finale PrintMusic, a light version of the Finale music notational program, since I was a heavy user of Finale from 1989 untill 2006, but OS X broke it for me at a time when I couldn't afford bying a new version for OS X.

Yesteryear, I got iWorks from my mother and took a day to convert all my old ClarisWorks 2.1 documents to AppleWorks 5 on the iBook, convert all of those with AppleWorks 6 on my MacBook Pro to AppleWors 6 documents and convert those further to Numbers and Pages, in addition to my AppleWorks 6 documents. I find it quite ridiculous that Pages will read Microsoft Word files in all types of legacy formats, but not AppleWorks and ClarisWorks documents unless they are AppleWorks 6. It is sort of Apple's way of giving the finger to their own long time customers at the same time as they are giving a helping had to long time Microsoft users.

AppleWorks 6 also had much better support for legacy Microsoft formats than legacy Claris/Apple formats. Even if Apple is constantly going forward and trying to promote itself as the company of innovation, most people actually like to be able to open their own documents, even if they were made some years ago. Being able to open old documents made with Microsoft software, but not with Claris/Apple software is totally insane if Apple want people to use and trust their software. It gets even more ridicolous when the ability to open your documents in older versions of the same program is not available either, since the newer Macs are unable to open pre OS X applications, so if you don't have an old Mac lying around, you are totally unable to convert your old documents to newer formats. If you go from a 386 IBM clone with Windows 3.11 and Microsoft Office to a MacBook Pro with Mac OS X 10.6 "Snow Leopard", then iWorks will import all your documents just fine. But iWorks won't open your ClarisWorks 5 documents made on a PowerPC Mac in 2003.

After these experiences, I am very cautious about saving my documents in Apple's own formats. Even if Microsoft has also changed document formats many times to force customers to move to newer versions of their software, they still make sure that their new software will open their own legacy formats, so their own users don't loose the ability to open their documents produced in earlier versions of the same software. Any software company with respect for their users would do this when moving to new document formats.

I am not really willing to bet my documents on Apple's continued support for their own formats, so I have converted most of my text documents where formatting is not important into Rich Text Format (RTF). Rich Text Format has been with us since the dawn of time and is still a widely supported format that includes support for bold, italics and other simple formatting, as well as less problems with using letters outside the English alphabet across platforms and text encodings, wich is quite important if most of your documents are not in English. I have yet to come across a word processor unable to open RTF documents.

For documents with page formatting, like term papers and such, I have made PDFs of them in additon to converting them to open document format (.odt) wich is usable in LibreOffice, OpenOffice, NeoOffice, AbiWord and most other open source word processors. I had to convert to Microsoft Word format first in Pages and AppleWorks 6 and then open those word doceuments in NeoOffice to convert them to open document format.

I have also converted all my old ClarisWorks spreadsheets into Numbers documents quite recently, but I am now thinking that I will convert those as well to open document format (again I will be exporting to MS Excel and then use "Save as.." in NeoOffice. I converted my old MacPaint, MacDraw and ClarisWorks draw and paint documents to PDFs a long time ago, so all of my old concert posters and such are still with me.

There are many good reasons to use the open document formats. First, they are widely supported by a lot of software that is under active development by people in the open source movement. Even if it is not such an old and widely supported format as RTF, more and more programs are including support for opening and saving in open document format. As I am not really willing to buy proprietary software to do things free software does just as well, it seems a good choice both for my wallett and for not becoming to dependent on the whims of large companies like Apple and Microsoft.

Another reason to use open document format is that whatever operating system you are using, there is software easily available that will open these documents. This means that you can mail these documents to anybody, and they will be able to read them easily, and if you in the future should decide to change operating system, there is no need to convert your documents, since software that read these files are available for all the major operating systems. With the direction of both Mac OS and Windows going towards forcing the otherwise brilliant tablet and smart phone GUIs onto desktop and laptop users, with more or less lock-in to their own app stores, and less and less availability of the file system, I am getting more inclined towards changing my operating system. I have started exploring Linux distributions in virtual machines with the VirtualBox, but that is another story.

Beste nettleser for Mac OS 10.3.X?

NĂ„r jeg nĂ„ kjĂžrer Mac OS “Panther” 10.3.9 pĂ„ min iBook Clamshell betyr det at det er mange nettlesere jeg ikke kan benytte nyeste versjon av, fordi de nyeste versjonene som regel krever Mac OS 10.4 “Tiger” eller nyere. Dette er et problem fordi nettet er i utvikling og eldre nettlesere ikke nĂždvendigvis stĂžtter nyere nettsiders design. Nyeste versjoner av Safari, FireFox og Internet Explorer som kan kjĂžre i Mac OS 10.3.9 er alle utgamle, sĂ„ dermed er ikke de noe alternativ.

Den vanligste nettleseren til Panther ser ut til Ä vÊre Camino. Den anbefalles i alle fall av flere nettsteder. Nyeste versjon jeg har fÄtt tak i som fungerer i Panther er 1.16.11. Den er ikke sÄ alt for gammel. Camino fungerer, men det gÄr ikke sÊrlig fort og med en gang den skal kjÞre JavaScript, som f.eks. Google translate Widgeten pÄ mostad.eu stopper den opp og gir feilmeldinger.

PÄ iBooken min kjÞrer Opera 9.64 merkbart raskere og den tÄler JavaScript bedre. Den er heller ikke sÄ voldsomt gammel. I begge nettleserne har jeg forsÞkt Ä fÄ nettleseren til Ä ta minst mulig plass fra selve nettsiden ved Ä skru av unÞdvendige verktÞy- og bokmerkelinjer pÄ toppen av skjermen. OgsÄ der kommer Opera bedre ut fordi jeg kan skru av absolutt alt untatt én linje med navigasjonsknapper, felt til Ä skrive nettadresse og sÞkefelt, mens Camino viser en linje til bokmerker selv om man ikke har lagt noen der. (Klikk pÄ bildet til hÞyre for Ä se hva jeg mener i litt stÞrre detalj.) Dessuten er knappene pÄ den Þverste linja hakket stÞrre enn i Opera. PÄ en skjerm med 800 x 600 punkter er det Ä spare kanskje 30-40 punkter pÄ toppen av skjermen noe som betyr litt for sÞrfeopplevelsen. Skjermen er uansett liten i forhold til designet pÄ de fleste moderne nettsider.

Et tredje nyligere oppdatert alternativ er iCab. I likhet med Camino er iCab noe tregere enn Opera pÄ min iBook i Panther. Derimot er den veldig god Ä ha i OS 9, der den er den mest oppdaterte nettleseren jeg har funnet. Den ble aktivt vedlikeholdt for MacOS 7-9 inntill for et Är eller to siden.

Kommentar fra 2023: Jeg ville ikke kjÞrt et utgammelt operativsystem som ikke lenger fÄr sikkerhetsoppdateringer eller utgamle nettlesere som heller ikke fÄr det pÄ en maskin jeg kobler opp til internett. Det oppdages nye sikkerhetshull i programvare hele tiden og hvis man ikke fÄr de nyeste sikkerhetsoppdateringene er maskinen ens lett Ä kompromisse. Dette kan skje automatisk til alle med nettlesere med disse sikkerhetshullene og trenger ikke Ä vÊre mÄlrettet mot deg som enkeltperson. Hvis man vil kjÞre utgammel programvare bÞr man ikke koble maskinen til nettet.

Nytt liv i legendarisk maskin

I 2002 overtok jeg Mammas iBook “Clamshell” G3. Det er “Revision B”-modellen fra Ă„r 2000. Den har en 300 MHz G3 prosessor, 64 MB RAM, 6 GB harddisk, innebyggd 56k-modem, plass til AirPort WiFi-kort, en USB utgang, lydutgang og CD-ROM-spiller. Og en 800 x 600 punkters 12-tommers fargeskjerm med ATI Rage Mobility L skjermkort med 4 MB VRAM.

I 2006 snublet jeg i strÞmkabelen sÄ strÞmforsyningen kortstlutta, sÄ da batteriet var tomt 20 minutter senere var iBooken dÞd. I alle fall fram til 2008, da jeg gjorde en hjemmesnekra reparasjon av strÞmforsyningen og fikk liv i den igjen. Riktignok var lÞsningen ustabil og det var bare sÄ vidt jeg klarte Ä holde strÞmforsyningen sammen, men det virka.

I 2011 kom jeg over en billig erstattningsstrÞmforsyning pÄ tyske amazon. Der fant jeg ogsÄ en billig 512 MB RAM-modul og et billig AirPort-kort. Uten Ä bruke spesielt mange kroner var plutselig iBooken mer funksjonell enn noen gang. DÞdt batteri og liten harddisk til tross.

Hvorfor gidde?

Da jeg i jula 2006 kjĂžpte en MacBook fikk jeg en maskin med Mac OS 10.4 “Tiger” og Intel Core 2 Duo prosessor. Det var et langt steg fram fra iBooken med OS 9 og G3 prosessor. Men det innebar ogsĂ„ at min gamle programvare ikke lenger virka. Jeg fant nyere versjoner eller alternative programmer for det meste, men jeg har ennĂ„ ikke klart Ă„ finne et program for redigering av lydene pĂ„ min Roland synthmodul for OS X og det er ogsĂ„ noen OS 9-spill som aldri kom for OS X. Jeg har ogsĂ„ noen programmer og spill for OS X som er skrevet for PowerPC-prosessorer og som aldri kom i “Universal” (PowerPC og Intel) eller Intel-versjon. De kan brukes via Rosetta, den innebyggde PowerPC-emulatoren i OS X, men det gĂ„r tregere enn Ă„ bruke disse programmene pĂ„ en PowerPC-maskin.

iBooken er en ikonisk Mac og en av de fire Macene jeg har eid siden 1994, sĂ„ av rent nostalgiske grunner er det hyggelig Ă„ fĂ„ liv i den. Jeg tenker jeg skulle bruke den som en “kjĂžkkenmaskin” til nettradio, podkaster og nettsĂžrfing i tillegg til den nevnte redigeringen av lyder pĂ„ synthmodulen min og et og annet retro-spill. Dessuten appelerer det til nerden i meg Ă„ skvise ut det siste av bruksverdi av en 11 Ă„r gammel datamaskin. Et lite hobbyprosjekt.

Jeg tenkte jeg skulle dele erfaringene jeg gjĂžr meg med iBooken. Kanskje det er noen andre retro-Macere i Skandinavia som kan ha glede det. ForelĂžpig har jeg i tillegg til Mac OS 9.2.2 ogsĂ„ Mac OS 10.3.9 “Panther” innstallert. Har ogsĂ„ lurt pĂ„ Ă„ oppgradere til Mac OS 10.4 “Tiger” (det er vistnok mulig selv om Tiger ofisiellt ikke fungerer pĂ„ maskiner uten FireWire) eller Ă„ prĂžve en Linux distribusjon. Uansett hvordan det blir med dette sĂ„ er maskina vel sĂ„ funksjonell som mange nettbooks der ute og har trolig et langt og produktivt liv foran seg.

Finne noter pÄ nettet

Tenkte jeg skulle dele noen linker til steder pÄ nettet der man kan finne gratis noter:

I tillegg har mange biblioteker digitalisert mye av sine samlinger av noter etter hvert, sÄ sjekk ut bibliotekenes nettsider.

PDF-verktĂžy for Mac OS X og noter

Jeg holder pÄ Ä skÊnne noter, artikler, notater og kompendier jeg har pÄ lÞse kopier. Hver gang jeg har flytta har jeg bÊrt med meg kilovis med papir og permer og ordnere og hvert sted jeg har bodd har jeg brukt masse plass pÄ Ä ha ting stÄende og samle stÞv som jeg er allergisk mot. Jeg beholder selvfÞlgelig ting jeg vet jeg kommer til Ä spille igjen pÄ papir, men alt det andre resirkulerer jeg etter Ä ha skÊnna det. Med noter og artikler og kompendier som PDFer er de lette Ä dele med andre og lette Ä lagre og transportere. Om man vil spille eller lese gjennom kan man gjÞre det fra skjerm og sÄ kan man skrive notene ut igjen om man bestemmer seg for Ä bruke de til et prosjekt. Jeg har ogsÄ fÄtt mange skÊnna noter, bÞker og artikler fra andre. Mye var lagra som separate GIFer, TIFFer, JPGer eller PDFer for hver side eller hver sats. Jeg holder pÄ Ä samle bÄde mine egne skÊnna sider og de jeg har fÄtt fra andre i PDFer og en del av dette har jeg lagt opp pÄ Petrucci Music Archive (IMSLP).

I og med at jeg har skÊnna en del har jeg ogsÄ funnet et par gode verktÞy til Ä behandle PDFer pÄ Mac som jeg tenkte kanskje andre ogsÄ kunne ha glede av Ä vite om. Det ene er programmet Yep. Det koster noen dollar, men er verdt det. Det bruker jeg til Ä samle lÞse bildefiler jeg eller andre har skÊnna til PDFer og til Ä legge til tags i metadata. Selv om jeg har organisert alle notene mine etter komponist og med tittel og utgiver i dokumentnavnet kan det vÊre nyttig Ä hurtig kunne finne f.eks. nederlandsk musikk for fiolin, traverso og continuo. Det er fort gjort Ä legge til et par tags nÄr jeg uansett bruker Yep til Ä samle enkeltsidene til PDFer og dermed har jeg mange flere ting jeg kan sÞke opp notene mine pÄ enn bare tittel, utgiver og komponist. En annen praktisk ting er at om man lager PDFer i svart/hvitt sÄ rensker Yep ut grÄtoner fra bakgrunnen i de originale skÊnna filene, sÄ dermed blir gulnede ark mer lesbare som PDFer enn de var pÄ papir og om man skriver de ut igjen blir de faktisk bedre enn originalen man skÊnna i noen tilfeller.

Det andre verktÞyet jeg har funnet er opensource-programmet PDFsam. Med det kan jeg kombinere flere PDFer til én. Yep klarer ikke det, sÄ jeg trengte et annet verktÞy. Tidligere har jeg fÞrst gjort PDFene om til TIFFer vha Preview og sÄ samlet de i Yep, men det er rimelig klÞnete og funker ikke spesielt bra med flersidede PDFer som skal samles. Man kan ogsÄ dele opp PDFer eller rotere sider med PDFsam. Det kan vÊre greit om f.eks. et helt dokument har annenhver side opp ned (typisk om man skÊnner bÞker).

© Einar Mostad 2010 - 2025. Content is licensed under the terms of CC BY SA except code which is GNU GPL v3 or later.
Made with GNU Emacs, Org-Static-Blog, and Codeberg Pages on GNU/Linux.