Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

gnome-session not working with Xvnc

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
vttom
Posts: 5
Joined: 2020-05-18 16:29

gnome-session not working with Xvnc

#1 Post by vttom »

I'd like to run gnome-session inside an Xvnc server, but I can't seem to get it working. I've tried all sorts of things, but as far as I can tell, it's acting like it's not honoring the XAUTHORITY and DISPLAY environment variables.

My Debian release is bullseye (although I also had this problem with buster before making the switch).

I've installed the tightvncserver package on the Debian server. I ssh into the Debian server from my local machine, run vncserver, and connect to it with a vncviewer from the local machine. My .vnc/xstartup contains just "xterm&" so that I can experiment with running gnome-session manually.

On the xterm, command-line I can see that XAUTHORITY and DISPLAY are set:

Code: Select all

$ env | grep -E "XAUTH|DISPLAY"
XAUTHORITY=/home/tchadwic/.Xauthority
DISPLAY=:1
$ xauth list
NUC10:1  MIT-MAGIC-COOKIE-1  9d566b94d5da7985952701f8469eb0d3
NUC10/unix:1  MIT-MAGIC-COOKIE-1  9d566b94d5da7985952701f8469eb0d3
When I use ps to look for the vnc server I see:

Code: Select all

Xtightvnc :1 -desktop X -auth /home/tchadwic/.Xauthority <remaining arguments trimmed>
So it's using the right xauth and DISPLAY settings.

Now when I run gnome-session...

Code: Select all

$ gnome-session --debug
gnome-session-binary[4655]: DEBUG(+): Enabling debugging
gnome-session-binary[4655]: GLib-DEBUG(+): posix_spawn avoided (fd close requested) 
gnome-session-binary[4655]: DEBUG(+): hardware acceleration check failed: Child process exited with code 1
gnome-session-binary[4655]: GLib-DEBUG(+): posix_spawn avoided (fd close requested) 
gnome-session-binary[4655]: WARNING: software acceleration check failed: Child process exited with code 1
gnome-session-binary[4655]: GLib-DEBUG(+): posix_spawn avoided (fd close requested) 
Unable to init server: Could not connect: Connection refused

** (gnome-session-failed:4667): WARNING **: 10:45:16.843: Cannot open display: 
Terminated
The "Connection refused" error looks like the type of message you get if xauth isn't setup right. The "Cannot open display" error looks like the type of error you get if DISPLAY is not setup right. But I'm pretty sure I have those correct.

One last thing... I also tried gnome-session --disable-acceleration-check. That took care of the acceleration check failed messages, but I still get the "Connection refused" and "Cannot open display" errors and no desktop.

Any ideas?

vttom
Posts: 5
Joined: 2020-05-18 16:29

Re: gnome-session not working with Xvnc

#2 Post by vttom »

One more thing. I installed the mwm package, and can run the mwm window manager just fine. I can launch apps and whatnot. So the server seems quite functional. Just doesn't want to talk to gnome for some reason.

vttom
Posts: 5
Joined: 2020-05-18 16:29

Re: gnome-session not working with Xvnc

#3 Post by vttom »

OK. Post withdrawn.

I uninstalled the tightvncserver and installed tigervnc-standalone-server and now everything works just fine (although, I had to do a little sleuthing to figure out I need to do "vncserver -localhost false" when launching the server, otherwise it defaults to rejecting vnc viewer connections from other hosts on the LAN).

Post Reply