aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflepied <flepied@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2004-08-18 02:56:02 +0000
committerflepied <flepied@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2004-08-18 02:56:02 +0000
commit80bb363b80bb85b8f2a2d2a197e8786108bca16d (patch)
treebe627c7f649bda05cfab0ab0e94403a8db30257c
parent2f060170a83c86290d691f54d8b66b7ece941fc8 (diff)
downloads2u-80bb363b80bb85b8f2a2d2a197e8786108bca16d.tar
s2u-80bb363b80bb85b8f2a2d2a197e8786108bca16d.tar.gz
s2u-80bb363b80bb85b8f2a2d2a197e8786108bca16d.tar.bz2
s2u-80bb363b80bb85b8f2a2d2a197e8786108bca16d.tar.xz
s2u-80bb363b80bb85b8f2a2d2a197e8786108bca16d.zip
put session file in /tmp/dbus-$USER-xsession$CURR_DISPLAY
git-svn-id: svn+ssh://svn.mandriva.com/svn/soft/s2u/trunk@179788 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94
-rwxr-xr-xhostname-post2
-rwxr-xr-xs2u.sh21
2 files changed, 13 insertions, 10 deletions
diff --git a/hostname-post b/hostname-post
index b8a3a86..5c432e6 100755
--- a/hostname-post
+++ b/hostname-post
@@ -10,7 +10,7 @@
# running X11 dbus session.
#---------------------------------------------------------------
-for f in `ls /var/tmp/dbus-xsession* 2> /dev/null`; do
+for f in `ls /tmp/dbus-*-xsession* 2> /dev/null`; do
. $f
dbus-send --type=method_call --dest=com.mandrakesoft.user.message /com/mandrakesoft/user com.mandrakesoft.user.message string:"Hostname: $1" &
done
diff --git a/s2u.sh b/s2u.sh
index 098aa2e..cf2b1c6 100755
--- a/s2u.sh
+++ b/s2u.sh
@@ -1,34 +1,37 @@
#!/bin/sh
#---------------------------------------------------------------
# Project : Mandrakelinux
-# Module : alert_applet-0.13
+# Module : s2u
# File : s2u.sh
# Version : $Id$
# Author : Frederic Lepied
# Created On : Sat Jul 31 01:03:37 2004
-# Purpose :
+# Purpose : launch the dbus client attaching it to an
+# exisiting dbus session or launching a new one to
+# attache itself to.
#---------------------------------------------------------------
+f="/tmp/dbus-$USER-xsession$CURR_DISPLAY"
+
vars() {
CURR_DISPLAY=`LC_ALL=C xdpyinfo | grep 'display' | awk '{print $4}'`
- if [ -f "/var/tmp/dbus-xsession$CURR_DISPLAY" -a -O "/var/tmp/dbus-xsession$CURR_DISPLAY" ]; then
- . "/var/tmp/dbus-xsession$CURR_DISPLAY"
+ if [ -f "$f" -a -O "$f" ]; then
+ . "$f"
fi
}
vars
if [ -z "$DBUS_SESSION_BUS_PID" -o ! -d "/proc/$DBUS_SESSION_BUS_PID" ]; then
- F=`mktemp /var/tmp/dbus.XXXXXX`
+ F=`mktemp /tmp/dbus.XXXXXX`
chmod 600 $F
dbus-launch --sh-syntax --exit-with-session > $F
- rm -f "/var/tmp/dbus-xsession$CURR_DISPLAY"
- mv -f $F "/var/tmp/dbus-xsession$CURR_DISPLAY"
+ rm -f "$f"
+ mv -f $F "$f"
vars
fi
-s2u --daemon=yes
-
+exec s2u --daemon=yes
# s2u.sh ends here