Skip to main navigation Skip to main content Skip to page footer

Linux Related Tips

Computer programs are fun to write, and well written computer programs are fun to read. One of life's greatest pleasures can be the composition of a computer program that you know will be a pleasure for other people to read, and for yourself to read.
Computer programs can also do useful work. One of life's greatest sources of satisfaction is the knowledge that something you have created is contributing to the progress or welfare of society.
Some people even get paid for writing computer programs! Programming can therefore be triply rewarding - on aesthetic, humanitarian, and economic grounds.
Donald E. Knuth

Special Themes

  • Hardware Related

    Some remarks to hardware I use.

  • Copying to Android

    File names have to be sanitized before copying them to an Android device. I did it with a batch job.

Migrating to UEFI

After almost 19 years of repeatedly updating and occasionaly copying my (formerly SuSE, now) OpenSuSE Linux from one harddisk to another, the point arrived where switching to UEFI was unevitable.

I must admit that I failed in getting grub2 to properly install. As a last resort, I installed a current OpenSuSE on my new disk and discarded anything but the /boot directory – shame on me! Then I copied my old installation. The only thing left was to make an entry for the efi partition in /etc/fstab.

UUID=ABCD-1234 /boot/efi vfat umask=0002,utf8=true 0 0

What I learned afterwards: OpenSuSE places several large files into the efi partition, so if you have a chance, you should make it larger than the minimum 100 MB.

Installing the Resynthesizer Plugin for Gimp on OpenSuSE Leap

This is probably too trivial to write about, but I'll do it anyway. The resynthesizer is an amazing tool for removing irregularities from pictures, e.g. people, skin defects and so on.

 

  •           Get the sources: git clone github.com/bootchk/resynthesizer
  • Enter the resynthesizer directory you have created and run autogen: ./autogen.sh
  • Take care for missing dependencies: I had to install gimp-devel with YaST and re-run autogen.
  • Run make: make
  • Become root and run make install.

You should be done, but I wasn't. I had to copy the Python scripts from the global Gimp plugin directory to my private Gimp plugin directory. You may lookup the plugin directories by editing settings within Gimp, clicking on the arrow at Folders (left, at the bottom), then plugins. My command was, at last:

cp /usr/local/lib64/gimp/2.0/plug-ins/* ~/.gimp2-8/plug-ins/

Then I had to restart Gimp. Oh, and before you ask: I had deleted pluginrc in my Gimp folder.

Undoing Unzip

Unzipping something into an already existing directory structure is not that easy to undo. Here is a way that works for me:

  • List the zip archive contents to a file:
    unzip -Z archive >remove.sh
  • Remove anything left of the file names from the file. I used emacs, marked the area and then used delete-rectangle. Alternatively, you may use a spreadsheat and the function Data/Text in Columns (I hope it is named like this in English, in german it is called Text in Spalten) with blank space as separator. Then you may delete the first columns.
  • Write rm to the left of the file names.
  • Invert the order of the lines. with emacs, you have to mark all the text and then say reverse-region. This leads to the directories being listed beneath the files contained therein.
  • Find lines ending with a slash. These are the directories. If you know that there will be nothing inside them except your unzipped files, you may change the rm at the beginning of the line to rmdir. If not, you will want to delete this line.
  • Save your file, make it executable and execute it.
    Spreadsheet users may save their file as csv with blanks as field separator.

Some words of caution:

  • Files overwritten by your unzip action are gone.
  • Making typos may have desastrous consequences
  • If you think that you may be still alive tomorrow, making an occasional backup of your data is a good idea, anyway.

Having NumLock switched on by default

From OpenSuSE 42.2 on, you have to use KDE system settings to permanently enable NumLock, /etc/sddm.conf and /etc/sysconfig/keyboard are not working.

Fighting with Akonadi (Kontact/KMail)

For years I have been using Kontact, unfortunately my satisfaction diminished. Recently, Kontact often shows "retrieving folder contents" for a long time, getting duplicated mail headings is quite common, etc.

What I have done so far:

  • Increased cache settings in ~/.local/share/akonadi/mysql.conf, unfortunately with no obvious effect.
  • Did akonadictl restart, akonadictl fsck, and akonadictl vacuum often. Sometimes Kontact would work for a while.
  • Ran akonadiselftest. This was helpful in discovering that I had to do mysql_upgrade on the akonadictl database (after all, I am upgrading my Linux installation since SuSe 7.3), as a system table was apparently missing.
  • Upgrading mysql did work the following way:
    • Find out the socket for mariadb. I found a link in ~/.local/share/akonadi/socket-gustav (gustav being my computer's name), following this link revealed the socket in the folder /tmp/akonadi-[...] with the name mysql.socket.
    •   Run mysql_upgrade on this socket: mysql_upgrade --socket=/tmp/akonadi-[...]/mysql.socket

    Unfortunately, this was not enough.
  • Exported settings and Calendar, unistalled Akonadi, Kmail, Korganizer, Kontact. Wiped configuration files from the platter. Installed again. This seems to help.
    Drawback: PIM Exporter does not export your account settings or mail filters. You have to document and reproduce your work elsewhere.