diff options
author | George Lebl <jirka@5z.com> | 2003-07-19 23:35:37 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2003-07-19 23:35:37 +0000 |
commit | 19e695b94366fa5918c11a2fdf7281abd5239062 (patch) | |
tree | 7a090e86af33b0e00559705aec454bcfadf8ccad /config | |
parent | dec056b7317e7f43bebd287a3ca837076f0ab470 (diff) | |
download | gdm-19e695b94366fa5918c11a2fdf7281abd5239062.tar.gz |
update the documentation a lot and install the docs. Yay! We have actual
Sat Jul 19 16:33:19 2003 George Lebl <jirka@5z.com>
* docs/C/gdm.xml, configure.in, docs/C/Makefile.am,
docs/Makefile.am, xmldocs.make, omf.make: update the
documentation a lot and install the docs. Yay! We
have actual documentation now!!!
* daemon/misc.c: add sys/time.h and sys/resource.h includes
(from looking at the FreeBSD patches)
* daemon/slave.c: pass LOGIN_SETENV as well to setusercontext
(from looking at the FreeBSD patches)
* gui/gdmsetup.c: fix gccism, and look for the chown/chmod command
(from looking at the FreeBSD patches)
* gui/gdmphotosetup.c: add signal.h include
(from looking at the FreeBSD patches)
* configure.in, utils/Makefile.am: When the security/pam_misc.h is
available also test for where the misc_conv function is as it seems
to be sometimes compiled into the main libpam (FreeBSD for example)
(from looking at the FreeBSD patches)
* config/Default.in, config/Xsession.in, config/(Pre|Post)Session.in,
config/XKeepsCrashing: don't use command -v and use which properly.
And avoid stderr from which
* utils/gdmaskpass.c: use GETTEXT_PACKAGE here
* configure.in, utils/gdmtranslate.c, utils/Makefile.am,
config/XKeepsCrashing, config/Xsession.in, config/Makefile.am:
Add gdmtranslate libexec proggie since gettext command is not
always installed apparently (non-developer machines) so we
can't rely on it existing. Also do translations from the
Xsession script
* gui/gdmlogin.c, gui/greeter/greeter_system.c: Fix #117504 by
changing the tooltip to be more informative
* gui/greeter/greeter_system.c: Fix warnings when not all
system dialog possibilities are present
* Makefile.am, greeter.c, greeter.dtd, greeter_configuration.h,
greeter_item.[ch], greeter_item_customlist.[ch],
greeter_parser.[ch], greeter_system.c: Add listitem (proposed
as customitem to the release-team) tags that can be inside
a list and thus create custom widgetry. At this point all
custom widgetry that can be done is a list to pick from but
this should be possible to extend for some future releases.
This custom info is then written to a per display file
to use from login scripts or elsewhere. While I was there
I fixed leaks and crashes when the parser would find parse
errors.
* docs/C/gdmconfig/*, docs/C/gdm.sgml, docs/C/gdm-manual.txt:
remove everything here as it was old and unused and outdated.
Diffstat (limited to 'config')
-rw-r--r-- | config/Default.in | 22 | ||||
-rw-r--r-- | config/Makefile.am | 2 | ||||
-rwxr-xr-x | config/PostSession.in | 7 | ||||
-rwxr-xr-x | config/PreSession.in | 15 | ||||
-rwxr-xr-x | config/XKeepsCrashing | 12 | ||||
-rwxr-xr-x | config/Xsession.in | 42 | ||||
-rw-r--r-- | config/gettextfoo.h | 2 |
7 files changed, 68 insertions, 34 deletions
diff --git a/config/Default.in b/config/Default.in index fec2e819..9cafb95e 100644 --- a/config/Default.in +++ b/config/Default.in @@ -7,22 +7,24 @@ PATH=@X_PATH@:$PATH sysmodmap=/etc/X11/Xmodmap -if command -v xmodmap > /dev/null 2>&1; then - if [ -z "$GDM_PARENT_DISPLAY" ]; then +XMODMAP=`which xmodmap 2>/dev/null` +if [ x$XMODMAP != x ] ; then + if [ x$GDM_PARENT_DISPLAY = x ]; then if [ -f $sysmodmap ]; then - xmodmap $sysmodmap + $XMODMAP $sysmodmap fi else - ( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY xmodmap -pke ) | xmodmap - + ( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY $XMODMAP -pke ) | $XMODMAP - fi fi -if command -v setxkbmap > /dev/null 2>&1; then +SETXKBMAP=`which setxkbmap 2>/dev/null` +if [ x$SETXKBMAP != x ] ; then # FIXME: is this all right? Is this completely on crack? # What this does is move the xkb configuration from the GDM_PARENT_DISPLAY # FIXME: This should be done in code. Or there must be an easier way ... if [ -n "$GDM_PARENT_DISPLAY" ]; then - XKBSETUP=`( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY setxkbmap -v )` + XKBSETUP=`( DISPLAY=$GDM_PARENT_DISPLAY XAUTHORITY=$GDM_PARENT_XAUTHORITY $SETXKBMAP -v )` if [ -n "$XKBSETUP" ]; then XKBKEYMAP=`echo "$XKBSETUP" | grep '^keymap' | awk '{ print $2 }'` XKBTYPES=`echo "$XKBSETUP" | grep '^types' | awk '{ print $2 }'` @@ -30,13 +32,13 @@ if command -v setxkbmap > /dev/null 2>&1; then XKBSYMBOLS=`echo "$XKBSETUP" | grep '^symbols' | awk '{ print $2 }'` XKBGEOMETRY=`echo "$XKBSETUP" | grep '^geometry' | awk '{ print $2 }'` if [ -n "$XKBKEYMAP" ]; then - setxkbmap -keymap "$XKBKEYMAP" + $SETXKBMAP -keymap "$XKBKEYMAP" elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" -a -n "$XKBGEOMETRY" ]; then - setxkbmap -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" + $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" -geometry "$XKBGEOMETRY" elif [ -n "$XKBTYPES" -a -n "$XKBCOMPAT" -a -n "$XKBSYMBOLS" ]; then - setxkbmap -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" + $SETXKBMAP -types "$XKBTYPES" -compat "$XKBCOMPAT" -symbols "$XKBSYMBOLS" elif [ -n "$XKBSYMBOLS" ]; then - setxkbmap -symbols "$XKBSYMBOLS" + $SETXKBMAP -symbols "$XKBSYMBOLS" fi fi fi diff --git a/config/Makefile.am b/config/Makefile.am index 4db3cbd8..1e4bb289 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -30,7 +30,7 @@ EXTRA_DIST = \ gettextfoo.h \ extract-shell.sh -gettextfoo.h: XKeepsCrashing +gettextfoo.h: XKeepsCrashing Xsession.in cat $^ | $(srcdir)/extract-shell.sh > gettextfoo.h @INTLTOOL_DESKTOP_RULE@ diff --git a/config/PostSession.in b/config/PostSession.in index 75e54ae7..a139b7cb 100755 --- a/config/PostSession.in +++ b/config/PostSession.in @@ -1,8 +1,9 @@ #!/bin/sh -PATH=@X_PATH@:$PATH +PATH=@X_PATH@:$PATH:/bin:/usr/bin -if command -v sessreg > /dev/null 2>&1; then - sessreg -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER +SESSREG=`which sessreg 2>/dev/null` +if [ x$SESSREG != x ] ; then + $SESSREG -d -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER fi exit 0 diff --git a/config/PreSession.in b/config/PreSession.in index c1af766a..bf557be2 100755 --- a/config/PreSession.in +++ b/config/PreSession.in @@ -6,18 +6,21 @@ # # Note that output goes into the .xsession-errors file for easy debugging # -PATH=@X_PATH@:$PATH +PATH=@X_PATH@:$PATH:/bin:/usr/bin -if command -v xsetroot > /dev/null 2>&1; then - xsetroot -cursor_name left_ptr -solid "#363047" +XSETROOT=`which xsetroot 2>/dev/null` +if [ x$XSETROOT != x ] ; then + $XSETROOT -cursor_name left_ptr -solid "#363047" fi -if command -v sessreg > /dev/null 2>&1; then + +SESSREG=`which sessreg 2>/dev/null` +if [ x$SESSREG != x ] ; then # some output for easy debugging echo "$0: Registering your session with wtmp and utmp" - echo "$0: running: sessreg -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l $DISPLAY $USER" + echo "$0: running: $SESSREG -a -w /var/log/wtmp -u /var/run/utmp -x \"$X_SERVERS\" -h \"$REMOTE_HOST\" -l $DISPLAY $USER" - exec sessreg -a -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER + exec $SESSREG -a -w /var/log/wtmp -u /var/run/utmp -x "$X_SERVERS" -h "$REMOTE_HOST" -l $DISPLAY $USER # this is not reached fi diff --git a/config/XKeepsCrashing b/config/XKeepsCrashing index ce0f0fe6..2b81b62a 100755 --- a/config/XKeepsCrashing +++ b/config/XKeepsCrashing @@ -1,12 +1,16 @@ #!/bin/sh -GTBIN=`which gettext` +if [ -x "$LIBEXECDIR/gdmtranslate" ] ; then + GDMTRANSLATE="$LIBEXECDIR/gdmtranslate" +else + GDMTRANSLATE= +fi gettextfunc () { - if test "x$GTBIN" = "x" ; then - echo "$1" + if [ "x$GDMTRANSLATE" != "x" ] ; then + $GDMTRANSLATE "$1" else - $GTBIN -s "$1" + echo "$1" fi } diff --git a/config/Xsession.in b/config/Xsession.in index 02d870f7..7979c2bf 100755 --- a/config/Xsession.in +++ b/config/Xsession.in @@ -33,7 +33,26 @@ test -f $HOME/.profile && . $HOME/.profile test -f /etc/xprofile && . /etc/xprofile test -f $HOME/.xprofile && . $HOME/.xprofile -zenity=`which zenity` +# Translation stuff +if [ -x "@EXPANDED_LIBEXECDIR@/gdmtranslate" ] ; then + gdmtranslate="@EXPANDED_LIBEXECDIR@/gdmtranslate" +else + gdmtranslate= +fi + +# Note that this should only go to zenity dialogs which always expect utf8 +gettextfunc () { + if [ "x$gdmtranslate" != "x" ] ; then + $gdmtranslate --utf8 "$1" + else + echo "$1" + fi +} + +zenity=`which zenity 2>/dev/null` +if [ -z "$zenity" ] ; then + echo "zenity not found!" +fi command="$1" @@ -43,7 +62,7 @@ fi if [ x"$command" = xfailsafe ] ; then if [ -n "$zenity" ] ; then - $zenity --info --text "This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type \"exit\" in the window in the upper left corner" + $zenity --info --text `gettextfunc "This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"` fi exec xterm -geometry 80x24+0+0 fi @@ -52,8 +71,9 @@ fi # works for ALL sessions (except ones named 'Failsafe') # clean up after xbanner -if which freetemp 2> /dev/null ; then - freetemp +freetemp=`which freetemp 2>/dev/null` +if [ -n "$freetemp" ] ; then + $freetemp fi userresources=$HOME/.Xresources @@ -125,12 +145,12 @@ unset XKB_IN_USE # Normalize languages, some places/distros screw us up in /etc/profile, # so in case the user did select a language if [ -n "$GDM_LANG" ]; then - LANG=$GDM_LANG + LANG="$GDM_LANG" export LANG if [ -n "$LC_ALL" ]; then if [ "$LC_ALL" != "$LANG" ]; then - LC_ALL=$LANG + LC_ALL="$LANG" fi else unset LC_ALL @@ -138,7 +158,7 @@ if [ -n "$GDM_LANG" ]; then if [ -n "$LANGUAGE" ]; then if [ "$LANGUAGE" != "$LANG" ]; then - LANGUAGE=$LANG + LANGUAGE="$LANG" fi else unset LANGUAGE @@ -146,7 +166,7 @@ if [ -n "$GDM_LANG" ]; then if [ -n "$LINGUAS" ]; then if [ "$LINGUAS" != "$LANG" ]; then - LINGUAS=$LANG + LINGUAS="$LANG" fi else unset LINGUAS @@ -186,9 +206,11 @@ if [ "x$command" = "xdefault" ] ; then fi # add ssh-agent if found -sshagent=`which ssh-agent` +sshagent=`which ssh-agent 2>dev/null` if [ -n "$sshagent" ] && [ -x "$sshagent" ] && [ -z "$SSH_AUTH_SOCK" ]; then command="$sshagent -- $command" +elif [ -z "$sshagent" ] ; then + echo "ssh-agent not found!" fi echo "Xsession: Setup done, will execute: $command" @@ -198,7 +220,7 @@ eval exec $command echo "Xsession: Executing $command failed, will run xterm" if [ -n "$zenity" ] ; then - $zenity --info --text "I could not start your session and so I have started the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type \"exit\" in the window in the upper left corner" + $zenity --info --text `gettextfunc "I could not start your session and so I have started the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"` fi exec xterm -geometry 80x24+0+0 diff --git a/config/gettextfoo.h b/config/gettextfoo.h index 8392cef1..cb3dfd35 100644 --- a/config/gettextfoo.h +++ b/config/gettextfoo.h @@ -9,3 +9,5 @@ const char *foo = N_("I cannot start the X server (your graphical interface). I const char *foo = N_("Would you like to view the detailed X server output as well?"); const char *foo = N_("I cannot start the X server (your graphical interface). It seems that the pointer device (your mouse) is not set up correctly. Would you like to view the X server output to diagnose the problem?"); const char *foo = N_("Would you like me to try to run the mouse configuration program? Note that you will need the root password for this."); +const char *foo = N_("This is the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"); +const char *foo = N_("I could not start your session and so I have started the failsafe xterm session. Windows now have focus only if you have your cursor above them. To get out of this mode type 'exit' in the window in the upper left corner"); |