I created a .desktop launcher:

#!/usr/bin/env xdg-open

[Desktop Entry]

The shortcut is attached to my Unity launcher and shows the correct icon. When I click on the icon in the Unity launcher, it briefly flashes and then opens up a terminal and the icon is "merged" with all my other open terminals. Hence, the icon for my .desktop changes into the standard terminal icon.

My scripts only exists when pressing Ctrl-C, otherwise it keeps running in the background. How can I force the launcher's icon to stay with my custom icon instead of showing the standard terminal icon? I cannot change:


since my script shows useful output and I want it to show in the terminal, just with a separate custom icon in the Unity launcher, instead of Ubuntu interpreting it as just another termianl.

Any ideas?

  • 1
    Possible duplicate of How can I give a script its own icon in the Unity launcher? – pomsky Nov 18 '17 at 18:23
  • Already tried that. Does not work in Ubuntu 17 – goocreations Nov 18 '17 at 18:24
  • @goocreations What exactly does not work? Did you encounter any error messages? Please add this information to your question (edit)! – dessert Nov 19 '17 at 22:11
  • Nope, no error with the script. It simply still shows the terminal icon after launch, instead of my custom one. – goocreations Nov 20 '17 at 5:50

Because this is a script which you require to run in the terminal, it will appear as such.

To avoid this you would need to create a custom GUI application which embeds a terminal widget, within which you run your script, and you can then specify a custom window title, icon, etc… as well.

Due to how window management and terminal applications work, there is no easy way to do this. A custom GUI app would be needed.

  • Agghh. Thought there would be an easier way. Don't want to create a GUI app for a simple script. – goocreations Nov 18 '17 at 18:02

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.