使用x11vnc作为vncserver端

1 安装x11vnc

$ sudo apt-get update
$ sudo apt-get install x11vnc

2 生成密码

$ x11vnc -storepasswd

Enter VNC password: *********
Verify password: *********
Write password to /home/USERHOME/.vnc/passwd? [y]/n y
Password written to: /home/rahul/.vnc/passwd

3 开启服务

x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport  -shared

注意:/home/USERNAME/.vnc/passwd 中的USERNAME需要换成你自己的用户名。

更多参数说明,请参考http://www.karlrunge.com/x11vnc/x11vnc_opts.html

4 设为开机启动

sudo nano /lib/systemd/system/x11vnc.service

在打开的页面中插入以下代码

[Unit]
Description=Start x11vnc at startup.
After=multi-user.target [Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -once -loop -noxdamage -repeat -rfbauth /home/USERNAME/.vnc/passwd -rfbport -shared [Install]
WantedBy=multi-user.target
sudo systemctl daemon-reload
sudo systemctl enable x11vnc.service

好了,大功告成。此时就可以在vncviewer中登陆了。

使用 ip:port 和 梗菜设置的密码登陆就好了。

vncserver官方说明请查看https://help.ubuntu.com/community/VNC/Servers

5 修改vnc viewer屏幕分辨率

  使用man命令获得关于geometry参数的描述
[root@secdb ~]# man vncserver
……
       -geometry widthxheight
              Specify the size of the desktop to be created. Default is 1024x768.
……

可见,默认的分辨率是1024x768,我们可以使用这个参数对分辨率进行调整。

例如,我们需要将分辨率调整到800x600
[root@secdb ~]# vncserver -geometry 800x600

New 'secdb:5 (root)' desktop is secdb:5

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/secdb:5.log

此时使用“192.168.23.102:5”登录VNC便会得到一个800x600的操作窗口。
其他分辨率调整请自行尝试。

ubuntu16.4中开启vncserver进行远程桌面的更多相关文章

  1. 开启Windows 7远程桌面功能的做法

    作者:朱金灿 来源:http://blog.csdn.net/clever101 本设置方法同样适用用Vista和Windows Server 2008. 1.依次点击"开始"菜单 ...

  2. 开启Linux VNC远程桌面

    Xwindows:gnome (红帽默认安装的图形界面)   一, 确认及安装VNCSERVER. 1,首先确认你服务器是否配置了VNCSERVER,可以在命令行下敲入以下命令查看: [root@lo ...

  3. 启用Win8(中文版/核心版)中被阉割的远程桌面服务端

    Windows 8/8.1 标准版(中文版/核心版)中取消了远程桌面服务端,想通过远程连接到自己的电脑就很麻烦了,第三方远程桌面速度又不理想(如TeamViewer).通过以下方法可让系统恢复远程桌面 ...

  4. linux子系统ubuntu16.04安装使用xrdp当远程桌面

    参考文献:https://icytown.com/windows/windows-subsystem-for-linux-gui-xubuntu/ https://jingyan.baidu.com/ ...

  5. 启用Win8/10(中文版/核心版/家庭版)中被阉割的远程桌面服务端

    Windows 8/8.1/10 标准版(中文版/核心版/家庭版)中取消了远程桌面服务端,想通过远程连接到自己的电脑就很麻烦了,第三方远程桌面速度又不理想(如TeamViewer).通过以下方法可让系 ...

  6. XP如何开启3389端口远程桌面

    http://zhidao.baidu.com/question/311670471.html 在Windows 2000/XP/Server 2003中要查看端口,可以使用Netstat命令:依次点 ...

  7. ubuntu16.04中开启和关闭防火墙

    开启防火墙 ufw enable 关闭防火墙 ufw disable

  8. x11 VNC远程桌面

    Ubuntu远程桌面,类似于qq远程桌面(Ubuntu没有内置桌面系统吗?) $ sudo apt-get update $ sudo apt-get install x11vnc $ x11vnc ...

  9. vnc viewer中开启剪切板复制内容到ubuntu系统中

    说明,本机是ubuntu16,安装的vnc server 是x11vnc,具体安装方法请看之前博文.ubuntu16.4中开启vncserver进行远程桌面 vncviewer on Windows ...

随机推荐

  1. install命令

    install 1.作用 install命令的作用是安装或升级软件或备份数据,它的使用权限是所有用户. 2.格式 (1)install [选项]... 来源 目的地 (2)install [选项].. ...

  2. PageUtil 分页

    /** * 分页工具类 * @author Administrator * */ public class PageUtil { /** * 生成分页代码 * @param targetUrl 目标地 ...

  3. Delphi 动态数组合并

    TIntArray = array of Integer; function MergeArray(const ArrayA, ArrayB: TIntArray): TIntArray; var i ...

  4. 如何设置maven的local repository目录

    step1:默认会放在~/.m2/repository目录下 (“~”代表用户的目录,比如windows下一般都是C:\Documents and Settings\[你的用户名]\.由于“Docum ...

  5. Cocos2d-x 3.x 在wp8中调用系统字体的解决方案

    问题和解决方法: 在使用cocos2d-x设计游戏的时候,字体是个很重要的部分.如果游戏中对字体没有太多的要求,就可以使用平台系统自带的字体,可以节省游戏的尺寸,以及减小游戏运行时所占用的内存.当加载 ...

  6. 判断UNITY版本号

    代码示例: #if (UNITY_5_3 || UNITY_5_4 || UNITY_5_5 || UNITY_5_6 || UNITY_5_7 || UNITY_5_8 || UNITY_5_9)u ...

  7. The Last Stand

    The Last Stand https://ac.nowcoder.com/acm/contest/303/L 时间限制:C/C++ 1秒,其他语言2秒 空间限制:C/C++ 262144K,其他语 ...

  8. mysql基本的增删改查和条件语句

    增 insert into 表名(列名,列名......) values("test1",23),("test2",23),("test3" ...

  9. python之类之多继承

    class A(object): def test_func(self): print("from A") class B(A): pass # def test_func(sel ...

  10. (重要)LRU cache

    [抄题]: [思维问题]: 需要从任何位置访问某数字有没有(重要 ),返回其位置(不重要),所以用hashmap. 需要从任何位置删除,用linkedlist.最终二者结合,用linked hashm ...