vnc server安装配置
来源:互联网 发布:用java写小游戏 编辑:程序博客网 时间:2024/05/16 01:40
1.查询是否安装vnc server
[root@dbserver ~]# rpm -q vnc-servervnc-server-4.1.2-14.el5_6.6 --出现此信息则表示已安装,否则未安装
2.安装vnc server
[root@dbserver ~]# rpm –ivh vnc-server-4.1.2-14.el5_6.6.x86_64.rpm
3.配置文件(添加用户)
--添加以下几行,保存并退出[root@dbserver ~]# vi /etc/sysconfig/vncservers………………………………VNCSERVERS="1:root 2:oracle"VNCSERVERARGS[1]="-geometry 1024x768 -alwaysshared"VNCSERVERARGS[2]="-geometry 1024x768 -alwaysshared"
4.逐个用户运行vncserver
逐个用户运行vncserver,它将完成两项工作:--为用户创建所需.vnc 文件夹;--用户设置登录密码 (如需要修改密码用vncpasswd);--1.root用户运行vncserver[root@dbserver ~]# vncserverYou will require a password to access your desktops.Password: //输入密码Verify: //再次输入密码xauth: creating new authority file /root/.XauthorityNew 'dbserver:1 (root)' desktop is dbserver:1Creating default startup script /root/.vnc/xstartupStarting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/dbserver:1.log--2.编辑.vnc/xstartup[root@dbserver ~]# cd .vnc[root@dbserver .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/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &twm & 激活行: unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc注释掉: twm &添加行: gnome-session &--3.配置完成后如下:[root@dbserver .vnc]# vi xstartup#!/bin/sh# Uncomment the following two lines for normal desktop:unset SESSION_MANAGERexec /etc/X11/xinit/xinitrc[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#twm &gnome-session &~ ~ ~ "xstartup" 14L, 350C--4.oracle用户运行vncserveroracle用户执行一遍上述root用户的操作,如下:[oracle@dbserver ~]$ vncserverYou will require a password to access your desktops.Password:Verify:xauth: creating new authority file /u01/app/oracle/.XauthorityNew 'dbserver:2 (oracle)' desktop is dbserver:2Creating default startup script /u01/app/oracle/.vnc/xstartupStarting applications specified in /u01/app/oracle/.vnc/xstartupLog file is /u01/app/oracle/.vnc/dbserver:2.log[oracle@dbserver ~]$ cd /u01/app/oracle/.vnc/[oracle@dbserver .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/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &twm &修改后如下:#!/bin/sh# Uncomment the following two lines for normal desktop:unset SESSION_MANAGERexec /etc/X11/xinit/xinitrc[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#twm &gnome-session &~ --5.若还有其它用户,对每个需要使用远程桌面的用户都使用上述方法进行修改。
5.完成配置后的操作
--以上配置完成后,登陆vnc,客户端看到的仍有可能只是命令行界面,非图形化操作界面,这时只要以root用户重启vncserver即可。[root@dbserver ~]# service vncserver stop --关闭服务Shutting down VNC server: 1:root 2:oracle [ OK ][root@dbserver ~]# service vncserver start --重启服务Starting VNC server: 1:root New 'dbserver:1 (root)' desktop is dbserver:1Starting applications specified in /root/.vnc/xstartupLog file is /root/.vnc/dbserver:1.log2:oracle New 'dbserver:2 (oracle)' desktop is dbserver:2Starting applications specified in /u01/app/oracle/.vnc/xstartupLog file is /u01/app/oracle/.vnc/dbserver:2.log [ OK ]--用此命令检查vnc是否开启:[oracle@dbserver ~]$ vncserver :2A VNC server is already running as :2
6.vnc其它相关命令
--vncserver启动及停止启动# service vncserver start停止# service vncserver stop--强制关闭VNC SERVER服务[root@localhost ~]# vncserver -kill :1 (kill和:1之间有一个空格)Killing Xvnc process ID 21198
0 0
- vnc server安装配置
- VNC Server 安装与配置
- vnc-server的安装配置
- 配置安装VNC Server服务TigerVNC
- Fedora_20 VNC-SERVER安装与配置
- CentOS 6.5 上VNC Server安装配置
- Linux下VNC Server的安装配置
- CentOS 7.0 VNC Server安装和配置
- CentOS7 VNC SERVER的安装配置
- Linux服务器上安装配置VNC Server
- vnc—server配置
- vnc-server配置
- VNC Server配置实例
- Fedora VNC Server配置
- RHEL5 vnc server 配置
- 配置VNC server
- VNC Server配置
- 配置VNC server
- SQL好的写法(SQLSERVER)
- EasyUi代码解析系列之Parser
- Charles工具使用教程,以及注意事项。
- Android 中PullToRefresh 自定义下拉刷新动画
- POJ 2430 Lazy Cows 状压DP
- vnc server安装配置
- 嗨!亲爱的朋友们,欢迎您光临我的BLOG
- 【SDOI2012】bzoj2726 任务安排
- 4.9 服务器上的 Git - 第三方托管的选择
- Axure学习——制作海报轮播效果
- linux sar 命令详解
- python 关键字提取
- hihoCOder #1015 : KMP算法
- 链接提示 extern "C"