Ubuntu 16.04 VNC Server 配置
1. 安装 x11vnc server
sudo apt-get install x11vnc
2. 配置vnc server密码
sudo x11vnc -storepasswd /etc/x11vnc.pass
3. 创建服务文件
vi /lib/systemd/system/x11vnc.service
[Unit]
Description=Start x11vnc at startup.
After=multi-user.target
[Service]
Type=simple
ExecStart=/usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5910 -shared
[Install]
WantedBy=multi-user.target
4. 配置Systemd服务
sduo systemctl daemon-reload
sudo systemctl enable x11vnc.service
sudo systemctl start x11vnc.service
5. 使用vnc客户端连接
6.设置vnc分辨率
创建/etc/X11/xorg.conf文件,然后添加如下内容:
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
ubuntu16.04 配置eclipse 不能显示,功能不正常这个和gnome有关。
在eclipse.ini文件 --launcher.appendVmargs语句前加:
--launcher.GTK_version
2
编辑eclipse.desktop文件内容如下
[Desktop Entry]
Version=1.0
Name=Eclipse
Exec=env SWT_GTK3=0 UBUNTU_MENUPROXY= eclipse
Terminal=false
Icon=/eclipse/icon.xpm
Type=Application
Categories=IDE;Development
X-Ayatana-Desktop-Shortcuts=NewWindow
[NewWindow Shortcut Group]
Name=New Window
Exec=env SWT_GTK3=0 UBUNTU_MENUPROXY= eclipse
TargetEnvironment=Unity