2

I created a .desktop launcher:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Type=Application
Categories=Application
Terminal=true
Name=MyApp
Name[en_US]=MyApp
Comment=MyApp
Exec=/home/user/script.sh
Icon=/usr/share/icons/Humanity/categories/64/package_network.svg

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:

Terminal=false

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?

egmont
  • 8,225

1 Answers1

1

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.

dobey
  • 40,982