In 11.10 some launcher icons are displayed as question marks

Asked by Alexander Winizki on 2011-10-25

On my desktop, this happens in two cases:
1) if I start a java program like eclipse IDE or Oracle sqldeveloper
2) if I start dvbcut - a program that I have compiled from source.
Is there a way to assign an icon explicitely?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu unity Edit question
Assignee:
No assignee Edit question
Solved by:
James McArthur
Solved:
2011-11-10
Last query:
2011-11-10
Last reply:
2011-11-10

You can make a .desktop file in /usr/share/applications and it will appear in dash, you can then drag the icon to the unity panel

Alexander Winizki (awinizki) said : #2

This helped with eclipse, but not with sqldeveloper. The sqldeveloper icon now appears in the dash, but when I start it from there, the icon in the launcher is still displayed as a question mark. The tooltip of the icon reads "win0", while the tooltip for the eclipse icon reads correctly. Here are the contents of the .desktop files I created:

[Desktop Entry]
Name=Eclipse
GenericName=Eclipse Java IDE
Comment=Eclipse Java IDE
Categories=Utility;
Exec=/home/eclipse/eclipse %U
Icon=/home/eclipse/icon.xpm
StartupNotify=true
Terminal=false
Type=Application
X-GNOME-FullName=Eclipse Java IDE

[Desktop Entry]
Name=sqldeveloper
GenericName=Oracle sqldeveloper
Comment=Oracle sqldeveloper
Categories=Utility;
Exec=/home/awi/Downloads/sqldeveloper/sqldeveloper.sh
Icon=/home/awi/Downloads/sqldeveloper/icon.png
StartupNotify=true
Terminal=false
Type=Application
X-GNOME-FullName=Oracle sqldeveloper

Note, that in case of eclipse the java VM is started by a native executable file, while sqldeveloper is a cascade of shell scripts which eventually starts th java VM.
dvbcut is installed on a different machine, so I will test it this ecening or tomorrow.

Alexander Winizki (awinizki) said : #3

Just installed JEdit using synaptic and it shows the same problem as sqldeveloper: correct icon in the dash, question mark in the launcher, the tooltip for the launcher icon reads "win0"

I managed to get Oracle SQL Developer to work correctly from dash by adding the following line to my sqldeveloper.desktop file located in ~/.local/share/applications/

StartupWMClass=oracle-ide-boot-Launcher

This was found by using,

xprop WM_CLASS

and clicking on the opened SQL Developer Window.

Alexander Winizki (awinizki) said : #5

OK, this can be considered a general workaround for any Java program, although I think that eventually a more user- friendly solution should be found. At least this workaround should be mentioned in the Unity Guide. Note also, that on the machine I am using right now, the option to keep the icon in the launcher is offered only if the StartupWMClass property is set in the .desktop file.