diff options
author | George Lebl <jirka@5z.com> | 2002-07-23 18:47:51 +0000 |
---|---|---|
committer | George Lebl <jirka@src.gnome.org> | 2002-07-23 18:47:51 +0000 |
commit | 721347aced6de71c99ae58a40e7c0b1e97b850d2 (patch) | |
tree | d09c2d49b7c17f86b304903548573312933ba91e /config | |
parent | a2dfd16fa7c556a89da35645987214980de63fa9 (diff) | |
download | gdm-721347aced6de71c99ae58a40e7c0b1e97b850d2.tar.gz |
prefer the gnome-session in PATH, fix some startup stuff add
Tue Jul 23 11:20:56 2002 George Lebl <jirka@5z.com>
* config/gnomerc.in, config/Makefile.am, config/Xsesssion.in,
config/Gnome.in: prefer the gnome-session in PATH, fix some
startup stuff add gnome-volume-control init to gnomerc,
whack the redhat specific setup, and copy parts of the redhat's
Xsession file to our own and if switchdesk is installed make
Xsession the default, so now all the good stuff happens on
redhat even if you leave the default session. And this Xsession
file should work on other systems just as well.
* config/gdm.conf.in, config/PreSession, daemon/gdm.h: My gf doesn't
like those ugly green backgrounds so change the color to what
ximian uses as I kind of like that, (and did I mention that
this way it's not green?). Also set the background in PreSession
so that you get it for all sessions as default.
* daemon/gdm.c: fix error handling of bad reboot/suspend/halt,
add chdir ("/") from the hpux ximain patches, in the signal_notify
add a main loop wakeup function which may fix some issues possibly
the freebsd issues and should make this work on hpux just like the
complicated and mostly weird ximian patch.
Diffstat (limited to 'config')
-rwxr-xr-x | config/Default.redhat | 3 | ||||
-rwxr-xr-x | config/Gnome.in | 10 | ||||
-rw-r--r-- | config/Makefile.am | 9 | ||||
-rwxr-xr-x | config/PreSession | 4 | ||||
-rwxr-xr-x | config/Xsession.in (renamed from config/Xsession) | 53 | ||||
-rw-r--r-- | config/gdm.conf.in | 2 | ||||
-rw-r--r-- | config/gnomerc.in | 12 |
7 files changed, 73 insertions, 20 deletions
diff --git a/config/Default.redhat b/config/Default.redhat deleted file mode 100755 index 8b14dac8..00000000 --- a/config/Default.redhat +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -exec /etc/X11/xdm/Xsession diff --git a/config/Gnome.in b/config/Gnome.in index f799f5f3..e6b7d403 100755 --- a/config/Gnome.in +++ b/config/Gnome.in @@ -1,15 +1,5 @@ #!/bin/sh -for errfile in "$HOME/.gnomerc-errors" "${TMPDIR-/tmp}/gnomerc-$USER" "/tmp/gnomerc-$USER" -do - if ( cp /dev/null "$errfile" 2> /dev/null ) - then - chmod 600 "$errfile" - exec > "$errfile" 2>&1 - break - fi -done - # # Distributors: # You should modify the paths here to fit your distro diff --git a/config/Makefile.am b/config/Makefile.am index f0f531e8..aa4008be 100644 --- a/config/Makefile.am +++ b/config/Makefile.am @@ -15,14 +15,13 @@ EXTRA_DIST = \ gdm.conf.in \ Gnome.in \ gnomerc.in \ - Xsession \ + Xsession.in \ gdm \ gdm-autologin \ locale.alias \ Default \ PostSession \ PreSession \ - Default.redhat \ XKeepsCrashing \ gettextfoo.h \ extract-shell.sh @@ -30,7 +29,7 @@ EXTRA_DIST = \ gettextfoo.h: XKeepsCrashing cat $^ | $(srcdir)/extract-shell.sh > gettextfoo.h -install-data-hook: gdm.conf gnomerc Gnome +install-data-hook: gdm.conf gnomerc Gnome Xsession if test '!' -d $(DESTDIR)$(confdir); then \ $(mkinstalldirs) $(DESTDIR)$(confdir); \ chmod 755 $(DESTDIR)$(confdir); \ @@ -62,11 +61,11 @@ install-data-hook: gdm.conf gnomerc Gnome fi $(INSTALL_SCRIPT) Gnome $(DESTDIR)$(sessdir)/Gnome - -if test -f /etc/redhat-release; then \ + -if test -f /usr/bin/switchdesk; then \ if test -f $(DESTDIR)$(sessdir)/Default; then \ cp $(DESTDIR)$(sessdir)/Default $(DESTDIR)$(sessdir)/Default.orig; \ fi; \ - $(INSTALL_SCRIPT) $(srcdir)/Default.redhat $(DESTDIR)$(sessdir)/Default; \ + $(LN_S) -f $(sessdir)/Xsession $(DESTDIR)$(sessdir)/Default; \ fi if test '!' -d $(DESTDIR)$(initdir); then \ diff --git a/config/PreSession b/config/PreSession index ef820bd1..e485dbac 100755 --- a/config/PreSession +++ b/config/PreSession @@ -8,6 +8,10 @@ # PATH=/usr/bin/X11:/usr/X11R6/bin:/opt/X11R6/bin:$PATH +if command -v xsetroot > /dev/null 2>&1; then + xsetroot -cursor_name left_ptr -solid "#363047" +fi + if command -v sessreg > /dev/null 2>&1; then # some output for easy debugging echo "$0: Registering your session with wtmp and utmp" diff --git a/config/Xsession b/config/Xsession.in index 7f201dc2..ff2d9053 100755 --- a/config/Xsession +++ b/config/Xsession.in @@ -5,7 +5,7 @@ case $# in 1) case $1 in failsafe) - exec xterm -geometry 80x24-0-0 + exec xterm -geometry 80x24+0+0 ;; esac esac @@ -91,6 +91,57 @@ fi unset XKB_IN_USE +# run all system xinitrc shell scripts. +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for i in /etc/X11/xinit/xinitrc.d/* ; do + if [ -x "$i" ]; then + . "$i" + fi + done +fi + +# now, we see if xdm/gdm/kdm has asked for a specific environment +case $# in +1) + if [ -x "/usr/share/apps/switchdesk/Xclients.$1" ]; then + exec /bin/sh "/usr/share/apps/switchdesk/Xclients.$1"; + fi; + + case $1 in + failsafe) + exec xterm -geometry 80x24+0+0 + ;; + gnome) + exec -l $SHELL -c "gnome-session" + if [ -x "$HOME/.gnomerc" ]; then + exec $HOME/.gnomerc + elif [ -x @EXPANDED_SYSCONFDIR@/gdm/gnomerc ]; then + exec @EXPANDED_SYSCONFDIR@/gdm/gnomerc + else + # as fallback in case the config is screwed + exec gnome-session + fi + ;; + kde|kde1|kde2) + if [ -x "/usr/share/apps/switchdesk/Xclients.kde" ]; then + exec "/usr/share/apps/switchdesk/Xclients.kde" + else + #fallback for non-redhat + exec startkde + fi + ;; + twm) + # fall back to twm + if [ -x "/usr/share/apps/switchdesk/Xclients.twm" ]; then + exec "/usr/share/apps/switchdesk/Xclients.twm" + else + #fallback for non-redhat + exec twm + fi + ;; + esac +esac + if [ -x "$startup" ]; then exec "$startup" elif [ -x "$HOME/.Xclients" ]; then diff --git a/config/gdm.conf.in b/config/gdm.conf.in index 806761b2..b112e36c 100644 --- a/config/gdm.conf.in +++ b/config/gdm.conf.in @@ -113,7 +113,7 @@ XineramaScreen=0 BackgroundType=2 BackgroundImage= BackgroundScaleToFit=true -BackgroundColor=#007777 +BackgroundColor=#363047 BackgroundRemoteOnlyColor=true BackgroundProgram= ShowGnomeChooserSession=true diff --git a/config/gnomerc.in b/config/gnomerc.in index 06922197..5e2ab5b6 100644 --- a/config/gnomerc.in +++ b/config/gnomerc.in @@ -1 +1,13 @@ +#!/bin/sh + +# Do we have gnome-volume-control? +# If so we should run it to load the gnome-volume-control settings +if command -v gnome-volume-control > /dev/null 2>&1; then + gnome-volume-control -i +else if [ -x @EXPANDED_BINDIR@/gnome-volume-control > /dev/null 2>&1; then + @EXPANDED_BINDIR@/gnome-volume-control -i +fi + +# path takes precedence +exec gnome-session exec @EXPANDED_BINDIR@/gnome-session |