Knowledge Base
Searching in : Article
ID: AR06T01163
Applies to: NoMachine Server
Added on: 2022-06-13
Last Update: 2024-04-04
Print this article

Cannot open snap's installed applications in a NoMachine session

The initial problem has been fixed in NoMachine v.8.3, see the related Trouble Report: https://kb.nomachine.com/TR11T10698. Last updates to snap v2.61.3 introduce a new requirement which causes a similar behaviour. Issue is tracked here: https://kb.nomachine.com/TR03V11118


"A snap is a bundle of an app and its dependencies that works without modification across many different Linux distributions". (Ref. https://snapcraft.io/docs/getting-started).

In some cases, applications installed by snap cannot be started inside a NoMachine session, or even locally. Error is similar to:

/user.slice/user-1000489.slice/session-c3.scope is not a snap cgroup

This problem occurs on different Linux distributions, in particular it has been reported to NoMachine for Xubuntu 22.04 and Ubuntu 22.04,  and doesn't seem to depend on the desktop environment.

 

A possible workaround, tested on Ubuntu 22.04 and Xubuntu 22.04, is to configure the Grub boot loader as it follows.

1. sudo vim /etc/default/grub
change from:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash systemd.unified_cgroup_hierarchy=0"

This will disable cgroups v2, see also: https://lists.ubuntu.com/archives/ubuntu-devel/2021-August/041598.html

2. sudo update-grub
3. sudo reboot

 


 

As an alternative for GNOME desktop on Ubuntu (not for Xubuntu), it's possible to configure NoMachine to not start the session by D-Bus. This workaround has however the limitation that only one session can be started (either a connection to the physical desktop or a NoMachine virtual desktop).

1. For fresh Ubuntu 22 installations

sudo vim /usr/NX/etc/node.cfg
change from:
DefaultDesktopCommand "dbus-launch --exit-with-session gnome-session --session=ubuntu"
to:
DefaultDesktopCommand "gnome-session --session=ubuntu"

2. For Ubuntu 22 installations coming from an Ubuntu 20 installation

sudo vim /usr/NX/etc/node.cfg
change from:
#DefaultDesktopCommand "/usr/bin/dbus-run-session gnome-session --debug --session=ubuntu"
to:
DefaultDesktopCommand "gnome-session --session=ubuntu"



Another possible woraround, working for Xubuntu + Xfce and Ubuntu with Xfce installed is to set in /usr/NX/etc/node.cfg:

DefaultDesktopCommand "env DBUS_SESSION_BUS_ADDRESS=unix:path=$XDG_RUNTIME_DIR/bus /usr/bin/startxfce4"

This will work for all users connecting by NoMachine, but it has limitations when the same user runs more than one session.



Alternatively, edit for each user  ~/.profile and add:

export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"