I made a custom .desktop file, and put it in /usr/share/applications
and it can be found when searching in the GNOME search bar and started like that.
It then appears as an icon in the GNOME Dock, but unlike most other applications, it cannot be locked to the Dock once it is running. What is needed for an application to be able to lock it to the Dock when it is running?
Remark 1: in Unity (Ubuntu 16.04), the items "lock to Launcher" and "add to Dash" are available in the right-click menu (unlike in GNOME), but the item disappears from the Dock as soon as it is closed.
Remark 2: with
dconf write /org/gnome/shell/favorite-apps
and
gsettings set org.gnome.shell favorite-apps
I can get it there by rewriting the contents of the Dock. (I still ask this because I want it to make easier for colleagues to lock it to the Dock).
For completeness I add below the contents of the file: /usr/share/applications/rdesktop-icaros.desktop
[Desktop Entry]
Name=Rdesktop to Icaros
Exec=rdesktop -d WINAPPS -g 1280x1024 icaros
TryExec=/usr/bin/rdesktop
Icon=preferences-desktop-remote-desktop
Type=Application
Categories=GTK;GNOME;Utility;
.desktop
file marked executable? – pomsky Feb 5 '18 at 15:54