您的位置:首页 > 其它

Ubuntu远程桌面xface VNC配置

2017-05-26 10:39 507 查看
Ubuntu 16.04

xface、vnc安装

sudo命令安装即可

sudo apt-get install vnc4server
sudo apt-get install xface4


配置VNC

vncpasswd命令配置vnc密码

启动VNC

vncserver :1

:1可以是任何数字,代表第几个桌面

远程连接

远程IP地址:1即可连接第一个桌面(具体形式为“xxx.xxx.xxx.xxx:1”),但此时没有桌面,因为没有给VNC配置桌面,

cd ~/.vnc # 进入当前用户的配置目录为
vim xstarup # vim修改配置脚本


具体配置为

#!/bin/sh

# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#x-window-manager &

sesion-manager & xfdesktop & xfce4-panel &
xfce4-menu-plugin &
xfsettingsd &
xfconfd &
xfwm4 &


重启VNC会话,命令为

vncserver -kill :1 # 杀死第一个桌面,以此类推
vncserver :1 # 重新启动第一个桌面


用VNC客户端连接即可成功

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: