1 |
ssuominen 10/10/28 16:02:50 |
2 |
|
3 |
Added: 90-consolekit-3 |
4 |
Removed: 90-consolekit-2 |
5 |
Log: |
6 |
Fix typo in 90-consolekit, see ChangeLog for details |
7 |
|
8 |
(Portage version: 2.2.0_alpha1/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.1 sys-auth/consolekit/files/90-consolekit-3 |
12 |
|
13 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/90-consolekit-3?rev=1.1&view=markup |
14 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-auth/consolekit/files/90-consolekit-3?rev=1.1&content-type=text/plain |
15 |
|
16 |
Index: 90-consolekit-3 |
17 |
=================================================================== |
18 |
# -*- sh -*- |
19 |
# Xsession.d script for ck-launch-session. |
20 |
# |
21 |
# |
22 |
# This file is sourced by Xsession(5), not executed. |
23 |
|
24 |
CK_LAUNCH_SESSION=/usr/bin/ck-launch-session |
25 |
|
26 |
is_on_console() { |
27 |
session=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ |
28 |
--type=method_call --print-reply --reply-timeout=2000 \ |
29 |
/org/freedesktop/ConsoleKit/Manager \ |
30 |
org.freedesktop.ConsoleKit.Manager.GetCurrentSession \ |
31 |
| grep path | awk '{print $3}' | sed s/\"//g) |
32 |
x11_display=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ |
33 |
--type=method_call --print-reply --reply-timeout=2000 \ |
34 |
$session org.freedesktop.ConsoleKit.Session.GetX11Display \ |
35 |
| grep string | awk '{print $2}' | sed s/\"//g) |
36 |
|
37 |
if [ -z "$x11_display" ] ; then |
38 |
return 0 |
39 |
else |
40 |
return 1 |
41 |
fi |
42 |
} |
43 |
|
44 |
# gdm already creates a CK session for us, so do not run the expensive D-Bus |
45 |
# calls if we have $GDMSESSION |
46 |
if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] && \ |
47 |
( [ -z "$XDG_SESSION_COOKIE" ] || is_on_console ) ; then |
48 |
command="$CK_LAUNCH_SESSION $command" |
49 |
fi |