4

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?

Architek1
  • 143
  • 2
  • 8
  • Did you run manually (as user pi) BEFORE trying autostart? As per your earlier post your problems may be due to trying to run as `root` – Milliways Jan 12 '16 at 22:12
  • Unfortunately I have tried so many ways so it's quite possible. This has been way more difficult than I thought it was going to be. Do you have an session file @Milliways? – Architek1 Jan 13 '16 at 04:21
  • The content of my `~/.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/Xsession – Milliways Jan 13 '16 at 06:51
  • I don't claim to understand all of the config file, but it looks to me like yours contains artefacts of your earlier attempts. Note I have been using `tightvncserver` 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 just `ssh`ed into the Pi and ran `tightvncserver`. The `systemd` script works reliably on my system. – Milliways Jan 13 '16 at 07:05

4 Answers4

3

The problem is you running Jessie-Lite. it similar to Jessie(full) but without a window manager, X-server and its components. Those are mandatory for VNC to run :)

Believe me, try same VNC setup on Jessie(full) and it will work nicely :)

Huy.PhamNhu
  • 418
  • 2
  • 12
  • 1
    You can easily install a window manager, X server, etc., on jessie-lite. It uses the exact same repos as the "full" version, it just starts out lighter. This is my preferred method for setting up a GUI, but if you just want the standard default desktop then you might as well start with the full version. If you don't have previous linux experience, that is the way to go. – goldilocks Jun 20 '16 at 11:40
0

Man this seems more complicated than necessary. I followed these instructions from the Raspberry Pi foundation's website and have no problems. I can hit all of my RPi2B's (Jessie Lite) with TightVNC viewer on Windows.

adengle
  • 686
  • 5
  • 6
  • I have no doubt that it's working I was informed per this previous post http://raspberrypi.stackexchange.com/questions/40894/unable-to-execute-tightvncserver-no-such-file-or-directory/40896?noredirect=1#comment58226_40896 the ~/etc/init.d/tightvncserver was no longer the way to do it starting with Jessie. I was pointed to the link above. – Architek1 Jan 13 '16 at 04:14
  • That script is quite old, and is a `SysV` script. In Jessie `systemd` should start legacy `init.d` services, but others have experienced problems with this. The `systemd` service referred to is more complex than it needs to be (because it does more - allowing multiple sessions) but is a pretty straightforward `systemd` script and is actually simpler than `init.d` scripts. – Milliways Jan 13 '16 at 07:04
0

Missing X environment components and install all of them:

sudo apt-get install xserver-xorg-core xserver-xorg-input-all \
xserver-xorg-video-fbdev libx11-6 x11-common \
x11-utils x11-xkb-utils x11-xserver-utils xterm lightdm openbox
nullne
  • 101
-2

Jessielite does not support tightvncserver.

  • This contradicts your answer:http://raspberrypi.stackexchange.com/questions/41920/should-running-vnc-on-jessie-lite-just-work – Darth Vader May 11 '16 at 07:04
  • This is incorrect. See [my comment on Huy.PhamNu's answer](http://raspberrypi.stackexchange.com/questions/40994/vnc-problem-on-mac-and-pi-2-no-xsession-file#comment74827_47067). – goldilocks Jun 20 '16 at 11:42