chiark / gitweb /
Merge branch 'master' of vampire:etc/profile
authorMark Wooding <mdw@distorted.org.uk>
Sun, 5 Jun 2011 10:47:36 +0000 (11:47 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 5 Jun 2011 10:47:36 +0000 (11:47 +0100)
* 'master' of vampire:etc/profile:
  dot/xinitrc: Shut down the Gnome session properly on exit.
  dot/xinitrc: Fiddle with window manager selection.
  dot/xinitrc: Run an early user hook script.
  setup: Modify URL for the FTP repository.
  mdw.conf: Use rĂ´le address for the default web cache.
  dot/bash_profile: Use `kbd_mode' to check for UTF-8 console.
  bin/sendmail-hack: Grim hack for Emacs to invoke sendmail.

bin/sendmail-hack [new file with mode: 0755]
dot/bash_profile
dot/xinitrc
mdw.conf
setup

diff --git a/bin/sendmail-hack b/bin/sendmail-hack
new file mode 100755 (executable)
index 0000000..0ce0ea3
--- /dev/null
@@ -0,0 +1,5 @@
+#! /bin/sh
+
+set -e
+unset LD_PRELOAD
+exec ${REAL_SENDMAIL-/usr/sbin/sendmail} "$@"
index de5a5cf551ac96411ca5f014f40bee9290fa8d34..1621d13d56cb4182015d063bba1d934fbf520afd 100644 (file)
@@ -135,7 +135,8 @@ else
   : ${LANG=${LC_CTYPE-${LC_ALL-`mdw-conf console-ctype`}}}
   case "$TERM,`tty`" in
     linux,/dev/tty*)
-      if vt-is-UTF8 >/dev/null 2>&1; then
+      if { vt-is-UTF8 ||
+          kbd_mode | grep UTF-8; } >/dev/null 2>&1; then
        ctype=.utf8
       else
        ctype=
index 314136784ef3bf8ef5f6b5c0551c82a3700b7540..8fce589db011b56d1213649c07b13c3b44b79d24 100755 (executable)
@@ -70,6 +70,13 @@ EOF
   esac
 done
 
+###--------------------------------------------------------------------------
+### Preliminary hook.
+
+if [ -r $HOME/.xinitrc-prehook ]; then
+  . $HOME/.xinitrc-prehook
+fi
+
 ###--------------------------------------------------------------------------
 ### Iniitial settings.
 
@@ -98,7 +105,7 @@ initialize () {
 ###--------------------------------------------------------------------------
 ### Start a window manager.
 
-wm=$(pick_program window-manager enlightenment e16 twm)
+wm=$(pick_program window-manager e16 compiz enlightenment e17 twm)
 wmopts=""
 case "$wm,$vnc" in
   enlightenment,yes | e16,yes)
@@ -329,6 +336,28 @@ EOF
   done
 }
 
+###--------------------------------------------------------------------------
+### Gnome session care and feeding.
+
+session-running-p () {
+  dbus-send --session --print-reply --dest=org.freedesktop.DBus / \
+    org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager \
+    >/dev/null 2>&1
+}
+
+kill-gnome-session () {
+  if session-running-p; then
+    info "killing Gnome session manager"
+    dbus-send --session \
+      --dest=org.gnome.SessionManager /org/gnome/SessionManager \
+      org.gnome.SessionManager.Logout uint32:2
+    for i in 1 2 3 4 5; do
+      sleep 1
+      if ! session-running-p; then break; fi
+    done
+  fi
+}
+
 ###--------------------------------------------------------------------------
 ### Actually start things up.
 
@@ -353,6 +382,7 @@ esac
 case "$wait" in
   yes)
     xwait
+    kill-gnome-session
     ;;
   no)
     info "not waiting before exit"
index 9c78fbf76f99faad4b775fda6036b584f4e2f7b7..ec63e827b9b8bfc329906193dd78f6894d3505e4 100644 (file)
--- a/mdw.conf
+++ b/mdw.conf
@@ -3,11 +3,11 @@
 email = mdw@distorted.org.uk
 mailbox = ~/Mailbox
 rootly = become -g0 root
-http-proxy = metalzone.distorted.org.uk:3128
-nntp-server = metalzone.distorted.org.uk
+http-proxy = www-cache.distorted.org.uk:3128
+nntp-server = www-cache.distorted.org.uk
 cvs-root = metalzone.distorted.org.uk:/home/cvs/cvs
 svn-root = svn+ssh://metalzone.distorted.org.uk/home/cvs/svn
-cltl-url = http://metalzone.distorted.org.uk/doc/cltl/
-hyperspec-url = http://metalzone.distorted.org.uk/doc/hyperspec/
+cltl-url = http://www.distorted.org.uk/doc/cltl/
+hyperspec-url = http://www.distorted.org.uk/doc/hyperspec/
 console-ctype = en_GB.iso885915
 x-ctype = en_GB.utf8
diff --git a/setup b/setup
index 3df6067ed0ecf7d7079e44b2419993b813b1e503..307e3d001055584d6907f1e3493d62b95a4d8229 100755 (executable)
--- a/setup
+++ b/setup
@@ -10,7 +10,7 @@ umask 002
 sub=
 mkdir -p $HOME$sub
 
-: ${REPO=http://ftp.distorted.org.uk/ftp/pub/mdw/profile}
+: ${REPO=http://ftp.distorted.org.uk/pub/mdw/profile}
 
 export PATH=/usr/local/bin:$HOME$sub/bin:/usr/bin:/usr/ccs/bin:/bin
 
@@ -231,6 +231,7 @@ scripts="
   mdw-build
   emacsclient-hack
   movemail-hack
+  sendmail-hack
   aspell-hack
   emerge-hack
   lesspipe.sh