Welcome 微信登录

首页 / 操作系统 / Linux / Linux下VNC安装设置

Oracle在Linux上的安装需要用到图形界面(静默安装除外),身体好的同志完全可以在机房里面顶着做,身体素质一般的还是老老实实的远程操作吧。方便起见我们就使用Linux自带的vnc-server。
 
首先查看是否安装了vnc-server服务:
 
[root@localhost ~]# rpm -qa vnc-server
 
vnc-server-4.0-8.1
 
如果没有安装则上传安装包安装即可,安装完成以后运行vncserver,如果用户是第一次运行需要设置vnc密码,否则不需要设置。
 
[root@localhost ~]$ vncserver
 
You will require a password to access your desktops.
 
Password:
 
Verify:
 
xauth:  creating new authority file /root/.Xauthority
 
New "localhost.localdomain:1 (root)" desktop is localhost.localdomain:1
 
Creating default startup script /root/.vnc/xstartup
 
Starting applications specified in /root/.vnc/xstartup
 
Log file is /root/.vnc/localhost.localdomain:1.log
 
上面的这段话表示启动了一个图形终端,编号为1。现在我们就可以通过vncviewer等工具远程连接服务器了,在连接的时候需要提供图形终端号。连接上以后会发现图形界面相当的丑陋,因为默认的图像终端使用的是xterm+twm,我们可以通过修改启动脚本将gnome或kde作为默认的图像终端。编辑用户home目录下的/.vnc/xstartup,将twm替换为gnome-session并重启vncserver即可。
 
[root@localhost ~]# vi /root/.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 &
 
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
 
gnome-session &
 
 
 
[root@localhost ~]# vncserver -kill :1
 
Killing Xvnc process ID 4117
 
 
 
[root@localhost ~]# vncserver
 
New "localhost.localdomain:1 (root)" desktop is localhost.localdomain:1
 
Starting applications specified in /root/.vnc/xstartup
 
Log file is /root/.vnc/localhost.localdomain:1.log
  • 1
  • 2
  • 下一页
Linux系统时间同步Linux sed 命令详解相关资讯      VNC  Linux下VNC安装  VNC安装 
  • 远程管理之VNC 详解  (今 21:04)
  • Linux 开启VNC远程管理服务的图形  (05月12日)
  • 在CentOS 6.5设置VNC多用户登录  (12/19/2015 13:44:13)
  • CentOS 7下安装配置 VNC Server  (07月03日)
  • CentOS 5.11开启VNC访问  (01月22日)
  • CentOS 6.5 安装VNC Server实现图  (12/14/2015 20:15:51)
本文评论 查看全部评论 (0)
表情: 姓名: 字数


评论声明
  • 尊重网上道德,遵守中华人民共和国的各项有关法律法规
  • 承担一切因您的行为而直接或间接导致的民事或刑事法律责任
  • 本站管理人员有权保留或删除其管辖留言中的任意内容
  • 本站有权在网站内转载或引用您的评论
  • 参与本评论即表明您已经阅读并接受