#StackBounty: #command-line #scripts #icons #plank Plank icon to startup script

Bounty: 50

The idea is to start a script at startup and display a specific (“custom”) icon with that in the Plank dock.

For example, here: Startup command to execute a desktop file and show its icon, where the script uses the terminal: the idea is to show the custom icon instead of the terminal icon.

This question is close to this: Apply icons to bash scripts, but different, as the answers under that (use a .desktop file) will not work if the command/script/desktop-file is run at startup.

It seems that at startup the final command/script is run without taking into account the Icon= line in the .desktop file, no matter the method used to run the .desktop launcher.

I have tested many answers under this question (Running a .desktop file in the terminal) but they will not keep the icon specified in the .desktop file if that is run at startup.

For the icon to be used, the launcher has to be executed:

  • from an Application-launcher like Dash, Whiskermenu, Kickoff, Slingshot, or

  • by a command inside a similar application that can run commands; that is, commands like gtk-launch appname, when there is an appname.desktop in ~/.local/share/applications,or

  • from the dock icon (‘keep in dock’ enabled)

but the launcher/script will not do the trick when run at startup.

(Alt-F2: gtk-launch appname shows the desired icon; gtk-launch appname at startup ignores it.)


UPDATE:

THIS answer provides a solution for Unity, but it doesn’t work as such for Plank.


Get this bounty!!!

Leave a Reply