XFCE – Add Icons/Menu Items for Applications

debianlaunchermenuvncviewerxfce

I am running Debian (Stretch) with XFCE and many applications do not appear in the menu (in my case Whisker Menu). As an example, I often run remote sessions using VNC and at the moment I can only start the VNC viewer from the terminal. Ideally it would have an icon/item so that not only it would be visible in the menu, but I could also select it as a 'favourite' (easy-to-reach) item in the Whisker Menu.

Sticking with the example case, the VNC viewer is from an 'official' package:

$ sudo apt --reinstall install tigervnc-viewer
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 1 not upgraded.
Need to get 168 kB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://mirrorservice.org/sites/ftp.debian.org/debian stretch/main amd64 tigervnc-viewer amd64 1.7.0+dfsg-7 [168 kB]
Fetched 168 kB in 0s (642 kB/s)         
(Reading database ... 669847 files and directories currently installed.)
Preparing to unpack .../tigervnc-viewer_1.7.0+dfsg-7_amd64.deb ...
Unpacking tigervnc-viewer (1.7.0+dfsg-7) over (1.7.0+dfsg-7) ...
Processing triggers for man-db (2.7.6.1-2) ...
Setting up tigervnc-viewer (1.7.0+dfsg-7) ...

so is there a way to have it as an 'official' application in the Whisker Menu?

Best Answer

Basically, those menu items are .desktop files. The usual paths are:

~/.local/share/applications
/usr/local/share/applications
/usr/share/applications

To continue with your exemple:

[workstation] user ~ >cat /usr/share/applications/vncviewer.desktop 
[Desktop Entry]
Name=TigerVNC Viewer
Comment=Connect to VNC server and display remote desktop
Exec=/usr/bin/vncviewer
Icon=tigervnc
Terminal=false
Type=Application
StartupWMClass=TigerVNC Viewer: Connection Details
Categories=Network;RemoteAccess;

I suggest you first check if those .desktop files are well created.

If not stored in the same path, you can search for those with the following command: find / -name '*.desktop'

If you don't find those files, you can create those using the template from my vncviewer.desktop

Related Question