Linux系统VNC配置实践总结

摘自:http://www.cnblogs.com/kerrycode/p/3315793.html

Ubuntu安装vnc+gnome的xstartup配置 

 http://www.cnblogs.com/burningroy/p/3591649.html

Log 1 安装vncserver并且在xstartup配置gnome

背景:学习Ruby,想在ubuntu下使用rubymine

时间:2014-3-10

环境:Ubuntu

记录:Roy

其实这个的资料很多,只是为了自己再记录下。谢谢前人的分享。记录本文的原因主要是为了最后那个桌面图标的显示。因为查了很多资料,照着做都没有成功。


 

安装gnome

$ sudo apt-get install gnome-core

安装vncserver

$ sudo apt-get install vnc4server

 

启动vncserver

$ vncserver

这时会提示你设置密码。设置完成后,log会显示你启动了vnc session到port 1.

关闭vnc

$ vncserver -kill :1

修改~/.vnc/xstartup

复制代码
 1 #!/bin/sh  2   3 # Uncomment the following two lines for normal desktop:  4 unset SESSION_MANAGER  5 #exec /etc/X11/xinit/xinitrc  6   7 [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup  8 [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources  9 xsetroot -solid grey 10 vncconfig -iconic & 11 x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & 12 gnome-session-fallback & 13 #x-window-manager &
复制代码

重新启动vnc

$ vncserver

好了,接下来就去查看。

注意这里的gnome-session-fallback $,之前我使用的gnome-session $,果断华丽的没有桌面图标和bar。这个问题,我搜索了很久。终于在这个地方找到了答案(http://blog.chinaunix.net/uid-12084847-id-3508474.html)。

查看session文件夹

$ ls /usr/share/gnome-session/sessions

搞定!

原文地址:https://www.cnblogs.com/LiuYanYGZ/p/7487110.html