ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 【Linux】Linux 配置VNC server 显示图形化桌面

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

原创 Linux操作系统 作者:海星星hktk 时间:2015-05-25 16:41:17 0 删除 编辑

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博客 ” ,链接:https://blog.itpub.net/29475508/viewspace-1671101/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle OCM 讲师。达梦认证讲师DM8-DCI。OceanBase认证讲师OBCI。拥有10g、12c OCM,OBCP等认证证书。曾任 Oracle WDP 注册OCM讲师,已培养Oracle OCP认证专家2000余人,培养Oracle OCM认证大师360余人。

注册时间:2014-02-08

  • 博文量
    128
  • 访问量
    2644743