diff options
| author | Syndamia <kamen@syndamia.com> | 2022-09-06 10:53:34 +0300 |
|---|---|---|
| committer | Syndamia <kamen@syndamia.com> | 2022-09-06 10:53:34 +0300 |
| commit | abdbd80ac4dcc42619ee4ed12c19fb5d71fa2d83 (patch) | |
| tree | ba3e845eefb201676fcc87e964ab5035f3222585 /.b/etc/X11/xinit/xinitrc.d | |
| parent | dd6a62a3c881c0b2e71db5bb923c60a54d2b016d (diff) | |
| download | dotfiles-abdbd80ac4dcc42619ee4ed12c19fb5d71fa2d83.tar dotfiles-abdbd80ac4dcc42619ee4ed12c19fb5d71fa2d83.tar.gz dotfiles-abdbd80ac4dcc42619ee4ed12c19fb5d71fa2d83.zip | |
Added many configs to .b
Diffstat (limited to '.b/etc/X11/xinit/xinitrc.d')
| -rwxr-xr-x | .b/etc/X11/xinit/xinitrc.d/00-xhost | 7 | ||||
| -rwxr-xr-x | .b/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module | 16 | ||||
| -rwxr-xr-x | .b/etc/X11/xinit/xinitrc.d/80-dbus | 13 | ||||
| -rwxr-xr-x | .b/etc/X11/xinit/xinitrc.d/80xapp-gtk3-module.sh | 10 | ||||
| -rwxr-xr-x | .b/etc/X11/xinit/xinitrc.d/90-consolekit | 32 |
5 files changed, 78 insertions, 0 deletions
diff --git a/.b/etc/X11/xinit/xinitrc.d/00-xhost b/.b/etc/X11/xinit/xinitrc.d/00-xhost new file mode 100755 index 0000000..82cf103 --- /dev/null +++ b/.b/etc/X11/xinit/xinitrc.d/00-xhost @@ -0,0 +1,7 @@ +#!/bin/sh +# Allow all local connections from the current UID +# This fixes issues with hostname changes (usually by dhcp clients) +# see bug 287498 for more info + +[ -x /usr/bin/xhost ] && [ -x /usr/bin/id ] && + xhost +si:localuser:`id -un` > /dev/null 2>&1 diff --git a/.b/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module b/.b/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module new file mode 100755 index 0000000..63c16af --- /dev/null +++ b/.b/etc/X11/xinit/xinitrc.d/40-libcanberra-gtk-module @@ -0,0 +1,16 @@ +#!/bin/sh +# to be sourced + +case "$SESSION" in + GNOME) + # Done by gnome-settings-daemon + ;; + *) + if [ -z "$GTK_MODULES" ] ; then + GTK_MODULES="canberra-gtk-module" + else + GTK_MODULES="$GTK_MODULES:canberra-gtk-module" + fi + export GTK_MODULES + ;; +esac diff --git a/.b/etc/X11/xinit/xinitrc.d/80-dbus b/.b/etc/X11/xinit/xinitrc.d/80-dbus new file mode 100755 index 0000000..5593e2c --- /dev/null +++ b/.b/etc/X11/xinit/xinitrc.d/80-dbus @@ -0,0 +1,13 @@ +#!/bin/bash + +# launches a session dbus instance + +dbuslaunch="`which dbus-launch 2>/dev/null`" +if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z "$DBUS_SESSION_BUS_ADDRESS" ]; then + if [ -n "$command" ]; then + command="$dbuslaunch --exit-with-session $command" + else + eval `$dbuslaunch --sh-syntax --exit-with-session` + fi +fi + diff --git a/.b/etc/X11/xinit/xinitrc.d/80xapp-gtk3-module.sh b/.b/etc/X11/xinit/xinitrc.d/80xapp-gtk3-module.sh new file mode 100755 index 0000000..4b2ec2a --- /dev/null +++ b/.b/etc/X11/xinit/xinitrc.d/80xapp-gtk3-module.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# This file is sourced by xinit(1) or a display manager's Xsession, not executed. + +if [ -z "$GTK_MODULES" ] ; then + GTK_MODULES="xapp-gtk3-module" +else + GTK_MODULES="$GTK_MODULES:xapp-gtk3-module" +fi + +export GTK_MODULES 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 |
