问题
- 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/.Xresources xsetroot -solid grey vncconfig -iconic & xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & twm &
- To start bare minimum desktop, use the below config
- To start GNOME, use the below config
#!/bin/sh [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xres vncconfig -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/.Xresources vncconfig -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 .