Showing posts with label dispmanx. Show all posts
Showing posts with label dispmanx. Show all posts

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 : https://github.com/Na1w/dispmanx_vnc

Clone source code of dispmanx.
$ git clone https://github.com/Na1w/dispmanx_vnc.git

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 : https://github.com/hanzelpeter/dispmanx_vnc


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
hdmi_force_hotplug=1
# Group DMT
hdmi_group=2
# mode 35 - 1280x1024 60Hz
hdmi_mode=35
Reboot after save config.

Reference:

dispmanx_vnc
https://github.com/hanzelpeter/dispmanx_vnc

https://github.com/Na1w/dispmanx_vnc

Raspberry PI Document configuration config.txt
https://www.raspberrypi.org/documentation/configuration/config-txt.md