I want to run a script at startup that would use a custom icon that should appear in Plank dock.
For that I have created a .desktop
file in ~/.local/share/applications
that runs the script (see all the details in the question linked above) and that also contains the line Icon=
that specifies the custom icon I want.
If I execute the desktop file with double-click the Icon=
line is not followed and the custom icon is not used in Plank.
The .desktop
file does its job if I execute it from an application launcher or with the command gtk-launch <.desktop>
(as suggested here).
But I want its effects to be triggered automatically at startup: I want the script set under Exec=
line to be run but also I want the icon set under the Icon=
line to be shown in the dock.
If I simply add the path to the desktop file to the startup list, it doesn't do anything at startup: the script is not run at all.
If I add to startup list the command gtk-launch <.desktop>
the script is run but the icon is not used.