zoukankan      html  css  js  c++  java
  • x11vnc配置--ubuntu14.04

    x11vnc是连接到真实的X会话,相比vnc4server和tightvncserver自己创建不同分辨率的xserver来说,画面延时和显示效果应该要好一些。两种服务都试过,个人感觉x11vnc要好。

    1. 安装x11vnc

    sudo apt-get install x11vnc

    2. 创建vnc连接密码

    sudo x11vnc -storepasswd <password> /etc/x11vnc.pass

    3. 配置x11vnc开机启动

    创建文件/etc/init/x11vnc.conf,并添加如下代码

    start on login-session-start
    script
    x11vnc -display :0 -auth /var/run/lightdm/root/:0 -forever -bg -o /var/log/x11vnc.log -rfbauth /etc/x11vnc.pass -shared -noxdamage -xrandr "resize" -rfbport 5900
    end script

    其中,/var/run/lightdm要根据实际的桌面管理器修改,gdm或者kdm。

    4. 配置虚拟分辨率

    服务器如果没有外接外接显示器,x-session不能从外部获取分辨率,需要在xorg.conf中设置虚拟分辨率。

    参考:http://askubuntu.com/questions/100604/set-desktop-resolution-for-standard-11-10-vnc-server

    ubuntu默认已经没有/etc/X11/xorg.conf,也没有必要用Xorg -configure创建,直接手动创建就行,并添加如下代码(客户端显示屏分辨率是1680x1050,可以根据实际情况修改Virtual参数)

    Section "Device"
            Identifier "Configured Video Device"
    EndSection
    
    Section "Monitor"
            Identifier "Configured Monitor"
    EndSection
    
    Section "Screen"
            Identifier "Default Screen"
            Monitor "Configured Monitor"
            Device "Configured Video Device"
            SubSection "Display"
                       Depth 24
                       Virtual 1680 1050
            EndSubSection
    EndSection

    *[吐槽] 那些要安装xserver-xorg-video-dummy,再用gft或cvt获取Modeline的方法都是不管用滴!

  • 相关阅读:
    Matlab产生随机序列,并采样
    LaTex的常用编辑
    傅里叶级数(FS)以及FT、DTFT、DFS和DFT
    uint32_t
    string
    const char * char const * char * const
    CString
    UNICODE与ANSI的区别
    MFC中输出string;
    assert
  • 原文地址:https://www.cnblogs.com/elmaple/p/4354814.html
Copyright © 2011-2022 走看看