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
Code: Select all
Xtightvnc :1 -desktop X -auth /home/tchadwic/.Xauthority <remaining arguments trimmed>
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
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?