Utilizing these instructions for tightvncserver for Jessie Lite. I have a tightvncserver running on startup using this as my ~/.vnc/xstartup file:
#!/bin/sh
xrdb $HOME/.Xresources
xsetroot -solid grey -cursor_name left_ptr
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
x-window-manager &
# Fix to make GNOME work
export XKL_XMODMAP_DISABLE=1
/etc/X11/Xsession
lxterminal &
/usr/bin/lxsession -s LXDE &
When I check
netstat -lnt
I get
tcp 0 0 0.0.0.0:5901 0.0.0.0:* LISTEN
Is this correct? Because when I run
open vnc://192.168.2.2:5901
or using VncViewer, I get a grey box with this
Xsession: unable to start X session --- no "/home/pi/.xsession" file, no "/home/pi/.Xsession" file, no session managers, no window managers, and no terminal emulators found; aborting.
Obviously I'm missing the .xsession file. So I create it but can't seem to find what belongs in the file anywhere. Can someone help me with the details I'm missing?
root
~/.vnc/xstartup
is #!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey -cursor_name left_ptr #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsessiontightvncserver
for 2 years, with only a minor change in Jessie (due to changed cursor). For most of this time I never bothered with the startup script. I justssh
ed into the Pi and rantightvncserver
. Thesystemd
script works reliably on my system.