How to get a "standalone" package to appear in Whisker menu search?

I have a “standalone” package that does not turn up when I (in Xfce) use the search in the Whisker menu.

QUESTION: How do I get it to turn up by search so I may click and start it?

Since a “standalone” may not be a proper term, I will explain exactly which package is in question.

Go to this page: https://www.realvnc.com/en/connect/download/viewer/linux/

One of the things you can download from there is “Standalone x64.” As downloaded, the name is VNC-Viewer-7.5.1-Linux-x64. It is a VNC client and works just like a Windows “portable” app. You just put it somewhere and start it (by GUI double-clicking or a command line invoke). Convenient.

BACKGROUND

You don’t have to read what follows to answer the question. Not part of the question.

I was driven to using RealVNC because the TigerVNC client (which I got when I installed TigerVNC server) misbehaved. It didn’t give me a mouse pointer and became totally unresponsive. I had to kill the process from Task Manager.

The RealVNC client, by the way, has a nice feature: proxy including SOCKS5 (File > Preferences > Proxy).

Suppose you have several computers in a LAN on the other side of the globe. You have SSH access to a host in that LAN. Then set up a “dynamic forward,” e.g.:

ssh -p 22000 -D 1081 -q tom@tommy.duckdns.org

where 22000 is the port through which the SSH server is exposed to the Internet, 1081 is the local port to be forwarded, tom is user name at the SSH server, and tommy.duckdns.org is your DDNS. (I lay that out in gory concreteness because when people give examples like ssh -p portnumber -D localport user@ddnsaddress, a beginner like me cannot instantly tell whether e.g. localportis an option name or something to be filled in.)

Anyway, after that, you can, in the RealVNC client proxy settings, enter 127.0.0.1:1081 for server, choose SOCKS 5 for type (leave user name and password blank). Then for VNC server address, you enter the address that is local to the LAN on the other side of the globe (as if you were there).

The alternative is obviously to set up one SSH “local forward” per VNC server.

In simple words: You need a desktop file (filename.desktop) in ~/.local/share/applications/, with content similar to this:

[Desktop Entry]
Name=Application Name
GenericName=Generic Application Name
Comment=Comment
Category=System;Utility
Exec=/path/to/binary
Icon=/path/to/icon
Keywords=keyword;
NoDisplay=false
Terminal=false
Type=Application

Then it will show up in whisker. Desktop Entry Specification

1 Like

Thank you. That worked out nicely.

My file named realvnc.desktop ended up having these contents:

[Desktop Entry]
Name=RealVNC Viewer
Exec=/home/luna/Program/realvnc/VNC-Viewer-7.5.1-Linux-x64
Icon=vncviewer
NoDisplay=false
Terminal=false
Type=Application

But a followup question. I expected to find lots of *.desktop files at the location, but the only one was thunar.desktop. How do other packages become visible to the Whisker menu? Why does thunar alone need a desktop file there?

Global path:

/usr/share/applications

It was probably modified by whisker? Modifications go to the local path.

1 Like

Thank you again. But still more questions if you don’t mind.

I add this line to my *.desktop file

Categories=Network;RemoteAccess;

after the model of the one for TigerVNC, which I found in /usr/share/applications.

But in Whisker menu, category Internet lists TigerVNC Viewer but still not my RealVNC Viewer.

QUESTION 1: Is there something else I have to do to get it listed in Internet?

QUESTION 2: Could I have put the RealVNC binary in /usr/bin and the desktop file in /usr/share/applications?

QUESTION 3: Would RealVNC be an AUR, Flatpak, or Snap (which I have only heard of and never tried)? It certainly didn’t get “installed” via any of the ways for those types. I just copied it to a location. What happens to RealVNC at an update? (Nothing?) Sorry I realize these are many question for QUESTION 3, but I don’t know exactly what I am supposed to ask.

You can check if the syntax is correct:

desktop-file-validate /path/to/filename.desktop

:notebook: No output means no error/warning.

or update the database:

update-desktop-database -v ~/.local/share/applications

Other than that, only reload the desktop session or simply re-login.

If you install it by hand globally, so no package manager is involved, it would be better to use /usr/local/bin and /usr/local/share/applications (create it if needed). The main reason is that the package manager will just overwrite files you have created if you put it in your paths.

If the file or folder names does not match by known paths by the package manager, then most likely nothing will be overwritten. Therefore, nothing happens, but you have to remember where you installed it if you want to remove it.

Btw. I would not say it is a bad path, but using /home/luna/.local/bin/VNC-Viewer-7.5.1-Linux-x64 would fit more the UNIX scheme.

1 Like

You could also use GUI tool menulibre to manage menu entries

right-click Whisker Menu icon and select Edit Applications

1 Like

That did return an error:

[luna@jar ~]$ desktop-file-validate /home/luna/.local/share/applications/realvnc.desktop
/home/luna/.local/share/applications/realvnc.desktop: error: file contains key “Category” in group “Desktop Entry”, but keys extending the format should start with “X-”

Now, I thought that was strange, because the Category line was lifted off vncviewer.desktop, which I’d found in /usr/share/applications/.

So I checked again, and the original went:

Categories=Network;RemoteAccess

Plural! When I fixed that, my desktop file turned up in search.

Thanks on the UNIX scheme convention. I want to do what others do.

Thanks. Looks very handy.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.