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.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity in Ubuntu.
https://bugs.launchpad.net/bugs/1103593

Title:
  Unity always shows all devices in launcher when CD is inserted

Status in Unity:
  Confirmed
Status in unity package in Ubuntu:
  Confirmed

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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/unity/+bug/1103593/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to