【Linux】Linux 配置VNC server 显示图形化桌面

Linux下配置VNC server 显示图形化桌面


本文连接:
http://blog.itpub.net/29475508/viewspace-1671101/


[root@bigdatalite ~]# cd /root/.vnc/

[root@bigdatalite .vnc]# ls
bigdatalite:2.log  bigdatalite:2.pid  localhost:1.log  passwd  xstartup

[root@bigdatalite .vnc]# ls -l
total 20
-rw-r--r-- 1 root root 1189 May 25 11:49 bigdatalite:2.log
-rw-r--r-- 1 root root    6 May 25 11:47 bigdatalite:2.pid
-rw-r--r-- 1 root root  663 Jun 12  2013 localhost:1.log
-rw------- 1 root root    8 May 25 11:47 passwd
-rwxr-xr-x 1 root root  334 May 25 11:47 xstartup

备份原始文件

[root@bigdatalite .vnc]# cp -p xstartup xstartup.bak

编辑文件,最后一行改为gnome-session &

[root@bigdatalite .vnc]# vi 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 &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
#twm &
gnome-session &

杀死掉之前的vnc进程
[root@bigdatalite .vnc]# vncserver -kill :1
Can't find file /root/.vnc/bigdatalite:1.pid
You'll have to kill the Xvnc process manually
[root@bigdatalite .vnc]# vncserver -kill :2
Killing Xvnc process ID 13462
[root@bigdatalite .vnc]# vncserver -kill :3
Killing Xvnc process ID 13797

重启vnc服务

[root@bigdatalite .vnc]# vncserver

New 'bigdatalite:2 (root)' desktop is bigdatalite:2


Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/bigdatalite:2.log


[root@bigdatalite .vnc]# 




客户端使用vncviewer进行登录


登录后是图形化操作界面



吕星昊
2015.5.25



来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29475508/viewspace-1671101/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/29475508/viewspace-1671101/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值