分页: 1 / 1

vnc在ubuntu8上的安装。

发表于 : 2009-01-04 10:13
birdbird
用VNC远程登录Ubuntu桌面
-----------------------------------------
VNC4Server篇
服务器:
vnc4server-免费软件,可以从源里面找到。
sudo apt-get install vnc4server

客户端:
UltraVNC for Windows
也是一个免费软件。UltraVNC包含Server和Client,不过我只安装了Client.
特别值得一提的是,这个软件的插件里面有一个DSMplugin,可以实现加密传输,非常的好。
UltraVNC下载:
http://ultravnc.sourceforge.net/

DSMPlugin下载(这里用不上了):
http://msrc4plugin.home.comcast.net/~ms ... index.html

配置:
1、生成一个passwd文件
vnc4passwd

在$HOME/.vnc目录下面生成一个passwd文件。
$HOME/.vnc是一个vnc4server的关键目录。

2、开启vnc4server

输入:vnc4server
会得到:desktop的名称,这个名称在客户端连接的时候用到。如果是desktop:1,在客户端连接的时候就填写:ip:5901,依此类推,如果是Desktop 2,在客户端的时候填写:ip:5902....
首次运行会提示生成了.vnc/xstartup文件,这个文件里面包含着登录启动X时的一下配置。

特别注意:
现在从UltraVNC登录,可能得到一个比较简单的窗口,因为VNC4Server缺省启动的WM是twm,如果希望启动gnome,需要改动.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 1024x768+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

这样登录的时候,会自动启动gnome
如果实在不是非常明白原理,或者出现问题,可以查看/usr/bin/vnc4server文件,这是一个Perl文件,你将非常明白其中的运作原理。
------------------------------------------------
ref :http://www.linuxdiyf.com/bbs/redirect.p ... o=lastpost <--(作了部分修改)

Re: vnc在ubuntu8上的安装。

发表于 : 2009-01-04 10:49
Jarson
好文章,顶一下,有空试一试 :em05 :em05
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
这里有点不明白。是不是还要取消那两行的注释?

Re: vnc在ubuntu8上的安装。

发表于 : 2009-01-04 21:23
birdbird
fhc2007 写了:好文章,顶一下,有空试一试 :em05 :em05
# Uncomment the following two lines for normal desktop:
# unset SESSION_MANAGER
# exec /etc/X11/xinit/xinitrc
这里有点不明白。是不是还要取消那两行的注释?
only modify:
xterm -geometry 1024x768+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session &

Re: vnc在ubuntu8上的安装。

发表于 : 2009-01-06 0:32
2k83
按照楼主的方法,没有成功启动图形界面。
查看日志文件中 ubuntu:2.log有一些error,但不清楚具体含义,望指教
Couldn't open RGB_DB '/etc/X11/rgb'

Xvnc Free Edition 4.1.1
Copyright (C) 2002-2005 RealVNC Ltd.
See http://www.realvnc.com for information on VNC.
Underlying X server release 70000000, The X.Org Foundation


Tue Jan 6 00:14:05 2009
vncext: VNC extension running!
vncext: Listening for VNC connections on port 5902
vncext: created VNC server for screen 0
error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/share/fonts/X11/TTF/, removing from list!
Could not init font path element /usr/share/fonts/X11/OTF, removing from list!
Could not init font path element /usr/share/fonts/X11/CID/, removing from list!
xsetroot: unknown color "grey"
Xlib: extension "RANDR" missing on display ":2.0".
gnome-session[7652]: WARNING: Failed to acquire org.gnome.SessionManager
gnome-session[7652]: ******************* START ********************************
gnome-session[7652]: Frame 0: gnome-session [0x805d9f5]
gnome-session[7652]: Frame 1: gnome-session [0x805dba4]
gnome-session[7652]: Frame 2: [0xb8024400]
gnome-session[7652]: Frame 3: /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb771b685]
gnome-session[7652]: Frame 4: gnome-session [0x8050591]
gnome-session[7652]: ******************* END **********************************

Tue Jan 6 00:14:14 2009
Connections: accepted: 192.168.1.4::2834
SConnection: Client needs protocol version 3.8
SConnection: Client requests security type VncAuth(2)

Tue Jan 6 00:14:16 2009
VNCSConnST: Server default pixel format depth 16 (16bpp) little-endian rgb565
VNCSConnST: Client pixel format depth 8 (8bpp) rgb max 3,3,3 shift 4,2,0
VNCSConnST: Client pixel format depth 16 (16bpp) little-endian rgb565
XIO: fatal IO error 11 (Resource temporarily unavailable) on X server ":2.0"
after 173 requests (172 known processed) with 0 events remaining.
xterm: fatal IO error 11 (Resource temporarily unavailable) or KillClient on X server ":2.0"
FreeFontPath: FPE "/usr/share/fonts/X11/misc/" refcount is 2, should be 1; fixing.

Hi! Thanks for the great advice..

发表于 : 2009-01-09 10:48
vg471448
Hi! Thanks for the great advice..







___________________________________________________________________
Maple Story Mesos
Maple Story Europe Mesos
Maple Story Power Leveling