Saturday, July 18, 2015

VNC Server for Raspberry PI with dispmanx

You can remote console of raspberry pi with dispmanx

Install libvncserver-dev, gcc and g++ version 4.7

$ sudo apt-get install gcc-4.7 g++-4.7 libvncserver-dev

Update alternatives version of gcc and g++

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.6

$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.7

Select gcc and g++ version to 4.7 (2)

$ sudo update-alternatives --config gcc
There are 2 choices for the alternative gcc (providing /usr/bin/gcc).

Selection Path Priority Status
* 0 /usr/bin/gcc-4.6 60 auto mode
1 /usr/bin/gcc-4.6 60 manual mode
2 /usr/bin/gcc-4.7 40 manual mode

Press enter to keep the current choice[*], or type selection number: 2
update-alternatives: using /usr/bin/gcc-4.7 to provide /usr/bin/gcc (gcc) in manual mode
See on :

Clone source code of dispmanx.
$ git clone

Compile dispmanx.

$ cd dispmanx_vnc
$ make
After compile finish. It has dispmanx_vncserver file.
Copy this file to execute path. example /bin, /usr/local/bin, etc.

If you want to use X, modprobe  evdev first.

$ sudo modprobe evdev
See on :

Start dispmanx vncserver

$ sudo dispmanx_vncserver
*** default port 5900

Stop dispmanx vncserver with Control + C Key.

Start dispmanx vncserver with password

$ sudo dispmanx_vncserver -P [password]

Change port number

$ sudo dispmanx_vncserver -p [port number]

Screen resolution config on /boot/config.txt

Example (1280x1024)
#HDMI force hotplug
# Group DMT
# mode 35 - 1280x1024 60Hz
Reboot after save config.



Raspberry PI Document configuration config.txt


  1. Thanks for sharing, it has been very usefull to me !

  2. Easy to follow and the results are looking promising. Thanks for this guide.