Ubuntu: How do I prevent launcher from showing a drive icon for each mounted partition [duplicate]



Question:

This question already has an answer here:

I have a single disk composed of a few partitions, that I'd like to be mounted when I log in, just like the system partition is. I recently upgraded from 14.04 to 16.04. It was working fine before, by adding this command line to the start up applications

#!/bin/bash  /usr/bin/udisksctl mount -b /dev/sdb2;  /usr/bin/udisksctl mount -b /dev/sdb3;  /usr/bin/udisksctl mount -b /dev/sdb4;  

However now with 16.04, though it also mounts them, the file explorer (called 'Files') doesn't behave the same way at all: whenever I open a directory in one of the user partitions, the mounted drives are added as a separate icon in the unity launch bar, as though I inserted a usb key for example, instead of being part of the File application windows. It is very annoying to have multiple icons in the unity launch bar for basically explorer windows.

How can I go back to the previous situation ?


Solution:1

Using dconf-editor by blacklisting UUIDs solved the problem for me (i.e. worked for permanently attached storage / partitions).

If you don't have it installed already, run sudo apt-get install dconf-editor

Navigate to com â†' canonical â†' Unity â†' devices and enter the 'UUID-Label' (i.e. UUID and the Label of the drive separated by a single dash) of the mount in blacklist. The blacklist is an array of strings and any drive / partitions added to blacklist will not be shown in the launcher by default.

Just use the UUID of your mount inside the square bracket and the single quote marks. To know the UUID of drives run sudo blkid -o list or sudo blkid in a Terminal.

Below is an example of how the blacklist should look..

 ['6D7B3DA124CBC7E1-D', '9496GB2587CB06A8-H', '2AD455A9D425771B-G', 'FEBEE8ECBEE12E33-Windows-8']  

If any partition in your machine doesn’t have a 'label' assigned to it, use Gparted to assign a label first before blacklisting the UUID.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »