View Full Version : Running SBC (Odroid, RPI2, ...) Headless, how to setup VNC?

05-21-2015, 07:48 PM
I know I have/had notes on this, but it has been a long time since I have done so and I have not found my notes yet. They may have been in some long ago PM messages that I may no longer have.

Suppose now I wish to run my new ODroid XU3 lite headless, and talk to it from my Windows 7 machine (and sometimes from an Ubuntu 14.04 machine).

What is the best way to set this up. Currently I am already using things like PuTTY and WinSCP from a windows machine to do most of the stuff. Likewise screen command on Linux.

But suppose I wish to view my point cloud data which PCL displays. I remember a couple of years ago using something like x11vnc on the linux box and on the windows machine using something like VNC-Viewer, to view the data. RealVNC? TightVNC?

So suggestions on how best to set this up would be appreciated. Note: I don't need to access the desktop except from my local net. Also on a whim earlier I purchased one of the Fit PC dongles in case that helps.

Again thanks in advance for suggestions on how to setup to do this.


05-21-2015, 08:19 PM
There are several ways, and some of these may not work. You may also need to install and configure lightdm to have the system auto-login at startup so that a desktop will already exist in the easier method(s) (if no window manager, you may need to add 'lightdm &' to /etc/rc.local for auto-login to work).

Easiest ssh way is vino-server. After installation and setup (vino-preferences) on the headless unit to permit remote connections, you can access it with (comments from my headless ubuntu-server darwin-op networking readme):

xvncviewer -via [email protected] localhost:0
vinagre (GUI) (!!!not working!!!)
Protocol: VNC
Host: localhost:0
[x] Use host | [email protected] | as a SSH tunnel

Not so easy/safe way is vnc4server. Password is set at first attempt to open vncserver and will be stored in plaintext somewhere in the home, or maybe working, directory.

!!!!Absolute Last Resort!!!!
Log into [email protected] with ssh, then run 'vncserver :5 -geometry 800x600 -ac'
on the darwin. Open up any VNC-Viewer and enter the DARWINHOST IP address.
You may be prompted for a single password to connect: 'fuckoff'.
This method is completely unencrypted after the password is sent and must be
not be used on a public network. Immediately after completing your network
configuration, either reboot the darwin or run 'vncserver -kill :5' to destroy
the absolutely horrific security hole this method creates.

Somewhat safer using xvfb, x11vnc, and assumes fluxbox but could use other window manager if set up to be able to utilize Xvfb.

Using x11vnc and a fake framebuffer. Run '/darwin/os/x11vnc.sh' on the DARwIn-OP.
On a separate computer connected to the DARwIn-OP via ethernet cable, open two
separate terminal windows.
In the first, run 'ssh -N -T -L 5900:localhost:5900 [email protected]', where
DARWINHOST is the IP address of the DARwIn-OP. It will shortly prompt for the
password for darwin, and after entered correctly will do very little.
In the second, run 'vncviewer -encodings 'copyrect tight hextile' localhost:5900'.
If the DARwIn-OP was set up correctly and the previous terminal running ssh
connected correctly, then a window should pop up with a view of the DARwIn-OP
From here, you can follow the directions above to use the nm-connection-editor
GUI to create as many connections as you want.


killall fluxbox
export DISPLAY=:1
Xvfb :1 -screen 0 800x600x24 &
fluxbox &
sleep 10s
x11vnc -display :1 -bg -nopw -listen localhost -xkb

05-21-2015, 08:57 PM
Thanks tician,

So far what I have working is if I startup on the TV,
There is an x11VNCServer menu item under internet. (Odroid XU3)
I ran it, Told it to allow connections, set to :0 and gave it a password.

I am then able on my PC to use VNCViewer app and set it up to connect to: and it allows me to connect :)

Not sure yet if it will work without the TV connected...

As for the dongle, (It may be like fitting a square peg into a round hole :lol:) as the Dongle is normal HDMI plug size and the Odroid has the mini or micro HDMI size...

But making progress

05-21-2015, 09:03 PM
If it is not using ssh tunneling (vino-server+ssh or Xvfb+ssh), then it must never be let off an isolated local network with the vnc server running. Plaintext stored password and completely unencrypted traffic between server and client.

05-22-2015, 08:37 AM
Thanks tician. Also as feared, if you boot without the HDMI cable plugged in, I don't think the actual desktop starts up and as such the remote to it fails. Probably what the fit-pc dongle would cure...

Will play some more.

Thanks again

05-22-2015, 10:23 AM
Still trying to remember the process for forcing creation of a default/standard desktop entirely in software. I know that it is possible as the original DARwIn-OP ubuntu (10.04?) image did it with gnome and I have gotten fluxbox to start up automatically on the newer 12.04 ubuntu-server images, but did not document the process as well as I should have (did not save copy of the lightdm or fluxbox configuration files, so would have to dig into the DARwIn-OP in the lab to verify; might be able to do that next week). Thinking it may have involved having the x11vnc.sh script auto-run to create a virtual desktop after lightdm does an auto-login... or more likely that lightdm starts/forces fluxbox after auto-login.

05-22-2015, 10:26 AM
There is a "headless" X VNC server (called xvnc) which you can run without a graphics card.
That draw-back is that it won't be accelerated if you do fancy 3D graphics.
If I had data and wanted to view it, I'd probably scp/rsync the data from the source to my workstation.

05-22-2015, 11:58 AM
I just use a fake monitor dongle. It simulates a monitor so the GPU is activated. Works amazingly well and no extra stuff is needed.


05-22-2015, 12:20 PM
Thanks Kevin, I actually have one of their 1080p versions: http://www.fit-pc.com/web/products/fit-headless/
But I need to get a mini HDMI to HDMI adapter to use it with XU3...