If nothing works, try systematic debugging!
Xvnc
is the starting place.
The latest docs are here: https://github.com/TigerVNC/tigervnc/blob/master/unix/vncserver/HOWTO.md
Don't put a xstartup
file in ~/.vnc
; this is deprecated.
Don't have a Xsession
file in /etc/X11
; this messes things up.
Put your username in /etc/tigervnc/vncserver.users
like so:
:1=jonathan
Use the systemd service:
sudo systemctl start vncserver@:1
Observe logs on the server (second terminal): tail -f .vnc/Z820\:1.log
Then see what is going on (third terminal):
ps aux | grep vnc
Here, the display managers maybe messed things up:
xinit /etc/X11/tigervnc/Xsession startxfce4 -- /usr/bin/Xvnc :1 -geometry 1920x1080 -localhost -auth /home/jonathan/.Xauthority -desktop Z820:1 (jonathan) -fp /usr/share/fonts/misc,/usr/share/fonts/75dpi,/usr/share/fonts/100dpi,/usr/share/fonts/Type1 -pn -rfbauth /home/jonathan/.vnc/passwd -rfbport 5901
I uninstalled sddm
and lxdm-gtk3
.
Then I arrived at the above state, where now xinit
calls(?) /etc/X11/tigervnc/Xsession
instead of the equivalent for sddm
or lxdm
.
The log now hung at Loading xinit script /etc/X11/xinit/xinitrc.d/90xbrlapi
.
Turns out this is related to brltty
.
Remove this: sudo pacman -Rs brltty orca
and suddenly, everything worked...