guoshuiyuan 于 2010-07-16 09:18:27发表:
[i=s] 本帖最后由 guoshuiyuan 于 2010-7-16 09:20 编辑 [/i]Window VNC远程控制LINUX:VNC详细配置介绍 [root@gsy ~]# vi /etc/sysconfig/vncservers # VNCSERVERS="1:myusername" //之前的内容 VNCSERVERS="1:root" //修改后的内容 # VNCSERVERARGS[1]="-geometry 800x600" //之前的内容 VNCSERVERARGS[1]=”-geometry 800×600 -alwaysshared -depth 24″, //修改后的内容 //-alwaysshared代表允许多用户同时登录 -depth代为色深,参数有8,16,24,32。 [root@gsy ~]# 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 蓝色部分一定要有它表示远程客户以gnome的session形式登录。这是关键步骤之1&. 打开配置文件/etc/sysconfig/vncservers,去掉下面这行的注释,实现此配置!!! "2:root"表示VNC以桌面2运行,这样可以启动root的桌面。 VNCSERVERS="2:root" VNCSERVERARGS[1]="-geometry 800x600" 重启VNC服务和VNC程序: #service vncserver restart #vncserver 即可以Gnome图形化的方式远程登录。
lybshadow 于 2010-07-12 09:21:19发表:
#!/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 & metacity & nautilus & gnome-panel & 我改成这样还是不行啊!
acrofox 于 2010-07-11 18:11:21发表:
在服务器端编辑文件 ~/.vnc/xstartup,启动喜爱的窗口管理器,例如,注释掉原来跟窗口管理器相关的行,加入以下几行,就可以显示 gnome 桌面: metacity & nautilus & gnome-panel &
guoshuiyuan 于 2010-07-16 09:18:27发表:
[i=s] 本帖最后由 guoshuiyuan 于 2010-7-16 09:20 编辑 [/i]
Window VNC远程控制LINUX:VNC详细配置介绍
[root@gsy ~]# vi /etc/sysconfig/vncservers
# VNCSERVERS="1:myusername" //之前的内容
VNCSERVERS="1:root" //修改后的内容
# VNCSERVERARGS[1]="-geometry 800x600" //之前的内容
VNCSERVERARGS[1]=”-geometry 800×600 -alwaysshared -depth 24″, //修改后的内容
//-alwaysshared代表允许多用户同时登录 -depth代为色深,参数有8,16,24,32。
[root@gsy ~]# 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
蓝色部分一定要有它表示远程客户以gnome的session形式登录。这是关键步骤之1&.
打开配置文件/etc/sysconfig/vncservers,去掉下面这行的注释,实现此配置!!! "2:root"表示VNC以桌面2运行,这样可以启动root的桌面。
VNCSERVERS="2:root"
VNCSERVERARGS[1]="-geometry 800x600"
重启VNC服务和VNC程序:
#service vncserver restart
#vncserver
即可以Gnome图形化的方式远程登录。
lybshadow 于 2010-07-12 09:21:19发表:
#!/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 &
metacity &
nautilus &
gnome-panel &
我改成这样还是不行啊!
acrofox 于 2010-07-11 18:11:21发表:
在服务器端编辑文件 ~/.vnc/xstartup,启动喜爱的窗口管理器,例如,注释掉原来跟窗口管理器相关的行,加入以下几行,就可以显示 gnome 桌面:
metacity &
nautilus &
gnome-panel &