How to setup VNC server on Beagle Bone Black (BBB) Debian OS

Before starting here I would recommend to go over some basic stuff. This is a very good blog to just do that.

Having a VNC server running on your Beagle Bone Black will give you the means to connect to the board’s graphical interface over IP connection, eliminating the need of using (micro) HDMI cable and dedicated HDMI capable monitor/TV.

This process works for both Beagle Bone Black Rev A and C hardware revisions, as long as they are running the Debian distribution recommended by Beagle Bone foundation (Check here for more information).

These are the steps I took to install and enable the vnc server on the Beagle Bone Black running on Debian distribution;

1. SSH to the board using the “192.168.7.2” IP address (or any assigned address if there is any) use root and root for username and password.

2. I will use the following commands to update the various packages before starting to do the vnc related installation:

apt-get update
apt-get upgrade
apt-get dist-upgrade

3. Now we can install the x11vnc

apt-get install x11vnc

4. Now lets run the x11vnc. Just remember to switch to “debian” user before doing that. Do the following steps

su debian
x11vnc -display :0 -forever

5. Now use a vnc viewer like Real VNC to connect to your Beable Bone Black on its IP address (e.g. 192.168.7.2) on the 5900 port.

Note that you have to do the “step 4” every time you restart your Beagle Bone Black. To add this a auto start process do the following steps:

I followed the recommended approach here. And I used the following commands for start and stop sections;

start)
echo "Starting x11vnc"
su -c "x11vnc -bg -o %HOME/.x11vnc.log.%VNCDISPLAY -display :0 -forever -nopw" debian
echo "x11vnc is alive"
;;
stop)
echo "Stopping x11vnc"
su -c "x11vnc -R disconnect:all" debian
su -c "x11vnc -R stop" debian
echo "x11vnc is dead"
;;
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s