VNC 远程控制工具安装

VNC (Virtual Network Console)是虚拟网络控制台的缩写。它 是一款优秀的远程控制工具软件, 主要由两部分组成:一部分是客户端的应用程序(vncviewer),另外一部分是服务器端的应用程序vncserver。

1 VNC Server

# 安装vnc服务端
apt-get install tigervnc-standalone-server

# 启动vnc服务端
vncserver -geometry 1920x1080 -localhost no
# 定义vnc连接服务端所需的Password,如123123

出现如下信息则表示启动了一个虚拟桌面:

New 'user-pc:1 (root)' desktop at :1 on machine user-pc

Starting applications specified in /etc/X11/Xvnc-session
Log file is /root/.vnc/user-pc:1.log

Use xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :1 to connect to the VNC server.
# 补充:关闭vncserver的命令
vncserver -kill :1

2 VNC Viewer

VNC Viewer连接VNC Server:

File -> New connection... -> General

VNC Server: 10.201.52.63:5901

之后即可通过此5901端口进行连接访问。

启动多个虚拟桌面

如果再次执行 vncserver -geometry 1920x1080 -localhost no,则可通过5902端口访问,以此类推。

New 'user-pc:2 (root)' desktop at :2 on machine user-pc

Starting applications specified in /etc/X11/Xvnc-session
Log file is /root/.vnc/user-pc:2.log

Use xtigervncviewer -SecurityTypes VncAuth -passwd /root/.vnc/passwd :2 to connect to the VNC server.

3 问题

在龙芯服务器上安装VNC使,遇到了VNC viewer连接成功后显示灰色的问题,这时需要更改服务端配置文件(若没有则创建) ~/.vnc/xstartup,添加如下内容:

#!/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 &
mate-session &
#!/bin/sh
# Uncomment the following two lines for normal desktop:
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
gnome-panel &
gnmoe-settings-daemon &
metacity &
nautilus &
gnome-terminal &

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值