Upgraded from ubuntu 20.04 to 24.04 problem with snap programs

Today i did the long needed upgrade from 20.04 to 24.04 with a stop in 22.04. When i first got to 22.04 i discovered i could not run snap programs under different user id (will explain more later); and saw somewhere the 24.04 would fix this problem. With 24.04 i had the same problem AND a new problem - snap programs would not accept keyboard input.

I’ve been running snap chrom since 20.04 but to fix these two issues i reverted to debian for 3 key applications thunderbird, chromium and firefox.

In my setup i run two instances of firefox and chromium - i sandbox them via running them under different user id - however i’ve run into cgroup permission issues with 22.04 and 24.04 and after spending 2 hours an reading many different threads on the issue i did not find the magic to make it work. Even more fatal under 24.04 no snap program would accept keyboard input (ala chrome, firefox and thunderbird) which forced me to load these apps from debian pkgs.
I did find under my searching several threads suggesting this is a problem with ibus but while that is great i did not find a fix to actually make them work.

I’m reporting this as it should all just work even if my setup is bit weird.

Some more details while i am running ubuntu 24.04 i use xfce4 gui/interface via install xfce4 packages (not xubuntu). I also use gdm3 and Xorg

Kudos for thinking about security.

Snap packages have their own sandboxing already built-in, so using your own userid/cgroup method in addition seems redundant.

Is using your own method in addition necessary? If you use a Snap application normally (without your additional sandboxing), does the Snap application work properly?

Also, be aware that while we are willing to try to help, you have not actually “reported.” If you believe that you have discovered a bug, that should be reported to the Ubuntu bug tracker (we are not the bug tracker) with enough step-by-step detail for a developer to reproduce the issue in a test environment without your userid/cgroup customization.

I use sep user for multiple reasons; the point is that it doesnt work under different user id other than the one i logged in and i can’t find the steps to make it work.

In addition even if it did work since keyboard input is no longer accepted by snap application that makes them pretty useless.

As for reporting - someone did report the keyboard input issue but it is still not fixed.

i found a lot of gripes and posts on cgroup but no easy fix.

To be more precise the reason i run under different user id is that snap trys to sandbox between chromium and computer but it does not sanbox between chrome windows or tabs; the type of data i make available under one instance of chromium is different than the other hence the requirement (for me) to run two independent copies of chromium.

You should post this under the snapd category at forum.snapcraft.io where the snapd developers read along and might be able to give you some hints…

Did you consider using different profiles in you browser though? That should have a similar effect…

Don’t believe i have write access to that forum the restricted privs and all. Different profiles won’t help unless it makes the binary images sep so there is no way to share data between them within the data space.

If you are worried about the possibility to share data between profiles, why not use two independent installs of the app, that physically separates them:

But either way, if you want your issues fixed, you will have to post on the other forum, the snapd devs do not read here…

1 Like

I can try that i guess but first the keyboard issue would have to be solved; kind of a pain to write the text in a terminal and then paste it into the browser.

Isn’t that something you should address by using different browser profiles instead?

No a different profile run under the same binary will share data; anyway that is a red hearing as there are two issues (ignoring why i do things); first on my system all snap applications fail to accept keyboard input period. It is not unique to me because i found at least one ticket but i guess it isn’t common.

The 2nd issue is if you run any snap program under a different user id it will fail do to some cgroup problem and again I’ve not found a simple workaround to this issue. The fact that i am running two instances of a browser should not have been mentioned.