I have always known that those nice icons you can add to gnome dash-to-dock or
menus where created as .desktop
files somewhere.
Today I decided to solve an annoying bug that led Seafile to render giantly on
my full HD notebook, and after some research I discovered that was due to QT5
being too smart on enabling HiDPI on my laptop screen.
So first, I had to create a shell script to trigger the seafile-applet
command passing to it some environment variables first. The script is here:
https://raw.githubusercontent.com/tiagoprn/bin_public/master/seafile-applet.sh
Then, I copied it to /usr/bin
and set it as executable with chmod.
That part done, now I needed to edit the Seafile applet desktop launcher to use
the shell script instead of the usual command.
Then I learn that the .desktop
files are all kept here:
/usr/share/applications
Then, it was easy.
All I had to to was change seafile.desktop
to launch my shell script:
[Desktop Entry]
Name=Seafile
Comment=Seafile desktop sync client
TryExec=seafile-applet.sh
Exec=seafile-applet.sh
Icon=seafile
Type=Application
Categories=Network;FileTransfer;
Another lesson learned. :)
IMPORTANT: for your user the .desktop
files are read from: ~/.local/share/applications
.