"target" is also the name used in the debian installer for the installation target while "prefix" is too ambiguous.
60 lines
1.1 KiB
Bash
Executable File
60 lines
1.1 KiB
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Configure the new image to be a GDM VNC server.
|
|
#
|
|
# Steve
|
|
# --
|
|
# http://www.steve.org.uk/
|
|
#
|
|
|
|
|
|
TARGET=$1
|
|
|
|
|
|
|
|
#
|
|
# Source our common functions - this will let us install a Debian package.
|
|
#
|
|
if [ -e /usr/share/xen-tools/common.sh ]; then
|
|
. /usr/share/xen-tools/common.sh
|
|
else
|
|
echo "Installation problem"
|
|
fi
|
|
|
|
|
|
|
|
|
|
|
|
#
|
|
# Update APT lists.
|
|
#
|
|
chroot ${TARGET} /usr/bin/apt-get update
|
|
|
|
#
|
|
# Install the packages
|
|
#
|
|
installDebianPackage ${TARGET} xserver-xfree86
|
|
installDebianPackage ${TARGET} vncserver
|
|
installDebianPackage ${TARGET} xfonts-100dpi
|
|
installDebianPackage ${TARGET} xfonts-75dpi
|
|
installDebianPackage ${TARGET} xfonts-base
|
|
installDebianPackage ${TARGET} rxvt
|
|
installDebianPackage ${TARGET} gdm
|
|
installDebianPackage ${TARGET} icewm-experimental
|
|
|
|
#
|
|
# Add a new section to the GDM configuration file.
|
|
#
|
|
cat <<EOF >> ${TARGET}/etc/gdm/gdm.conf
|
|
[server-VNC]
|
|
name=VNC server
|
|
command=/usr/bin/Xvnc -geometry 800x600 -depth 24
|
|
flexible=true
|
|
EOF
|
|
|
|
|
|
#
|
|
# Make the new section the default
|
|
#
|
|
perl -pi.bak -e 's/^0=Standard\n//g ; s/^\[servers\]/\[servers\]\n0=VNC/g' ${TARGET}/etc/gdm/gdm.conf
|