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.

After Googling for hours, I didn't find any answer for the following issue and so glad if anyone could help.
I use Ubuntu 12.04 LTS with Gnome-shell 3.4.1. Consider the following simple program in file $HOME/a.py which I have made it executable:

#!/usr/bin/env python
import gtk
w = gtk.Window()
w.set_size_request(250, 150)
w.set_title("test program")
w.connect('destroy', lambda x: gtk.main_quit())
w.show_all()
gtk.main()

I've used MenuLibre to define a_run0.desktop in $HOME/.local/share/applications as below:

[Desktop Entry]
Version=1.0
Type=Application
Name=a_run
Comment=comm.
Icon=applications-development
Exec=/home/vsop/a.py
Path=
Terminal=false
StartupNotify=true
Categories=
Name[en_US]=a_run
Comment[en_US]=comm.

I made a_run0.desktop to be executable and I see a file named “a_run” in $HOME/.local/share/applications with proper icon (Icon=applications-development ). Running the program and using alt-tab, the icon is also shown in alt-tab menu quite well.

The question is, when I copy “a_run” file (actually a_run0.desktop) to $HOME/Desktop, the file is shown with correct icon in Desktop but after running it, the icon shown in alt-tab menu is changed to unknown-red-circle-icon with the name of original file “A.py” underneath.

What is made this problem and how can I see the defined-icon (in .desktop file) correctly in the alt-tab menu after running the program from $HOME/Desktop?

share|improve this question
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.