Attachment 'xinitrc-4.0.14-sshagent.patch'

Download

   1 diff -ruN xinitrc-4.0.14.orig/xinitrc-common xinitrc-4.0.14/xinitrc-common
   2 --- xinitrc-4.0.14.orig/xinitrc-common	2004-10-20 18:34:10.000000000 -0400
   3 +++ xinitrc-4.0.14/xinitrc-common	2005-01-10 05:12:05.498348208 -0500
   4 @@ -55,8 +55,15 @@
   5      fi
   6  done
   7  
   8 -# Start up ssh-agent if available and not already running.
   9 -[ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ] && eval $(/usr/bin/ssh-agent -s)
  10 +# Prefix launch of session with ssh-agent if available and not already running.
  11 +SSH_AGENT=
  12 +if [ -x /usr/bin/ssh-agent -a -z "$SSH_AGENT_PID" ]; then
  13 +    if [ "x$TMPDIR" != "x" ]; then
  14 +        SSH_AGENT="/usr/bin/ssh-agent /bin/env TMPDIR=$TMPDIR"
  15 +    else
  16 +        SSH_AGENT="/usr/bin/ssh-agent"
  17 +  fi
  18 +fi
  19  
  20  DBUS_LAUNCH=
  21  [ -x /usr/bin/dbus-launch -a -z "$DBUS_SESSION_BUS_ADDRESS" ] && DBUS_LAUNCH="/usr/bin/dbus-launch --exit-with-session"
  22 diff -ruN xinitrc-4.0.14.orig/Xsession xinitrc-4.0.14/Xsession
  23 --- xinitrc-4.0.14.orig/Xsession	2004-10-20 18:34:10.000000000 -0400
  24 +++ xinitrc-4.0.14/Xsession	2005-01-10 05:10:36.208922264 -0500
  25 @@ -51,21 +51,21 @@
  26         exec -l $SHELL -c "xterm -geometry 80x24-0-0"
  27         ;;
  28      gnome)
  29 -       exec -l $SHELL -c "$DBUS_LAUNCH gnome-session"
  30 +       exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH gnome-session"
  31         ;;
  32      kde|kde1|kde2)
  33 -       exec -l $SHELL -c "$DBUS_LAUNCH $SWITCHDESKPATH/Xclients.kde"
  34 +       exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $SWITCHDESKPATH/Xclients.kde"
  35         ;;
  36      twm)
  37          # fall back to twm
  38 -       exec -l $SHELL -c "$DBUS_LAUNCH $SWITCHDESKPATH/Xclients.twm"
  39 +       exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $SWITCHDESKPATH/Xclients.twm"
  40         ;;
  41      *)
  42         # GDM provies either a command line as the first argument or
  43         # provides 'failsafe', 'default' or 'custom'.  KDM will do the
  44         # same at some point
  45         if [ "$1" != "default" -a "$1" != "custom" ]; then
  46 -           exec -l $SHELL -c "$DBUS_LAUNCH $1"
  47 +           exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $1"
  48         fi
  49         ;;
  50      esac
  51 @@ -73,11 +73,11 @@
  52  
  53  # otherwise, take default action
  54  if [ -x "$HOME/.xsession" ]; then
  55 -    exec -l $SHELL -c "$DBUS_LAUNCH $HOME/.xsession"
  56 +    exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.xsession"
  57  elif [ -x "$HOME/.Xclients" ]; then
  58 -    exec -l $SHELL -c "$DBUS_LAUNCH $HOME/.Xclients"
  59 +    exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $HOME/.Xclients"
  60  elif [ -x /etc/X11/xinit/Xclients ]; then
  61 -    exec -l $SHELL -c "$DBUS_LAUNCH /etc/X11/xinit/Xclients"
  62 +    exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH /etc/X11/xinit/Xclients"
  63  else
  64      # should never get here; failsafe fallback
  65      exec -l $SHELL -c "xsm"

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2006-06-19 13:24:20, 2.6 KB) [[attachment:xinitrc-4.0.14-sshagent.patch]]
 All files | Selected Files: delete move to page copy to page

You are not allowed to attach a file to this page.