From e22ed7127b411242eaee8ff2e596d95b12cfbf23 Mon Sep 17 00:00:00 2001 From: freetz Date: Wed, 12 Apr 2006 16:03:21 +0000 Subject: [PATCH] - missing from tarball Changed files: gdm-gdmthemetester.in -> 1.1 --- gdm-gdmthemetester.in | 109 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 109 insertions(+) create mode 100644 gdm-gdmthemetester.in diff --git a/gdm-gdmthemetester.in b/gdm-gdmthemetester.in new file mode 100644 index 0000000..139e1e0 --- /dev/null +++ b/gdm-gdmthemetester.in @@ -0,0 +1,109 @@ +#!/bin/sh + +gdmwhich () { + COMMAND="$1" + OUTPUT= + IFS=: + for dir in $PATH + do + if test -x "$dir/$COMMAND" ; then + if test "x$OUTPUT" = "x" ; then + OUTPUT="$dir/$COMMAND" + fi + fi + done + IFS=$OLD_IFS + echo "$OUTPUT" +} + +echo +echo "GDM Theme Tester" +echo +echo "Be sure to test all the environments:" +echo " console, console-timed, flexi, remote-flexi, xdmcp" +echo "Also be sure to test using caps lock" +echo + +XNEST=`gdmwhich Xnest` +GDMXNEST=`gdmwhich gdmXnest` +GDMGREETER="@libexecdir@/gdmgreeter" + +if [ x$XNEST = x ]; then + echo "ERROR: Xnest not found" + echo "" + exit 1 +fi + +if [ x$GDMXNEST = x ]; then + echo "ERROR: gdmXnest not found" + echo "" + exit 1 +fi + +if [ x$GDMGREETER = x ]; then + echo "ERROR: gdmgreeter not found" + echo "" + exit 1 +fi + +USAGE=" +Usage: $0 + is one of: console, console-timed, flexi, remote-flexi, xdmcp + is either the path of the theme or the name of an installed theme + +If you set the environment variable XNESTSIZE to x (e.g. 800x600) +you can test the greeter at that resolution +" +if [ "$#" != 2 ]; then + echo "$USAGE" + exit 1 +fi + +GDM_THEME="$2" +DOING_GDM_DEVELOPMENT=yes +GDM_PARENT_DISPLAY="$DISPLAY" +export GDM_THEME DOING_GDM_DEVELOPMENT GDM_PARENT_DISPLAY + +case $1 in +console) + GDM_IS_LOCAL=yes + export GDM_IS_LOCAL + ;; +console-timed) + GDM_IS_LOCAL=yes + GDM_FAKE_TIMED=yes + export GDM_IS_LOCAL GDM_FAKE_TIMED + ;; +flexi) + GDM_IS_LOCAL=yes + GDM_FLEXI_SERVER=yes + export GDM_IS_LOCAL GDM_FLEXI_SERVER + ;; +remote-flexi) + GDM_FLEXI_SERVER=yes + export GDM_FLEXI_SERVER + ;; +xdmcp) + ;; +*) + echo "$USAGE" + exit 1 + ;; +esac + +if [ "x$XNESTSIZE" = x ] ; then + eval `gdmXnest -b` +else + eval `gdmXnest -b -o "-geometry $XNESTSIZE"` +fi +export DISPLAY + +if [ "x$GDM_PARENT_DISPLAY" = "x$DISPLAY" ]; then + echo "ERROR: Can't start the Xnest server" + exit 1 +fi + +# This may not be necessary +sleep 1 + +@libexecdir@/gdmgreeter -- 2.44.0