Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a python application which behaves in two different ways. When started without arguments, it runs in CONFIGMODE and shows a Configuration GUI (pygtk). When started with an argument it runs in APPMODE.

Then I have two Bash-Scripts (configmode and appmode) to start. One starts my app with arguments, the other without. For each script I have created a .desktop file in ~/.local/share/applications with different icons.

But even when I start appmode.desktop the Unity launcher shows the icon from configmode.desktop.

I also use Kupfer to launch applications. And when configmode is already running Kupfer also thinks that appmode is already running.

Therefore I wonder how Unity and Kupfer identify which .desktop file to use?

My goal is to see the icon from the .desktop file which I used for startup in the Unity launcher. How can I achive this?

share|improve this question

2 Answers 2

Unity uses the BAMF Application Matching Framework. I don't know about Kupfer.

share|improve this answer

I think the problem might not be in the desktop files themselves, but in any of the following:

  • .ui file: If you're using a user interface file, you might have set the icon_name property for the main window. In such a case, I'd say that the icon in the .desktop file is not used.

  • pygtk code: Similarly to the .ui file case, you might have set the icon for the main window using gtk.Window.set_icon_name, gtk.Window.set_default_icon_name or similar.

My advice is to programmatically set the icon for the main window when the application is started using gtk.Window.set_icon_name or gtk.Window.set_default_icon_name depending on the arguments passed to the application.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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