Open Bug 1767183 Opened 4 years ago Updated 16 days ago

Firefox fails in VNC (not a snap cgroup)

Categories

(Core :: Widget: Gtk, defect, P3)

Firefox 99
defect

Tracking

()

UNCONFIRMED

People

(Reporter: andy.ruddock, Unassigned)

References

(Blocks 2 open bugs)

Details

(Whiteboard: gtk-severity-sweep-2026-10)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Steps to reproduce:

Clean installation of Ubuntu 22.04.
Installed xtigervnc-standalone-server and dbus-x11
Started VNC server with vncserver -localhost no -geometry 1366x768

$HOME/.vnc/xstartup is :
#!/bin/sh
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
xrdb $HOME/.Xresources
vncconfig -iconic &
dbus-launch --exit-with-session x-session-manager

From another machine, launched vncviewer ip_of_vnc_instance:1
I get a desktop which is functional.
Open a terminal.
$ firefox

Actual results:

Get error
/user.slice/user-1000.slice/session-5.scope is not a snap cgroup

Same error if I try safe mode.

Expected results:

Firefox should open

The Bugbug bot thinks this bug should belong to the 'Core::Widget: Gtk' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Widget: Gtk
Product: Firefox → Core
Priority: -- → P3

I don't believe that this is an issue with Mozilla but rather an issue with the way snap works. Anything distributed as a snap will give the same error as the one you referenced.

You can try the following from a terminal:

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

and it should work.

you could make sure this is set in your ~/.vnc/xstartup file before the session is launched but that causes gnome to present a blackscreen only.

That does indeed work. I had noticed the same issue with another application, but not had chance to confirm it's a general "fix".
Many thanks!

The suggested workaround does not solve this issue entirely.

I find that the firefox snap does start, if DBUS_SESSION_BUS_ADDRESS is set, however the "Save Page As" and "Open File" links, that open the file picker dialog, are non functional. No error messages appear. The links are completely dead, and produce no response, whatsoever.

(In reply to Sam Varshavchik from comment #4)

The suggested workaround does not solve this issue entirely.

I find that the firefox snap does start, if DBUS_SESSION_BUS_ADDRESS is set, however the "Save Page As" and "Open File" links, that open the file picker dialog, are non functional. No error messages appear. The links are completely dead, and produce no response, whatsoever.

I suspect you are not able to launch the desktop portals. Unfortunately, under snap those are required, and if the way you start firefox breaks that in anyway, there's mostly nothing we can do.

Blocks: snap-sandbox

I don't know what desktop portals are. This is pretty much a vanilla xfce desktop running in a VNC session. I start firefox the only way that firefox can be started in a VNC session, which was described earlier in this thread. Without overriding DBUS_SESSION_ADDRESS firefox fails to start at all, as described earlier.

(In reply to Sam Varshavchik from comment #6)

I don't know what desktop portals are. This is pretty much a vanilla xfce desktop running in a VNC session. I start firefox the only way that firefox can be started in a VNC session, which was described earlier in this thread. Without overriding DBUS_SESSION_ADDRESS firefox fails to start at all, as described earlier.

https://flatpak.github.io/xdg-desktop-portal/

Unfortunately, under Snap and Flatpak there is no way around using those to interact with your files. I'm not judging, I am just explaining.

There's no such component in "snap list", and "snap find" does not find it. There is a "snapd-desktop-integration" that's shown installed, and running.

The firefox snap runs without issues in a native X session, as far as I can tell, on the same desktop. The issue happens only when starting the same firefox snap in a VNC session.

(In reply to Sam Varshavchik from comment #8)

There's no such component in "snap list", and "snap find" does not find it. There is a "snapd-desktop-integration" that's shown installed, and running.

The firefox snap runs without issues in a native X session, as far as I can tell, on the same desktop. The issue happens only when starting the same firefox snap in a VNC session.

This is not a snap component, but a system package. The fact is that playing with those things is likely breaking the desktop portals, similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1917750

(In reply to :gerard-majax from comment #9)

This is not a snap component, but a system package. The fact is that playing with those things is likely breaking the desktop portals, similar to https://bugzilla.mozilla.org/show_bug.cgi?id=1917750

Yes, I do see xdg-desktop-portal-gtk installed. I'm not familiar with what it's about, but I do see that it installs a systemd service. systemctl status, issued from a terminal in the same VNC session, does show xdg-desktop-portal.service up and running.

Severity: -- → S3
Whiteboard: gtk-severity-sweep-2026-10
You need to log in before you can comment on or make changes to this bug.