S98vnc

Synopsys


#
# Configure VNC to run from xinetd to allow graphical remote logins
#

Script


set -x
echo "%Post: Adding VNC service"

cp /etc/services /etc/services-$VERSION

cat >> /etc/services <<EOF
vnc-server	5900/tcp			# Xvnc
EOF

echo "%Post: Updating xinetd"
cat > /etc/xinetd.d/xvnc <<EOF
# default: No default for this service
# description: The Xvnc server serves graphical sessions using xdm

service vnc-server
{
        FLAGS           = REUSE
        socket_type     = stream
        protocol        = tcp
        wait            = no
        user            = root
        server          = /usr/bin/Xvnc
        server_args     = -inetd -query 127.0.0.1 -once -geometry 800x600 -depth 24 -securitytypes=none
        disable         = no
}
EOF

echo "%Post: Configuring XDMCP"

mv /etc/X11/xdm/xdm-config /etc/X11/xdm/xdm-config-$VERSION
sed -e 's/^\(DisplayManager.requestPort:	0\)/!\1/' /etc/X11/xdm/xdm-config-$VERSION > /etc/X11/xdm/xdm-config

mv /etc/X11/xdm/Xaccess /etc/X11/xdm/Xaccess-$VERSION
sed -e 's/^# */*/' /etc/X11/xdm/Xaccess-$VERSION > /etc/X11/xdm/Xaccess

mv /etc/X11/gdm/gdm.conf /etc/X11/gdm/gdm.conf-$VERSION
sed -s 's/^\(Enable=\)false/\1true/' /etc/X11/gdm/gdm.conf-$VERSION > /etc/X11/gdm/gdm.conf

set +x

Examples and Testing





Marked up in XHTML - ©2005 Thoughtful Solutions Ltd.