How do I configure vncserver to start GNOME or KDE by default in Red Hat Enterprise Linux ?

来源:互联网 发布:亲历新疆七五事件知乎 编辑:程序博客网 时间:2024/04/30 04:56
问题
  • How do I configure vncserver to start GNOME or KDE by default in Red Hat Enterprise Linux ?
  • Why does vnc start a basic window manager in session ?
环境
  • Red Hat Enterprise Linux 6

  • Red Hat Enterprise Linux 5

  • Red Hat Enterprise Linux 4
决议
  • Edit the file  ${HOME}/.vnc/xstartup file to run gnome-session for GNOME or startkde for KDE instead of twm as shown below
    • To start bare minimum desktop, use the below config
      #!/bin/sh[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesxsetroot -solid greyvncconfig -iconic &xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &twm &
  • To start GNOME, use the below config
    #!/bin/sh[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresvncconfig -iconic &dbus-launch --exit-with-session gnome-session &
  • To start KDE, use the below config
    #!/bin/sh[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresourcesvncconfig -iconic &startkde &

Comment

  • To configure vncserver, refer What are different ways to setup VNC on Red Hat Enterprise Linux ? .
  • On RHEL6, vncserver will start users default desktop which usually is GNOME.
  • To reset "xstartup" file, it delete and restart vncserver .
原创粉丝点击