赞
踩
# cat /etc/issue
Ubuntu 16.04 LTS \n \l
# apt-cache search tightvncserver
tightvncserver - virtual network computing server software
tightvnc-java - TightVNC java applet and command line program
# apt-get install -y tightvnserver
# apt-get install -y xfce4 xfce4-goodies
# vncserver
You will require a password to access your desktops.
Password:
Would you like to enter a view-only password (y/n)? n
# ps aux | grep vnc
root 14031 0.0 0.3 14904 6448 ? S 12月12 0:00 Xtightvnc :1
root 16565 0.0 0.2 8164 4952 ? S 12月12 0:00 Xtightvnc :2
# vncserver -kill :1
Killing Xtightvnc process ID 14031
# vncserver -kill :2
Killing Xtightvnc process ID 16565
startxfce4 &
# vim .vnc/xstartup
#!/bin/sh
#/etc/X11/Xresources/x11-common
xrdb $HOME/.Xresources
startxfce4 &
# vncserver
New 'X' desktop is ubuntu:1
# apt-get install -y xrdp
# apt-cache search vnc4server
vnc4server - Virtual network computing server software
# apt-get install -y vnc4server
# /etc/init.d/xrdp restart
[ ok ] Restarting xrdp (via systemctl): xrdp.service.
链接:https://pan.baidu.com/s/1pUrgIL1i8MC1Ax2cL_1BcQ 密码:5lib
# apt-get install -y xubuntu-desktop # reboot # pwd /root # touch .xsession # chmod 775 .xsession # echo xfce4-session > .xsession # cat .xsession xfce4-session # vim /etc/xrdp/startwm.sh #!/bin/sh if [ -r /etc/default/locale ]; then . /etc/default/locale export LANG LANGUAGE fi xfce4-session . /etc/X11/Xsession # /etc/init.d/xrdp restart [ ok ] Restarting xrdp (via systemctl): xrdp.service.
# apt-cache search teamviewer
teamviewer - Remote control and meeting solution
# apt-get install -y teamviewer
# apt-cache search x11vnc # apt-get install -y x11vnc # x11vnc -storepasswd # cd /lib//systemd/system # touch x11vnc.service # chmod 775 x11vnc.service # vim /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 /root/.vnc/passwd -rfbport 5901 -shared [Install] WantedBy=multi-user.target
# systemctl daemon-reload
# systemctl start x11vnc.service
# systemctl status x11vnc.service
# systemctl enable x11vnc.service
# x11vnc
XOpenDisplay("") failed.
# apt-get update && apt-get upgrade && apt-get dist-upgrade
# apt-get install -y gnome-shell ubuntu-gnome-desktop
# gnome-shell --version
GNOME Shell 3.18.5
XOpenDisplay("") failed.
# systemctl status x11vnc
● x11vnc.service - Start x11vnc at startup.
Loaded: loaded (/lib/systemd/system/x11vnc.service; enabled; vendor preset: enabled)
Active: active (running) since 日 2018-12-16 11:44:45 CST; 1min 28s ago
Main PID: 5244 (x11vnc)
CGroup: /system.slice/x11vnc.service
├─5244 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /root/.vnc/passwd -rfbport 5901 -shared
└─5249 /usr/bin/x11vnc -auth guess -forever -loop -noxdamage -repeat -rfbauth /root/.vnc/passwd -rfbport 5901 -shared
使用 frp + x11vnc 替代 teamviewer
frp 安装
内网穿透 frp,ssh远程访问内网
修改frpc.ini 转发5901端口到VPS服务器
# vim frpc.ini
[x11vnc]
type = tcp
local_ip = 127.0.0.1
local_port = 5901
remote_port = 5901
问题:有2个画面,分辨率不对
# x11vnc
The VNC desktop is: R:0
PORT=5900
# x11vnc -storepasswd
# x11vnc -rfbauth /root/.vnc/passwd
# x11vnc -forever -loop -noxdamage -repeat -rfbauth /root/.vnc/passwd -rfbport 5900 -shared -o /var/log/x11vnc.log
[common]
server_addr = 服务器IP地址
server_port = 7000
[x11vnc]
type = tcp
local_ip = 127.0.0.1
local_port = 5900
remote_port = 5900
参考:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。