Quantcast
Channel: Active questions tagged 22.04 - Ask Ubuntu
Viewing all articles
Browse latest Browse all 4427

How can I get snap applications to run in VNC session?

$
0
0

I have a PC running Ubuntu 22.04 that I sometimes run headless and connect to through VNC (TigerVNC server, xfce4 desktop). Since upgrading from 20.04 to 22.04, some of my applications, such as Firefox and Inkscape have changed to Snap. Normally, when I use my PC with a monitor and keyboard and mouse, all still works fine, but when connected through VNC, I can no longer open these applications. In the GUI Applications menu, they've just disappeared, and when I try to start them from the command line, I get the following error:

/system.slice/system-vncserver.slice/vncserver@1.service is not a snap cgroup

Searching online, I found a possible solution here:

xhost +env DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus firefox

but unfortunately I was unable to get this to work (the xhost + part seems to work as it should, but the command after that just gives me the same error about not being a snap cgroup). This may have to do with my $XDG_RUNTIME_DIR not being set, but I'm not sure how to solve that.

In another post, related to a similar issue, the answer (https://askubuntu.com/a/1419532/1646198) suggests to disable cgroups, citing this discussion, but this answer also mentions "many permission denied errors", so I'm not sure whether this would be the way to go.

Does anyone know how to fix this properly?

EDIT: When I substitute $XDG_RUNTIME_DIR in the above env command with /run/users/1000, Firefox starts, but with a ton of "permission denied" errors:

update.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/gimp/2.0/help /usr/share/gimp/2.0/help none bind,ro 0 0): cannot open directory "/var/lib": permission deniedupdate.go:85: cannot change mount namespace according to change mount (/var/lib/snapd/hostfs/usr/share/xubuntu-docs /usr/share/xubuntu-docs none bind,ro 0 0): cannot open directory "/var/lib": permission denied[Parent 122148, Main Thread] WARNING: Unable to connect to ibus: Could not connect: Connection refused: 'glib warning', file /build/firefox/parts/firefox/build/toolkit/xre/nsSigHandlers.cpp:167(firefox:122148): IBUS-WARNING **: 16:13:46.960: Unable to connect to ibus: Could not connect: Connection refused

EDIT 2: Even with monitor, keyboard and mouse attached, things don't run as they used to: when I right-click an SVG-file and select 'Open with Inkscape', the Ubuntu spinner shows up for a while, and then... nothing happens. I can now only open SVG-files directly from Inkscape (i.e. first start Inkscape, then use File - Open..., or Ctrl-O).

Any ideas anyone?


Viewing all articles
Browse latest Browse all 4427

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>