From abdbd80ac4dcc42619ee4ed12c19fb5d71fa2d83 Mon Sep 17 00:00:00 2001 From: Syndamia Date: Tue, 6 Sep 2022 10:53:34 +0300 Subject: Added many configs to .b --- .b/etc/X11/xinit/xinitrc.d/90-consolekit | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 .b/etc/X11/xinit/xinitrc.d/90-consolekit (limited to '.b/etc/X11/xinit/xinitrc.d/90-consolekit') diff --git a/.b/etc/X11/xinit/xinitrc.d/90-consolekit b/.b/etc/X11/xinit/xinitrc.d/90-consolekit new file mode 100755 index 0000000..358fc24 --- /dev/null +++ b/.b/etc/X11/xinit/xinitrc.d/90-consolekit @@ -0,0 +1,32 @@ +# -*- sh -*- +# Xsession.d script for ck-launch-session. +# +# +# This file is sourced by Xsession(5), not executed. + +CK_LAUNCH_SESSION=/usr/bin/ck-launch-session + +is_on_console() { + session=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ + --type=method_call --print-reply --reply-timeout=2000 \ + /org/freedesktop/ConsoleKit/Manager \ + org.freedesktop.ConsoleKit.Manager.GetCurrentSession \ + | grep path | awk '{print $3}' | sed s/\"//g) + x11_display=$(dbus-send --system --dest=org.freedesktop.ConsoleKit \ + --type=method_call --print-reply --reply-timeout=2000 \ + $session org.freedesktop.ConsoleKit.Session.GetX11Display \ + | grep string | awk '{print $2}' | sed s/\"//g) + + if [ -z "$x11_display" ] ; then + return 0 + else + return 1 + fi +} + +# gdm already creates a CK session for us, so do not run the expensive D-Bus +# calls if we have $GDMSESSION +if [ -z "$GDMSESSION" ] && [ -x "$CK_LAUNCH_SESSION" ] && \ + ( [ -z "$XDG_SESSION_COOKIE" ] || is_on_console ) ; then + command="$CK_LAUNCH_SESSION $command" +fi -- cgit v1.2.3