2

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?

2

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

1

You've to create .desktop file in /usr/share/applications directory if the entry is targeted to all user or in $HOME/.local/share/applications directory if the menu entry is just for you

Open your text editor and type something like the following:

[Desktop Entry]
Version=1.0
Type=Application
Name=<name-of-the-app>
Exec=<path-to-executable-file>
Icon=<path-to-icon-file>
Categories=<list-of-separated-categories>

What to change in the above template:

  • Name: put here the name of the application. This will be displayed in the menu
  • Exec: path to the executable file. For example /opt/clion-2016.2/bin/clion.sh
  • Icon: path to the icon file. Example: /opt/clion-2016.2/bin/clion.svg
  • Categories: semicolon-separated list of categories as Audio Video Network etc...

I recommand to open the other .desktop files to see as example how they have been made there are many iformation as the PATH of the icon directories or as the categories used as well

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.