Changes underneath the surface – Diodon 1.2.0

I am glad to announce that another Diodon version has been released today with mainly changes underneath the surface such as improving API for plugin developers but also fixing some annoying bugs.

Here in detail what has changed:

  • Fixed issue which could cause Diodon not starting when upgrading to a newer version (#1347181)
  • Fixed issue that under certain desktop environments Diodon was not always added as startup application (#1348989)
  • Improved plugin API (#1323947, #1309893, #1324309)
  • Cleaning up dependencies for easier integration into other distributions (#1348994, #1310360)
  • Updated translations

You can either download the new Diodon as a tarball or if you use Ubuntu or an Ubuntu based distribution use the stable ppa by running following commands:

sudo apt-add-repository ppa:diodon-team/stable
sudo apt-get update
sudo apt-get install diodon
# and for all Unity users there is also a scope
sudo apt-get install unity-scope-diodon

Thanks to everyone involved who made this release happen providing translations, reporting bugs, working on packaging, contributing source code or just simply using and advocating Diodon. Hope to see many more releases ahead.

Where is my Diodon monochrome icon?

You might have been using Diodon for a while and are wondering why there is no monochrome icon in your panel but instead a colored fish?

This could look like the following:


The icon does look a bit out of place in this specific theme. Unfortunately it is impossible to create an icon which suits every theme very well and if we would use a monochrome icon as the default it might not even show up on certain themes. That’s why we have decided to have a colored fish as the default panel icon as it is at least visible on all themes. For some commonly used themes we made some exceptions to use the monochrome icons directly.

However, in case you use a completely different theme and you would still like to have a Diodon monochrome icon there is a fairly quick way to do it.

You can use following command if you have a dark theme:
sudo ln -sf /usr/share/icons/ubuntu-mono-dark/status/22/diodon-panel.svg /usr/share/icons/[MYTHEME]/status/22/diodon-panel.svg

or this command with a light theme:
sudo ln -sf /usr/share/icons/ubuntu-mono-light/status/22/diodon-panel.svg /usr/share/icons/[MYTHEME]/status/22/diodon-panel.svg

In both cases replace [MYTHEME] with whatever theme you are using.

And last you need to update the cache of your theme with the following:
sudo gtk-update-icon-cache /usr/share/icons/[MYTHEME]/

Done. When you now close Diodon and open it up again a monochrome should be shown in your panel.

What I would recommend you though if you want to have a more permanent solution: Get in touch with your theme author and ask whether he would be willing to ship a monochrome icon for Diodon. In the end does the author know best what suits its theme and when the Diodon icons are shipped with the theme itself all users will benefit.

New but old and what changes for our CleverCleaner users

I have finally made it to migrate from my old webhosting provider to a new one. Nothing really to bother you about it but I am actually quite excited about my new webhosting and the many possibilities it gives me – so if you are looking for a new webhoster yourself you might want to have a look here .

While I was in the migration process have I changed a couple of thing which might be noteworthy. For all readers of “The Esite Code Log”-Blog, nothing has really changed for you though, beside a new look and feel. The blog and its philosophy remains the same as before. You can read more about it here.

More has changed for our CleverCleaner users though. Up to this point I maintained a single blog only for the CleverCleaner project. For simplicity and maintenance reasons have I decided though to consolidate the CleverCleaner blog with The Esite Code Log. So CleverCleaner is now treated as any other open source project I am involved in such as Diodon. This means there will be no more German translation of my blog posts for CleverCleaner (of course the German translation of the CleverCleaner tool itself remains as before) and all blog posts respectively news concerning CleverCleaner are tagged with clevercleaner on this blog.

So if as before you just want to subscribe to CleverCleaner news per RSS you can use this feed (just as a side node you can also use the same link and replace tag name clevercleaner with whatever tag you want to subscribe to, quite handy…). Beside news for CleverCleaner have I moved all more in depth descriptions and support information to the SourceForge project side mainly its wiki.

As it has been pretty quiet on this blog for a while do I hope that this change will decrease the time I need for maintenance and actually gives me more time to program on the different open source projects and in the end be able to post about it here… 😉

So therefore stay tuned.

Another Diodon milestone released

I am happy to announce another Diodon milestone 1.1.0 being released today.

You can download it as tarball here or if you use Ubuntu simply install it with the stable ppa:

sudo add-apt-repository ppa:diodon-team/stable
sudo apt-get update
sudo apt-get install diodon unity-scope-diodon

Due to changed dependencies will this version only be available for Saucy 13.10 and Trusty 14.04. Of course for older flavors there will still be an older version available in the ppa and also as tarballs.

This new version finally removes the limitation of maximum 100 items in the clipboard history and therefore brings with it a much more powerful Unity Scope integration and lots more.

If you want to know more in detail what has changed read the following posts:

This milestone is only a start creating the foundation for future improvements such as better integration into other desktop environments and more. I keep you posted.

With this in mind… Happy copying.

Mounting external usb drives automatically to its label

I am maintaining a file server running Ubuntu 12.04 in my company and was faced with the problem how to backup my system easily and on a low cost. As we have a huge amount of data and a rather slow internet connection I have made the decision to backup onto external hard drives which we will rotate frequently. In the end USB drives are still the cheapest option to backup your data… ;).

This blog post is though not about backing up your data but rather how to mount a USB drive automatically when connected to a server and access it with its label. This helped me to have a specific mount point for backup hard discs but won’t interfere if anyone else needs to connect another USB drive to the server. I am sure you might have different use cases for such feature as well. I have tested following configuration on a Ubuntu Server 12.04 but it should run on other Debian based operating systems as well.

OK this said let’s get started with the configuration then.

While I was looking for a tool to automatically mount my usb drives I found usbmount which was very simple and pretty much worked out of the box.

You can install it with the following command:
apt-get install usbmount

After usbmount is installed you can simply connect your usb drive to your server and usbmount will automatically mount it to /media/usb0. When an additional drive is connected it will be mounted to /media/usb1 and so on.

That’s a good start… but there is a draw back that every drive connected to the server will be mounted to /media/usb0 so we cannot really distinguish the different drives from each other. But usbmount has a feature for this that it creates a symlink for each drive in the folder /var/run/usbmount.

Such symlink can look like the following:
lrwxrwxrwx 1 root root 11 Apr 11 10:53 SAMSUNG_HM160HI_1 -> /media/usb0

The name of the symlink is built by using the vendor, model and partition number. So accessing the hard disc you simply access it using this symlink. This is great when you want to identify a specific hard disc. There is still one problem with it though when I want a group of hard disc to be accessed the same way I cannot really use this symlink.

So my idea was why not using the volume label and when I format hard drives I simply give all those drives the same volume label.

This can be done for instance with following format command using ext4 as an example (of course you can change ext4 to whatever file system you need):
mkfs.ext4 -L VOLUMENAME /dev/sdb1

Unfortunately usbmount doesn’t create any symlink of drives by its volume label. I therefore created following script to do this:

# This script creates the volume label symlink in /var/run/usbmount.
# Copyright (C) 2014 Oliver Sauder
# This file is free software; the copyright holder gives unlimited
# permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
set -e

# Exit if device or mountpoint is empty.
test -z "$UM_DEVICE" && test -z "$UM_MOUNTPOINT" && exit 0

# get volume label name
label=`blkid -s LABEL -o value $UM_DEVICE`

# If the symlink does not yet exist, create it.
test -z $label || test -e "/var/run/usbmount/$label" || ln -sf "$UM_MOUNTPOINT" "/var/run/usbmount/$label"

exit 0

This script you have to save to /etc/usbmount/mount.d/01_create_label_symlink and do not forget to add executable rights to it (chmod +x /etc/usbmount/mount.d/01_create_label_symlink). usbmount will run this script whenever a hard disc is connected.

Beside creating this symlink we also have to make sure that the symlink will be removed when the hard disc is disconnected. usbmount already has a script which removes symlink from /var/run/usbmount but we have to adjust it as it only removes the first link and not all. We can simply open the file /etc/usbmount/umount.d/00_remove_model_symlink and remove the break statement in line 19.

The script will then look like the following:

# This script removes the model name symlink in /var/run/usbmount.
# Copyright (C) 2005 Martin Dickopp
# This file is free software; the copyright holder gives unlimited
# permission to copy and/or distribute it, with or without
# modifications, as long as this notice is preserved.
# This file is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
set -e

ls /var/run/usbmount | while read name; do
    if test "`readlink "/var/run/usbmount/$name" || :`" = "$UM_MOUNTPOINT"; then
        rm -f "/var/run/usbmount/$name"

exit 0

So now when we connected a hard disc to the server there will be a symlink created /var/run/usbmount/VOLUMENAME and such path we can then use to point to for backups or whatever other use case you have.

Hope this was helpful. While working with usbmount I have found some more articles which might be helpful for you e.g. when you have issues with permissions or want to use ntfs as a file system.