Oneiric 11.10 custom launchers cause icons to duplicate

Asked by JayBofMA

The .desktop launcher configurations that I have added to $HOME/.local/share/applications/ worked out of the box with the upgrade to Oneiric. But when I use any launcher that is not a default Unity launcher, a second icon is added to the launch bar. This happens for Nautilus, LibreOffice, Terminal, etc. Perhaps the customizations I have in place (context-sensitive menus for LibreOffice Icon for instance) are not compatible with the updated Unity Launcher? I found that certain Java App launchers I created, since there were none in 11.04, displayed the same behavior in 11.04. That odd behavior is exaggerated in 11.10. Even with reduced Icon size, icons on my Launcher can begin to fall off the bottom of the bar :-(. And this is at 1920x1080!

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu unity Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Viorel Lazar (viorelmarius) said :
#1

I've notice that too. It is very annoying

Revision history for this message
Viorel Lazar (viorelmarius) said :
#2

But the solution is to edit the *.desktop files in place ( usr/local/share/applications ), without copying in your home folder

Revision history for this message
George Fragos (fragos) said :
#3

Using 11.10 I dragged the TVtime icon from the DASH to the launch bar. When I click it a 2nd icon is created with a hover lable of "tvtime" which is used to launch TVtime. When I click the Home Folder icon a 2nd icon with a file cabinet image is created and a hover label "Files" is created before initiating nautilus. You would expect that the aps would be launched without creating a 2nd icon. Other launch icons initiate the appropriate ap without creating a 2nd icon. For what it's worth 11.10 was an upgrade and not a clean install.

Revision history for this message
JayBofMA (jayburrill) said :
#4

Viorel - Thank you for your suggestions. However, it is my understanding that editing these .desktop files in place will leave you at risk of losing them when the next upgrade comes down. My QuickLists from 11.04 remain after my Oneiric upgrade as I have the files in .local. And, the behavior that George relates would lead me to believe that the issue is not so cut and dry.

Revision history for this message
George Fragos (fragos) said :
#5

I'd edited the Home.desktop launcher in 11.04. I also upgraded my laptop to 11.10 but had never edited Home.desktop -- it performs as expected. Perhaps the answer in in that edited .desktop file, here's the Home.desktop which acts strangely:

[Desktop Entry]
Categories=GNOME;GTK;Core;
Comment=Open your personal folder
Exec=nautilus --no-desktop
Icon=user-home
Name=Home Folder
OnlyShowIn=GNOME;Unity;
StartupNotify=true
Terminal=false
TryExec=nautilus
Type=Application
X-Ayatana-Desktop-Shortcuts=Stick;Data;WIP;
X-GNOME-Bugzilla-Bugzilla=GNOME
X-GNOME-Bugzilla-Component=general
X-GNOME-Bugzilla-Product=nautilus
X-Ubuntu-Gettext-Domain=nautilus

[Stick Shortcut Group]
Exec=nautilus Desktop/Stick
Exec[en_US]=nautilus Stick
Name=Stick
Name[en_US]=Stick
TargetEnvironment=Unity
TargetEnvironment[en_US]=Unity

[Data Shortcut Group]
Exec=nautilus Data
Name=Data
TargetEnvironment=Unity

[WIP Shortcut Group]
Exec=nautilus WIP
Name=WIP
TargetEnvironment=Unity

Revision history for this message
Caron Wills (caron) said :
#6

For me, this issue is resolved by adding "StartupWMClass" to the .desktop file located in
~/.local/share/applications (or /usr/share/applications or somewhere else in some cases). You can find this value by launching the application and then opening a terminal and giving the command:

  xprop|grep WM_CLASS

And then clicking on the software's window. Then, add the value to the software's .desktop file (it will be the first value that appears in double quotes... add it without the quotes). After making the edit shut everything down and then logout. Upon logging in, you should only have one icon on your launcher. Unfortunately this edit is necessary for any custom launcher saved to the Unity bar that doesn't specify the value and seems to only be respected after logging out and back in.

To test, remove Firefox from the Unity bar. Launch it from terminal and select "Keep in launcher" by right clicking the icon that appears on the Unity bar. Shut Firefox down and restart it from the Unity bar and duplicates now appear. If you log out and log back in only one icon will be on the Unity bar (Firefox does have this value set).

To test with another application, I used Eidete. I installed and added it to my Unity bar. I confirmed the duplicate behavior upon launch. I made the edit to the Eidete .desktop file (located in /usr/share/applications). I logged out and back in and the duplicate items has disappeared.

This also affects Xchat (desktop file is at /usr/share/app-install/desktop/xchat:xchat.desktop) & CrossOver (individual desktop files for each part of the application are at ~/.local/share/applications) and likely many more.

I assume this is a value that applications will need to set when they create a .desktop or that it's a value that Unity will need to check for differently. I hope this helps resolve the issue.

Revision history for this message
Christopher Serella (9e9o1ko8b2f5-chris-0zxvj9hhx1hz) said :
#7

I had this problem also, I found the problem only occurred after i installed the CompizConfig settings manager from the software centre, (i wanted more work spaces).

To resolve this issue i have now removed the program and rebooted my system, all is now right in the gnome icons world.

Can you help with this problem?

Provide an answer of your own, or ask JayBofMA for more information if necessary.

To post a message you must log in.