Score:0

Cannot run Chromium as another user from the command line

mu flag

Chrome is available from the command line:

$ chromium --version
Chromium 108.0.5359.124 snap

But not for other users:

$ sudo su otherphil
$ chromium --version
/user.slice/user-1000.slice/session-3.scope is not a snap cgroup

In addition, in the error message above, 1000 is the id of philippe (the user who can use Chrome), not otherphil (the user trying to use Chrome).

Actually I can reproduce this issue on a fresh Ubuntu Server 22:

$ sudo apt install chromium-browser
(...)
$ chromium --version
Chromium 108.0.5359.124 snap
$ sudo adduser otherphil
(...)
$ sudo su otherphil
$ chromium --version
/user.slice/user-1000.slice/session-3.scope is not a snap cgroup

How can I make Chrome available for all users?

philippe_b avatar
mu flag
Might be related with https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1951491
Score:1
mu flag

This is due to how sessions are managed. Login as otherphil directly through SSH works (instead of connecting as philippe, than sudo su otherphil) does the trick.

What works:

$ ssh philippe@myserver
$ chromium --version # Works

What doesn't work:

$ ssh otheruser@myserver
$ sudo su philippe
$ chromium --version # Error!

Originally answered here: https://forum.snapcraft.io/t/not-a-snap-cgroup-error-when-running-chromium/33243/3?u=pbernard

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.