diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-10-12 22:29:41 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-10-12 23:30:51 +0200 |
commit | 33af3abda8dcb4f259ec6bbbc8d40bc997d9e4d4 (patch) | |
tree | 422553df4adc2bc7560c5d516afaaecf6f3a4d04 /.xinitrc | |
parent | 6ce2946ab91f7f8b1a37b54a92351d1f0980d27d (diff) | |
download | dotfiles-33af3abda8dcb4f259ec6bbbc8d40bc997d9e4d4.tar.gz dotfiles-33af3abda8dcb4f259ec6bbbc8d40bc997d9e4d4.tar.bz2 dotfiles-33af3abda8dcb4f259ec6bbbc8d40bc997d9e4d4.zip |
xinitrc: Source scripts frm xinitrc.d dir
..to be able to initiate a consolekit session,
if installed on the systemd.
Diffstat (limited to '.xinitrc')
-rw-r--r--[-rwxr-xr-x] | .xinitrc | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -7,8 +7,22 @@ xset r rate 250 50 [[ -x ~/.scripts/disable_touchpad.sh ]] && ~/.scripts/disable_touchpad.sh -#chooser="/etc/X11/chooser.sh" -#session=$(XSESSION="${1}" ${chooser}) -#exec ${session:-$(${chooser})} +unset command -exec $(XSESSION="${2:-${XSESSION}}" /etc/X11/chooser.sh) +# temporarily unset XDG_SESSION_COOKIE so consolekit launches a new session +realxdgcookie="$XDG_SESSION_COOKIE" +XDG_SESSION_COOKIE= +# run all system xinitrc shell scripts which will update $command +if [ -d /etc/X11/xinit/xinitrc.d ]; then + for i in /etc/X11/xinit/xinitrc.d/* ; do + if [ -x "$i" ]; then + . "$i" + fi + done + unset i +fi +# restore XDG_SESSION_COOKIE +XDG_SESSION_COOKIE="$realxdgcookie" +unset realxdgcookie + +exec $command $(XSESSION="${2:-${XSESSION}}" /etc/X11/chooser.sh) |