Unity always shows all devices in launcher when CD is inserted

Bug #1103593 reported by Dave Vree on 2013-01-23
114
This bug affects 26 people
Affects Status Importance Assigned to Milestone
Unity
Undecided
Unassigned
unity (Ubuntu)
Undecided
Unassigned

Bug Description

In Ubuntu 12.10 the default behavior when inserting a CD (or a USB memory stick, etc.) is to add a list of mounted devices to the launcher. This takes up a lot of extra space for me as I usually have several Samba mounts. Furthermore, I don't need or want to see my CD in the launcher.

I can click right on the mounted devices and select "Unlock from launcher", but the next time I insert a CD they're back. Disabling this "feature" should be an option in 12.10. I believe it was an option in 12.04 via CCSM. Thanks.

Dave Vree (hdave) on 2013-01-23
affects: udisks2 (Ubuntu) → launcher (Ubuntu)
Martin Pitt (pitti) on 2013-01-24
affects: launcher (Ubuntu) → unity (Ubuntu)
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity (Ubuntu):
status: New → Confirmed
Matpen (matpen) wrote :

The "Unlock from launcher" feature is apparently equivalent to UUID-based blacklisting. Therefore it applies only to that specific device. I tried disabling this feature by removing 'unity://devices' from "com.canonical.Unity.Launcher favorites" using gsettings but this seems to have no effect.

JHosier (jhosier) wrote :

Can someone please fix this bug. It is very frustrating.

As a network administrator I have about a dozen network shares mounted in /etc/fstab.
I also create distributions and other CD/DVDs all of the time.
Everytime I insert a CD/DVD in my PC the Unity Bar gets filled with all the mounted network shares which I have to unlock from the lanucher, only to re-appear a few minutes later when the next CD/DVD is inserted. So far today this silly routine has had to be done more than a dozen times!

After googling I can see that some people suggest blacklisting all devices as a workaround.
I cannot simply block all devices from appearing on the unity launcher as this would blacklist my other hard drives.

Now that this is a confirmed bug, can it please be fixed.

Thank you.

JHosier (jhosier) wrote :

Further to my previous comment I should note that this problem is appearing when I eject the CD/DVD not when I insert the CD/DVD.

Also, unlike the originator of the bug, I am very happy that the CD/DVD drive appears in the unity launcher and I know that the drive can be easily removed from the unity launcher by right clicking on it and choosing "Unlock from Launcher" and this will blacklist it until you run the command to reset the settings

Nicolai Froehlich (nifr) wrote :

While it is possible to blacklist UUIDs as described in this stackoverflow answer:

http://askubuntu.com/a/195998

It's not possible to prevent new (i.e. USB, Disc ) devices from showing up in the launcher automatically.

The experimental-tab / possibility to disable all devices in CompizConfig Settings Manager (CCSM) stated in the second answer isn't available in my version of compizconfig-settings-manager (0.9.10) on Ubuntu 13.10.

http://askubuntu.com/a/62015

A generic solution to disable the devices would really be appreciated.

Nicolai Froehlich (nifr) wrote :

Okay rolling back - problem still exists. Now external devices are still shown at the bottom of the launcher!

Problem is NOT solved for me.

JoseLuisTriana (theunfor) wrote :

In Ubuntu 14.04 haven't found a way to solve this issue... unless this bug is a wontfix...

Changed in unity:
status: New → Confirmed
dafreez (dafreez-gmail) wrote :

I recently moved form 12.04 to 14.04 (through a clean upgrade, keeping home partition) and so dar this is the only serious bug I have encountered.
It affects me both opn removing an audio-cd as noted above (have not tested with other optical media) and, more annoyingly, on removing my android (google nexus 4) phone.

Detailed description of setup and behavior:
- I have a number of NFS shares on a home server that are mounted through fstab.

-After installing Trusty these all appeared in the launcher. Right clicking one of them and selcting 'unlock form launcher' removed them all.

- On inserting a CD or plugging my phone in nothing happens in the launcher (ideaally these devices would show up, but no big deal)

- On ejecting the disc or plugging out the phone all the other mounted drives, including nfs shares reappear in the launcher and need to again be 'unlocked from launcher')

- Pendrives do behave correctly: they show up seperately in the launcher on being inserted, and dissapear upon 'eject' either via filemanager or ddirectly through the launcher.

- I also have to USB-3 hard drives that show a mixture of these behaviors. They appear seperately in the launcher upon turning them on (good). If I select unmount in the filemanager they remain visible in the launcher and dissapear upon turning them off. However, if I select 'safely remove dirve, either through the launcher or filemanager, they briefly dissappear and reappear along with all the NFS shares in the launcher.
NB: this last behavior seems related to Nemo being deafault file manager. With Nautilus there is no 'safely remove' option either in launcher or in file manager, instead I can 'unmount' through launcher and then turn the drive off.
All other behavior appears identical regardless of default file manager.

