歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
您现在的位置: Linux教程網 >> UnixLinux >  >> Linux基礎 >> 關於Linux

Linux開機啟動VNCserver

Linux開機啟動VNCserver   Debian開機啟動VNC:    www.2cto.com   啟動VNC並設置: startjwm &   firefox --display=:1   設置VNC開機啟動 vim /etc/init.d/vncserver   Sehll代碼   ### BEGIN INIT INFO   # Provides: vncserver   # Required-Start: $remote_fs $syslog   # Required-Stop: $remote_fs $syslog   # Default-Start: 2 3 4 5   # Default-Stop: 0 1 6   # Short-Description: Start daemon at boot time   # Description: Enable service provided by daemon.   ### END INIT INFO   PATH="$PATH:/usr/X11R6/bin/"   # The Username:Group that will run VNC   export USER="root"   #${RUNAS}   # The display that VNC will use   DISPLAY="1"   # Color depth (between 8 and 32)   DEPTH="16"   # The Desktop geometry to use.   #GEOMETRY="x"   GEOMETRY="800x600"   #You Can Choice GEOMETRY="1024x768" && GEOMETRY="1280x1024"   # The name that the VNC Desktop will have.   NAME="Vncserver"   OPTIONS="-name ${NAME} -depth ${DEPTH} -geometry ${GEOMETRY} :${DISPLAY}"   . /lib/lsb/init-functions   case "$1" in   start)   su ${USER} -c "/usr/bin/vncserver ${OPTIONS}"   ;;   stop)   su ${USER} -c "/usr/bin/vncserver -kill :${DISPLAY}"   ;;   restart)   $0 stop   $0 start   ;;   esac   exit 0     添加權限 chmod +x /etc/init.d/vncserver 使配置生效 update-rc.d vncserver defaults 添加計劃任務,定時重啟vnc或者系統,以防止firefox假死不出分 crontab -e   CentOS開機啟動VNC:   1.配置vnc   /etc/sysconfig/vncservers   2.shift+g 移到最後插入下面的代碼   [code="SHELL"]VNCSERVERS="1:root" VNCSERVERARGS[1]="-geometry 800x600" 3.設置vnc自動啟動   chkconfig vncserver on   4.安裝flash插件   wget http://blog.firetry.com/soft/libflashplayer.so   mkdir -p ~/.mozilla/plugins    cp libflashplayer.so ~/.mozilla/plugins/   5.下載vagex 插件,youtube優化插件   wget http://vagex-debian.googlecode.com/files/youtube_video_quality_manager-1.2-fx.xpi  
Copyright © Linux教程網 All Rights Reserved