VNC设置
来源:互联网 发布:怎么删除淘宝下架宝贝 编辑:程序博客网 时间:2024/05/17 03:05
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
如果有多个用户需要使用图形终端,我们一个一个的去修改就显的很麻烦了,可以通过编辑/usr/bin/vncserver实现新增用户默认图形终端的设置。找到以下代码:
$defaultXStartup
= ("#!/bin/sh/n/n".
"# Uncomment the following two lines for normal desktop:/n".
"# unset SESSION_MANAGER/n".
"# exec /etc/X11/xinit/xinitrc/n/n".
"[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup/n".
"[ -r /$HOME/.Xresources ] && xrdb /$HOME/.Xresources/n".
"xsetroot -solid grey/n".
"vncconfig -iconic &/n".
"xterm -geometry 80x24+10+10 -ls -title /"/$VNCDESKTOP Desktop/" &/n".
"twm &/n");
将红色部分的注释符号去掉,并将其余的行加上注释符#即可。如下:
$defaultXStartup
= ("#!/bin/sh/n/n".
"# Uncomment the following two lines for normal desktop:/n".
"unset SESSION_MANAGER/n".
"exec /etc/X11/xinit/xinitrc/n/n".
"# [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup/n".
"# [ -r /$HOME/.Xresources ] && xrdb /$HOME/.Xresources/n".
"# xsetroot -solid grey/n".
"# vncconfig -iconic &/n".
"# xterm -geometry 80x24+10+10 -ls -title /"/$VNCDESKTOP Desktop/" &/n".
"# twm &/n");
- VNC设置
- vnc设置
- VNC快速设置
- vnc server/viewer设置
- Linux 设置VNC
- linux设置VNC
- vnc分辨率的设置
- linux下vnc设置
- VNC 设置屏幕分辨率
- vnc 分辨率设置
- 设置vnc server
- XEN VNC设置
- linux远程--VNC设置
- 树莓派 vnc设置
- 设置vnc使用ssl
- vnc 设置自定义分辨率
- 删除配置-服务-VNC设置
- 简单vnc-server设置[centos6]
- 十进制数与二、八进制数互转
- wamp5设置外网访问方法
- 杨辉三角
- 郁闷,
- 开山篇
- VNC设置
- 匆匆
- 保险IT服务商 尚洋信德:做大才“保险”
- C++静态成员小结
- 判断C?行??境的程序
- 控件包含代码块(即 ),因此无法修改控件集合。
- SCP不用输密码
- char、varchar、text和nchar、nvarchar、ntext的区别
- Summer has come