码丁实验室,一站式儿童编程学习产品,寻地方代理合作共赢,微信联系:leon121393608。
概要
- dispmanx_vnc 是一个VNC Server, 用于树莓派
 - 官网,https://github.com/patrikolausson/dispmanx_vnc#dispmanx_vnc
 
依赖
libvncserver-dev, libconfig++-dev and g++ 4.7 or newer.
功能
- 非常低的功耗,不占用CPU资源
 - 作为服务运行
 - 非常稳定
 - 密码支持
 - 可配置端口
 - 可配置帧的比率,但没有更新检测到,帧的比率自动下降到2/秒
 - 运行视频和动画都能获得最好的体验
 - 针对不同系统,不同的安装方法
 
raspbian wheezy安装
- 第一步,安装相关依赖库:
 
sudo apt-get install g++-4.8 libvncserver-dev libconfig++-dev
- 第二步:
 
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.8 40 --slave /usr/bin/g++ g++ /usr/bin/g++-4.8 
- 第三步:
 
sudo update-alternatives --config gcc
或者
make CXX=g++-4.8
raspbian jessie安装
sudo apt-get install g++ libvncserver-dev libconfig++-dev
OSMC安装
sudo apt-get install build-essential rbp-userland-dev-osmc libvncserver-dev libconfig++-dev
问题:如果鼠标和键盘不能使用
- 确保相关驱动已经引用
 
sudo modprobe evdev
- 设置开机自启动,在/etc/modules单独编辑一行
 
evdev
用法
Parameters Usage: ./dispmanx_vncserver [OPTION]...
-a, --absolute               absolute mouse movements
-c, --config-file=FILE       use the specified configuration file
-d, --downscale              downscales the screen to a quarter in vnc
-f, --fullscreen             always runs fullscreen mode
-m, --multi-threaded         runs vnc in a separate thread
-p, --port=PORT              makes vnc available on the speficied port
-P, --password=PASSWORD      protects the session with PASSWORD
-r, --relative               relative mouse movements
-s, --screen=SCREEN          opens the specified screen number
-t, --frame-rate=RATE        sets the target frame rate, default is 15
-u, --unsafe                 disables more robust handling of resolution
                             change at a small performance gain
    --help                   displays this help and exit
启动
sudo ./dispmanx_vncserver

