Ubuntu下使用SSH和远程桌面使用很方便,使用远程桌面就要使用到vnc4server首先安装程序 www.linuxidc.com@linuxidc.com:$ sudo apt-get install vnc4server再修改vnc password www.linuxidc.com@linuxidc.com:$ vncpasswd
Password: ******
Verify:*****启动 www.linuxidc.com@linuxidc.com:$ vncserverNew "cuile-Dell-E521:1 (cuile)" desktop is cuile-Dell-E521:1Starting applications specified in /home/cuile/.vnc/xstartup
Log file is /home/cuile/.vnc/cuile-Dell-E521:1.log默认的界面并不好看,很丑,需要修改一下配置文件www.linuxidc.com@linuxidc.com:$ vim .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
&x-terminal-emulator -geometry
80x24+10
+10
-ls
-title
"$VNCDESKTOP
Desktop"
&x-window-manager &
修改成这个样子#!/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" &#x-window-manager &
这里算是完成了vncserver的初步配置
修改xinitrc文件的权限,要不打开的桌面会是一面花$ sudo
chmod
755
/
etc/
X11/
xinit/
xinitrc关闭远程桌面 www.linuxidc.com@linuxidc.com:$ vncserver -kill :1这里要注意“-kill :1”,kill后面有一个空格,这个不能少,少了结果就不一样了
“1”是指打开vnc时使用的屏幕号“New ‘cuile-Dell-E521:1 (cuile)’ desktop is cuile-Dell-E521:1”,看到这里的“cuile-Dell-E521:1”了吧www.linuxidc.com@linuxidc.com:$ vncserver -kill :1
Killing Xvnc4 process ID 1591
出现上面的结果就说明已经关掉vnc了定制远程桌面大小 www.linuxidc.com@linuxidc.com:$ vncserver -geometry 1366x768这样vnc就会启动一个1366×768大小的远程屏幕加入启动服务
ubuntu 10.10 下无法加入启动服务,试过了网上的所有方法没有一个可行的
想可能的原因是在Ubuntu下安装的vnc设置都保存在用户目录下了,没有放在一个统一的位置下,所以在用户登录前系统不能从用户目录下取得设置文件
这种模式比Ubuntu自带的vino要好多了,居然都要手工启动,但vino必须在本机图形界面登录的情况下才可以用,跟windows下的模式非常非常像,简直一模一样,如果机器重启了还需要重新的登录一下,比较麻烦。
而vncserver就好很多,虽然也要手功,但不用本机图形界面登录,不需要屏幕、键盘、鼠标,只能远程ssh上去就可以打开了。
没有试过Ubuntu 10.10 Server版,Server版应该支持vncserver的自启动吧。Ubuntu XMODIFIERS设置问题Ubuntu上MySQL & NetBeans配置相关资讯 Ubuntu教程
- Ubuntu教程 - 使用Ubuntu拷贝CD和 (12/18/2013 14:38:16)
- 让Ubuntu 12.10支持RAR和7Z文件解 (11/15/2012 18:51:50)
- Windows 7硬盘安装Ubuntu 12.10图 (11/03/2012 19:22:47)
| - 完美安装Ubuntu 12.10最新AMD显卡 (11/27/2012 08:17:47)
- Win 7硬盘安装Ubuntu 12.10 (11/05/2012 13:30:34)
- 虚拟机上Ubuntu 11.10升级到12.04 (10/12/2012 20:00:38)
|
本文评论 查看全部评论 (0)