RHEL官方原文摘要
2013年7月2日 16:39:35
32.17. Configuring a VNC Server
To configure a VNC server use the application in > . Alternatively, you can run the
vino-preferences
command.The following steps set up a dedicated VNC server session:
Edit the
~/.vnc/xstartup
file to start a GNOME session whenever vncserver is started. The first time you run the vncserver script it will ask you for a password you want to use for your VNC session.A sample
xstartup
file:#!/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 &if test -z "$DBUS_SESSION_BUS_ADDRESS" ; theneval `dbus-launch --sh-syntax –exit-with-session`echo "D-BUS per-session daemon address is: \$DBUS_SESSION_BUS_ADDRESS"fiexec gnome-session
在RHEL6中,只要以下命令:
安装以下包pixmanpixman-devellibXfont# vncserver# vncserver -list# vncserver -kill :XWINDOWS操作系统上使用REAL VNC就好。
所需安装包:
tigervnc-server-module
tigervnc-server
xdrp
编辑配置文件【不用特别修改】:
# vi /etc/sysconfig/vncserver
VNCSERVERS="2:root"
只保留这个就够了
# vi /root/.vnc/xstartup
设置vnc密码:
# vncpasswd
服务启动:
# vncserver
另外一种
# service vncserver restart
关闭服务:
# vncserver -kill :X
出现问题:
xauth:(stdin):1:bad display name "xxx:1" in "add" command
# vi /etc/hosts
127.0.0.1 XXX localhost.localdomain localhost
10.0.127.144 XXXs
字体问题
安装以下包
pixman
pixman-devel
libXfont