Score:2

Firefox from Terminal on remote Ubuntu 22.04 via VNC: Cannot open display

cn flag

Disclaimer: I'm somewhat new to SSH and VNC servers, and while I get the basics, that's about as far as it goes. If applicable, explaining like I'm five would be beneficial!

This is a similar issue as mentioned here, but the solution (checking /etc/ssh/sshd_config to ensure X11Forwarding was set to yes) failed to work; possibly because I'm utilizing Xtigervnc versus just ssh (if that's a thing that can be done).

The exact output that firefox provides is;

Not loading module "atk-bridge": The functionality is provided by GTK natively. Please try to not load it.
Authorization required, but no authorization protocol specified.
Error: cannot open display: :14

I am currently running my VNC Server on display 14, so it is indeed recognizing the proper display number. Every configuration file I can think to check and have been told to check online seems to come up negative on any problems that can cause this.

The server is running Ubuntu 22.04.1 LTS with a GNOME version of 42.5; the host system is Windows 11 Pro 22h2 (22621). I'm using VNC Viewer 7.0.1 to connect.

hr flag
Assuming you are using the default (i.e. snap) version of firefox, the issue may be with the snap containment - see for example [only some apps work with X11 forwarding to XcXsrv from an Ubuntu 22.04 Virtualbox guest](https://askubuntu.com/questions/1413448/only-some-apps-work-with-x11-forwarding-to-xcxsrv-from-an-ubuntu-22-04-virtualbo)
EarthToAccess avatar
cn flag
it didnt even occur to me that it could be a snap-related issue, figured it was just something X related. if you want to, place this as an answer so i can mark it as best, and thank you!
Score:3
cn flag

Courtesy of steeldriver's comment:

Assuming you are using the default (i.e. snap) version of firefox, the issue may be with the snap containment

It did appear to be an issue with snaps and registering XAuthority when forwarding X11 on my VNC. The issue was fixed by simply running the following commands in a Terminal window;

XAUTHORITY=$HOME/.Xauthority
export XAUTHORITY

Then, running Firefox via the Terminal would open it properly. It would not open via its icon in Applications/the Dash, however; using a desktop file is a workaround.

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.