dafreez (dafreez-gmail) wrote :

NB;

Ideally it would be possible to selectively have certaion volumes show up in the launcehr. For instance: I woould want my phone, pendrives, and usb hard drives to show up, but not my NFS shares.

dafreez (dafreez-gmail) wrote :

NB2: This seems related to

#1060484 (fixed)
#792085
#1206298

dafreez (dafreez-gmail) wrote :

I've created a workaround until this is fixed:

Creat a textfile 'foo' in directory 'bar' with the following script:
#!/bin/bash
while [ 1 ]
do
 gsettings set com.canonical.Unity.Devices blacklist "['-']"
 sleep 1
done

make it executable

run "crontab -e" from terminal

add a line as follows:
@reboot /path/to/bar/foo

Artur (artur.) wrote :

Quite annoying: launcher filled with icons, after connecting external drive with partitions or a few pendrives last icons are gone. I tried following suggestions:

gconftool --set /apps/compiz-1/plugins/unityshell/screen0/options/devices_option --type=int 0

gsettings set com.canonical.Unity.Devices devices-option "Never"
Key"devices-option" does not exists.

dconf-editor - Browse to apps - nautilus - desktop
Key does not exists.

ccsm - Unity plugin - experimental - Show Devices combobox to Never.
Option "experimental" does not exists, there is no "Devices" in "Launcher".

gsettings set com.canonical.Unity.Devices blacklist "['-']"

Nothing works :-(

JHosier (jhosier) wrote :

Dear Fellow Annoyed Ubuntu Users :-)
After giving up checking on this thread for some months, assuming that it would never get fixed, I checked it again this morning.
After reading the comment above from dafreez I tested it and it nearly worked. Thank you for the suggestion dafreez.
This is what I found after testing the suggested script.
It seems as though the gsettings command needs to be run as the user which is logged on.
If it is run as root it does not work when you login as yourself.
Also the crontab suggestion did not work for me. The command @reboot did nothing for me.

However, after a bit of tweaking I got a workable solution that is OK for me.
I followed the first part of the suggestion and created a file in my home area called /home/jhosier/stop-network-mounts-unity
In the file I placed the lines as above, namely:

#!/bin/bash
echo stop-network-mounts-unity running > /home/jhosier/test.txt
while [ 1 ]
do
 gsettings set com.canonical.Unity.Devices blacklist "['-']"
 sleep 1
done

Then in order to make it run when I login I created a file named /home/jhosier/.config/autostart/stop-network-mounts-unity.desktop

The file contained the lines:

[Desktop Entry]
Type=Application
Exec=/home/jhosier/stop-network-mounts-unity
Hidden=false
NoDisplay=false
X-GNOME-Autostart-enabled=true
Name[en_GB]=stop-network-mounts-unity.desktop
Name=stop-network-mounts-unity
Comment[en_GB]=stop-network-mounts-unity

This means that when I login to Ubuntu 14.04 with Unity, the file /home/jhosier/.config/autostart/stop-network-mounts-unity.desktop is executed which in turn calls the script /home/jhosier/stop-network-mounts-unity, which in turn writes to the file /home/jhosier/test.txt confirming that the script is constantly running in the background.

Now when I insert a CD it appears in the Unity Launcher Bar and I can open and mount the CD.
Then when I eject the CD (whether pressing the eject button on the CD drive or right clicking on the icon in the Unity Launcher Bar and choosing Eject) the CD gets ejected and all my network shares are populated into the Unity Launcher Bar as before, but after about 1 second they then get removed from the Unity Launcher Bar.

I hope this helps you too.

Artur (artur.) wrote :

Unfortunately setting blacklist to "['-']" in com.canonical.Unity.Devices does not work for USB drives, pendrives, partitions, etc. They are not removed from launchbar. I used dconf editor to watch the blacklist: it forgets gathered uuids right after disconnecting external device, so they appear again and again.

I found following workaround: there is com.canonical.Unity.Launcher.favorites parameter, the same Matpen tried to remove value 'unity://devices' from. It is enough to move 'unity://devices' to the end. The auto-USB-device icons - 3,5,10, whatever number is - still appear but at end of launchbar, so they do not disturb other icons. It is possible icons of new applications, not pinned to launchbar, can still be added after USB icons, so ensure 'unity://running-apps' and any other value occurs before 'unity://devices'. Unity remembers order of the values, after system reboot too.

If developers find a time to deal with this problem: IMHO the best solution is ONE icon, one icon to rule them all... Depending on user choice it may be pinned to launchbar or appear automatically after mounting first resource at /media/<user>. Hovering cursor or clicking it should expand list of all mounted devices to the right to allow to browse selected one (if more than one). A number of connected media on the icon would be a nice addition.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers