=========================vnc root desktop=======================================
#!/bin/sh
[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
case "$WINDOWMANAGER" in
*gnome*)
if [ -e /etc/SuSE-release ]; then
PATH=$PATH:/opt/gnome/bin
export PATH
fi
;;
esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
============================vnc kde desktop==============================
#!/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" &
platform=`uname -s`
if [ "$platform" = "AIX" ] ; then
echo "Detected AIX platform. Enabling X11 Forwarding..."
/usr/local/packages/aime/ias/run_as_root 'sed s/"#X11Forwarding no"/"X11Forwarding yes"/g /etc/ssh/sshd_config > /etc/ssh/sshd_config_temp'
/usr/local/packages/aime/ias/run_as_root 'mv /etc/ssh/sshd_config_temp /etc/ssh/sshd_config'
/usr/local/packages/aime/ias/run_as_root 'sed s/"X11Forwarding no"/"X11Forwarding yes"/g /etc/ssh/sshd_config > /etc/ssh/sshd_config_temp'
/usr/local/packages/aime/ias/run_as_root 'mv /etc/ssh/sshd_config_temp /etc/ssh/sshd_config'
/usr/local/packages/aime/ias/run_as_root 'stopsrc -s sshd'
/usr/local/packages/aime/ias/run_as_root 'startsrc -s sshd'
exec /usr/dt/bin/dtsession &
xhost +
else
if [ "$platform" = "SunOS" ] ; then
gnome-wm&
unset SESSION_MANAGER
sleep 10
/usr/X/bin/xscreensaver-command -exit
else
if [ "$platform" = "Linux" ] ; then
exec /usr/bin/startkde
else
if [ "$platform" = "HP-UX" ] ; then
mwm&
else
twm&
fi
fi
fi
fi
#!/bin/sh
[ -r /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n
export LANG
export SYSFONT
vncconfig -iconic &
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
OS=`uname -s`
if [ $OS = 'Linux' ]; then
case "$WINDOWMANAGER" in
*gnome*)
if [ -e /etc/SuSE-release ]; then
PATH=$PATH:/opt/gnome/bin
export PATH
fi
;;
esac
fi
if [ -x /etc/X11/xinit/xinitrc ]; then
exec /etc/X11/xinit/xinitrc
fi
if [ -f /etc/X11/xinit/xinitrc ]; then
exec sh /etc/X11/xinit/xinitrc
fi
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
twm &
============================vnc kde desktop==============================
#!/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" &
platform=`uname -s`
if [ "$platform" = "AIX" ] ; then
echo "Detected AIX platform. Enabling X11 Forwarding..."
/usr/local/packages/aime/ias/run_as_root 'sed s/"#X11Forwarding no"/"X11Forwarding yes"/g /etc/ssh/sshd_config > /etc/ssh/sshd_config_temp'
/usr/local/packages/aime/ias/run_as_root 'mv /etc/ssh/sshd_config_temp /etc/ssh/sshd_config'
/usr/local/packages/aime/ias/run_as_root 'sed s/"X11Forwarding no"/"X11Forwarding yes"/g /etc/ssh/sshd_config > /etc/ssh/sshd_config_temp'
/usr/local/packages/aime/ias/run_as_root 'mv /etc/ssh/sshd_config_temp /etc/ssh/sshd_config'
/usr/local/packages/aime/ias/run_as_root 'stopsrc -s sshd'
/usr/local/packages/aime/ias/run_as_root 'startsrc -s sshd'
exec /usr/dt/bin/dtsession &
xhost +
else
if [ "$platform" = "SunOS" ] ; then
gnome-wm&
unset SESSION_MANAGER
sleep 10
/usr/X/bin/xscreensaver-command -exit
else
if [ "$platform" = "Linux" ] ; then
exec /usr/bin/startkde
else
if [ "$platform" = "HP-UX" ] ; then
mwm&
else
twm&
fi
fi
fi
fi