3

Setup

My goal is to use a web browser in a VNC session.

I followed this page to install tightvncserver with xfce4. The session works fine, i.e. I am able to open all other GUI programs. I ran apt install firefox and snap install brave. Connection is via SSH jump and then port forwarding between localhost of both client and server.

Symptoms

When I try to launch browsers from GUI, nothing happens. On the command line I get for Firefox:

Client is not authorized to connect to ServerError: cannot open display: :1.0

And for Brave:

Client is not authorized to connect to Server[11997:11997:0704/151224.702071:ERROR:ozone_platform_x11.cc(247)] Missing X server or $DISPLAY
[11997:11997:0704/151224.702198:ERROR:env.cc(226)] The platform failed to initialize.  Exiting.
[0704/151224.705242:ERROR:ptracer.cc(567)] ptrace: Input/output error (5)
[0704/151224.705436:ERROR:ptracer.cc(567)] ptrace: Input/output error (5)
[0704/151224.742590:ERROR:elf_dynamic_array_reader.h(64)] tag not found
[0704/151224.753358:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
[0704/151224.753382:ERROR:file_io_posix.cc(144)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
/snap/brave/166/opt/brave.com/brave/brave-browser: line 48: 11997 Trace/breakpoint trap   (core dumped) "$HERE/brave" "$@"

Things I tried

On Redhat bugzilla they say to run firefox -no-remote. Same issue as before in my case.

I found a lot of related answers, but none seem the same. But they have problems with X11, too. So I try some ideas I read there.

$XAUTHORITY is empty. $DISPLAY is :1.0. I try xauth list, because ~/.Xauthority exists:

host:1  MIT-MAGIC-COOKIE-1  f91ec0372bd83eb72b686a16530ebb43
[five times the line above]
host/unix:1  MIT-MAGIC-COOKIE-1  f91ec0372bd83eb72b686a16530ebb43

Just in case, I try to set the environment variable:

export XAUTHORITY=c441e3e34e057b5a868d5520dc47e7f4

Still the same error. But echo $XAUTHORITY shows the cookie. Also Gilles states here that ~/.Xauthority is used, when it is not set. The cookie values differ, because I restarted xvncserver and deleted+recreated ~/.Xauthority before I wrote this.

Arch wiki lists: xhost +si:localuser:$USER. I did it for my user and root. As far as I understand, this lowers security, but many answers use it as a quick fix. In my case, it throws:

localuser:root being added to access control list
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  109 (X_ChangeHosts)
  Value in failed request:  0x5
  Serial number of failed request:  6
  Current serial number in output stream:  8

I am not sure if the error even relates to my problem. The same issue is caused by bugs or when the system is build wronlgy. Both things I cannot change at the moment.

By now, I am bit clueless:

  • What is my problem?
  • How can I solve it?

If someone knows a solution it would be great. But my priority is to have a browser inside a VNC session, so any kind of workaround would also be appreciated.

I also tried to enable SSH X11Forwarding in sshd_config. It did not work. I think this is unrelated, as I use VNC instead of ssh -X option.

1 Answer 1

0

A workaround is to install tigervnc (Tutorial). Also the desktop environments can be installed via tasksel to reduce the chance for mistakes in that step.

In xfce Firefox and Brave both work. On gnome Firefox installed from apt works.

In the specific question, Brave had a snap error similar to this one, when launched on gnome. Also this bug was also still present.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.