ubuntu server11.10安装vncserver



1.ubuntu11.10-desktop-i386.iso缺省安装使用lightdm作为缺省登录器
 
在/etc/lightdm/lightdm.conf中添加如下内容,即可开启XDMCP
 
[XDMCPServer]  www.2cto.com  
 
enabled=true
 
说明1:
 
      在缺省安装的情况下,ubuntu11.10使用的桌面是ubuntu-desktop   unity;安装xrdp后,使用Xmanager,或者使用vncviewer连接都会出现与unity-2d相关的一些错误,导致进去访问桌面的时候出现功能不正常。因此去掉unity相关桌面。
 
说明2:
 
      xrdp配置文件/etc/xrdp/startwm.sh
 
      安装xrdp,同时会安装vnc4server。开启vnc登录,运行vncserver或vnc4server即可
 
      vncserver配置文件/root/.vnc/xstartup.sh
 
说明3:
 
      据说如果使用的是kde桌面,vncserver使用没有问题,本人未进行测试。
 
-------------------------------------------------------------------------------------------------------------------------------------
 
2.卸载unity unity2d相关功能:
 
http://www.2cto.com/os/201204/127334.html
 
卸载 UNITY和UNITY 2D:
sudo apt-get --auto-remove purge unity
sudo apt-get --auto-remove purge unity-2d*
或者:  www.2cto.com  
sudo apt-get -y --auto-remove purge unity
sudo apt-get -y --auto-remove purge unity-common
sudo apt-get -y --auto-remove purge unity-lens*
sudo apt-get -y --auto-remove purge unity-services
sudo apt-get -y --auto-remove purge unity-asset-pool
 
buntu 11.10安装GNOME3:
sudo apt-get install gnome-shell
sudo apt-get install gnome-themes-standard
sudo apt-get install gnome-tweak-tool
 
ps:如果希望自动登录,这时候可以做的是:
自动登入GNOME SHELL CLASSIC:
sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-classic
 
如果喜欢GNOME3,就
sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-shell
 
 说明1: 我喜欢使用gdm做登录器dpkg-reconfigure gdm  
 
相应的XDMCP配置,在/etc/gdm/custom.conf
 
[# GDM configuration storage
 
[daemon]  www.2cto.com  
 
[security]
DisallowTCP=false
[xdmcp]
Enable=true
Port=177
DisplaysPerHost=10
 
[greeter]
 
[chooser]
 
[debug]
 
3.在上面第2步的基础上,使用XManager或vncViewer登录还是有问题的。会提示Failed to load session "ubuntu"。因为我们把ubuntu-desktop卸掉了。(缺省使用的配置文件使用. /etc/X11/Xsession,来进入桌面环境。)
 
针对vncServer 修改/root/.vnc/xstartup.sh
 
#!/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 &
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
gnome-session-fallback
 
针对xrdp 修改/etc/xrdp/startwm.sh
 
#!/bin/sh
 
if [ -r /etc/default/locale ]; then
  . /etc/default/locale
  export LANG LANGUAGE
fi  www.2cto.com  
 
gnome-session-fallback
 
说明:
ubuntu 11.10默认采用gnome3特效,如果用gnome-session会看不到标题栏,因此需要采用gnome-session-fallback
这样XMDCP,XRDP,VNC都可以用了。
 
 
 
作者 loveganen

相关内容

    暂无相关文章