Ubuntu – Partitions unlocked from Unity launcher show up again after starting gparted

12.10gpartedlauncherpartitioning

I'm on Ubuntu 12.10 and dual boot. I have put the Windows partitions to the launcher blacklist so that they won't show up there (via "unlock from launcher" option). These partitions will then appear in the blacklist viewable in dconf-editor.
But when I start gparted all blacklisted partitions reappear in the launcher ( and get lost in the blacklist as well).

Is this intended or a bug (I would guess it's a gparted bug, as I don't get the result when I start gnome-disks)? Does anyone know how to solve this?

Best Answer

This only happens when the partitions are not already mounted when you start gparted.

The workaround is to:

1) Mount all partitions on the drive or device

2) Start gparted and allow it to scan the device

3) Then unmount the partitions.

This prevents the icons from appearing in the Launcher and keeps the partitions in the blacklist, although in most cases its more trouble than simply removing the icons after they appear.

I browsed the code for both Gparted and Unity and here's a very simplified summary of what is happening.

1) Gparted scans the system and builds a map object listing partitions.

2) Unity detects this and sees the unmounted volumes in the map as newly added volumes, even though they are already listed in /proc/partitions and other places.

3) When Unity detects a new volume, it creates an icon for it and adds it to the Launcher. Part of the process of adding the icon is to remove the volume from the blacklist.

A closely related issue is that Unity removes removable devices from the blacklist on eject. If you blacklist a removable device from the Launcher, it will always come back.

I can understand how this behavior may be needed for phone and tablet interfaces, but I see the bug as a need for a little more analysis of these features. The problem for many power-users on the desktop is that logical partitions are seen by Unity as removable devices. If you plug in a usb hdd with, say, two primary partitions a dozen logical ones, you can blacklist the primary partitions but the logical partitions will always show up on the launcher with a usb device icon.