2

One can autostart an application such that it launches on session start with an xdg desktop file in ~/.config/autostart (or /etc/xdg/autostart).

But my application (a python/gtk/webkit/html5 app) when autostarted has a unity (and a unity-2d) launcher icon that is a gray question mark, even though:

  • when I find it in dash, the dash shows the icon I specify in my main desktop file (in /usr/share/applications)
  • when I launch it from dash, the launcher shows the icon I specify in my main desktop file
  • when I add it as a favorite, the launcher shows the proper icon

There are two cases where I get the gray question mark icon:

  • autostart
  • launch from terminal (this use case is not essential though and doesn't involve the desktop file anyway: but should/does ubuntu have an xdg desktop file interpreter à la #!/usr/bin/desktop or something)

So: what is needed such unity (3d/2d) launcher panel shows the icon specified in an autostart desktop file?

  • do u try to put the Icon on usr/share/pixmaps/ and use it from there ? – eyadof Jan 10 '12 at 0:41
  • I just did, but with the same result. – kyleN Jan 10 '12 at 1:35
  • Maybe xdg autostarts occur before unity launcher instead of being launched by unity? – kyleN Jan 10 '12 at 1:46
1

The desktop file had an Exec line that launched a bash script. That bash script in turn launched a python script that was the main application.

The fix is to change the desktop Exec line to launch the main application python script directly. When that is done, the launcher panel shows the correct icon identified in the desktop file in all use cases: autolaunch, launch from terminal, find and launch in dash.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.