blob: 098aa2e9e2e956abcac4e0e4b943e947bd53fd5e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
#!/bin/sh
#---------------------------------------------------------------
# Project : Mandrakelinux
# Module : alert_applet-0.13
# File : s2u.sh
# Version : $Id$
# Author : Frederic Lepied
# Created On : Sat Jul 31 01:03:37 2004
# Purpose :
#---------------------------------------------------------------
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"
fi
}
vars
if [ -z "$DBUS_SESSION_BUS_PID" -o ! -d "/proc/$DBUS_SESSION_BUS_PID" ]; then
F=`mktemp /var/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"
vars
fi
s2u --daemon=yes
# s2u.sh ends here
|