1
0
mirror of synced 2026-02-08 00:31:28 +00:00
Files
xen-tools.xen-tools/etc/role.d/gdm
steve f387260654 2006-01-07 21:54:44 by steve
Big changes:  xen-create-image.d has been renamed to hook.d
  There is now support for roles, via role.d - which allows per-role scripts to run.
2006-01-07 21:54:44 +00:00

62 lines
1.0 KiB
Bash
Executable File

#!/bin/sh
#
# Configure the new image to be a GDM VNC server.
#
# Steve
# --
# http://www.steve.org.uk/
#
# $Id: gdm,v 1.1 2006-01-07 21:54:44 steve Exp $
prefix=$1
#
# This function installs a single package into the chroot, forcing
# the installation to be non-interactive.
#
function install_package
{
package=$1
DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install $package
}
#
# Update APT lists.
#
chroot ${prefix} /usr/bin/apt-get update
#
# Install the packages
#
install_package xserver-xfree86
install_package vncserver
install_package xfonts-100dpi
install_package xfonts-75dpi
install_package xfonts-base
install_package rxvt
install_package gdm
install_package icewm-experimental
#
# Add a new section to the GDM configuration file.
#
cat <<EOF >> ${prefix}/etc/X11/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/0=VNC/g' ${prefix}/etc/X11/gdm/gdm.conf