Snapped X apps over x2go

I am experimenting with running snapped apps remotely over x2go.

Running an x2go remote desktop and launching the snap from the application menu, just as you would on a local system, works fine.

However, X2go also has a “published applications” mode, which gives you a menu of applications on the client based on /usr/share/applications from the server. Launching an app like this gives you a window on your local X server, with no remote desktop.

I have tried copying the .desktop file from the snap (I tried color-picker and makemkv) into /usr/share/applications. This creates an entry in X2go’s published applications menu, but clicking it doesn’t launch the app. It also creates a second menu entry when using a remote desktop, which does work.

Does anyone have any ideas how I might make this work?

what are the desktop files you are copying, exactly?

This is an example, which I copied from /snap/color-picker/current/usr/share/applications/color-picker.desktop

I suspected as much. You need to copy the ones from /var/lib/snapd/desktop (or preferably figure out how to add that directory to what x2go searches).

Thanks. X2go looks in /etc/x2go/applications for .desktop files. This is a symlink to /usr/share/applications by default. I have changed this to point at /var/lib/snap/desktop/applications. X2go’s applications menu now just contains the snaps. However, launching them doesn’t work.