Merge remote-tracking branch 'crybaby'
authorMark Wooding <mdw@distorted.org.uk>
Sun, 5 Jun 2011 01:44:21 +0000 (02:44 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Sun, 5 Jun 2011 01:44:21 +0000 (02:44 +0100)
* crybaby:
  dot/emacs: Tramp hacking: use `sudo', and set up magic proxies.

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 de5a5cf..1621d13 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 3141367..8fce589 100755 (executable)
@@ -71,6 +71,13 @@ EOF
 done
 
 ###--------------------------------------------------------------------------
+### Preliminary hook.
+
+if [ -r $HOME/.xinitrc-prehook ]; then
+  . $HOME/.xinitrc-prehook
+fi
+
+###--------------------------------------------------------------------------
 ### Iniitial settings.
 
 ## Assume X sessions are secure.
@@ -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)
@@ -330,6 +337,28 @@ EOF
 }
 
 ###--------------------------------------------------------------------------
+### 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.
 
 if [ -f $HOME/.xinitrc-local ]; then
@@ -353,6 +382,7 @@ esac
 case "$wait" in
   yes)
     xwait
+    kill-gnome-session
     ;;
   no)
     info "not waiting before exit"
index 9c78fbf..ec63e82 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 3df6067..307e3d0 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