more x init changes
This commit is contained in:
parent
627f78c5da
commit
432813160c
12 changed files with 184 additions and 20 deletions
|
@ -36,21 +36,8 @@ for program in $autostart; do
|
|||
done >/dev/null 2>&1
|
||||
playerctld daemon
|
||||
|
||||
if ! pgrep -x -u "${USER}" gpg-agent 1> /dev/null 2>&1; then
|
||||
gpg-connect-agent /bye 1> /dev/null 2>&1
|
||||
fi
|
||||
unset SSH_AGENT_PID
|
||||
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
||||
# export SSH_AUTH_SOCK="/run/user/$UID/gnupg/S.gpg-agent.ssh"
|
||||
SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
export SSH_AUTH_SOCK
|
||||
fi
|
||||
GPG_TTY="$(tty)"
|
||||
export GPG_TTY
|
||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
||||
|
||||
xset s 300
|
||||
xss-lock -n /usr/lib/xsecurelock/dimmer -l -- xsecurelock &
|
||||
xss-lock -l -- xsecurelock &
|
||||
|
||||
# Ensure that xrdb has finished running before moving on to start the WM/DE.
|
||||
# [ -n "$xrdbpid" ] && wait "$xrdbpid"
|
||||
|
|
|
@ -6,10 +6,8 @@ PROGNAME=Xsession
|
|||
|
||||
OPTIONFILE=/etc/X11/Xsession.options
|
||||
|
||||
SYSRESOURCES=/etc/X11/Xresources
|
||||
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources" ] && USRRESOURCES=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xresources || USRRESOURCES=$HOME/.Xresources
|
||||
|
||||
SYSSESSIONDIR=/etc/X11/Xsession.d
|
||||
[ -r "${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession.d" ] && SESSIONDIR=${XDG_CONFIG_HOME:-$HOME/.config}/X11/xsession.d || SESSIONDIR=/etc/X11/Xsession.d
|
||||
[ -d "${XDG_DATA_HOME:-$HOME/.local/share}/xorg/" ] && ERRFILE=${XDG_DATA_HOME:-$HOME/.local/share}/xorg/xsession-errors || ERRFILE=$HOME/.xsession-errors
|
||||
|
||||
message () {
|
||||
|
@ -90,8 +88,8 @@ fi
|
|||
exec >>"$ERRFILE" 2>&1
|
||||
|
||||
# sanity check; is our session script directory present?
|
||||
if [ ! -d "$SYSSESSIONDIR" ]; then
|
||||
errormsg "no \"$SYSSESSIONDIR\" directory found; aborting."
|
||||
if [ ! -d "$SESSIONDIR" ]; then
|
||||
errormsg "no \"$SESSIONDIR\" directory found; aborting."
|
||||
fi
|
||||
|
||||
# Attempt to create a file of non-zero length in /tmp; a full filesystem can
|
||||
|
@ -106,7 +104,7 @@ if ! echo "*" >>"$WRITE_TEST"; then
|
|||
fi
|
||||
rm -f "$WRITE_TEST"
|
||||
|
||||
SESSIONFILES=$(run-parts --list $SYSSESSIONDIR)
|
||||
SESSIONFILES=$(run-parts --list $SESSIONDIR)
|
||||
if [ -n "$SESSIONFILES" ]; then
|
||||
set +e
|
||||
for SESSIONFILE in $SESSIONFILES; do
|
||||
|
|
23
.config/X11/xsession.d/20dbus_xdg-runtime
Normal file
23
.config/X11/xsession.d/20dbus_xdg-runtime
Normal file
|
@ -0,0 +1,23 @@
|
|||
# vim:set ft=sh
|
||||
|
||||
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && [ -n "$XDG_RUNTIME_DIR" ] && \
|
||||
[ "$XDG_RUNTIME_DIR" = "/run/user/`id -u`" ] && \
|
||||
[ -S "$XDG_RUNTIME_DIR/bus" ]; then
|
||||
# We are under systemd-logind or something remarkably similar, and
|
||||
# a user-session socket has already been set up.
|
||||
#
|
||||
# Be nice to non-libdbus, non-sd-bus implementations by using
|
||||
# that as the session bus address in the environment. The check for
|
||||
# XDG_RUNTIME_DIR = "/run/user/`id -u`" is because we know that
|
||||
# form of the address, from systemd-logind, doesn't need escaping,
|
||||
# whereas arbitrary addresses might.
|
||||
export DBUS_SESSION_BUS_ADDRESS="unix:path=$XDG_RUNTIME_DIR/bus"
|
||||
fi
|
||||
|
||||
if [ -x "/usr/bin/dbus-update-activation-environment" ]; then
|
||||
# tell dbus-daemon --session (and systemd --user, if running)
|
||||
# to put a minimal subset of the Xsession's environment in activated
|
||||
# services' environments
|
||||
dbus-update-activation-environment --verbose --systemd \
|
||||
DBUS_SESSION_BUS_ADDRESS DISPLAY XAUTHORITY
|
||||
fi
|
6
.config/X11/xsession.d/30x11-common_xresources
Normal file
6
.config/X11/xsession.d/30x11-common_xresources
Normal file
|
@ -0,0 +1,6 @@
|
|||
# vim:set ft=sh
|
||||
|
||||
if has_option allow-user-resources && [ -f "$USRRESOURCES" ]; then
|
||||
if type xrdb >/dev/null 2>&1; then
|
||||
xrdb -merge $USRRESOURCES
|
||||
fi
|
25
.config/X11/xsession.d/90atk-adaptor
Normal file
25
.config/X11/xsession.d/90atk-adaptor
Normal file
|
@ -0,0 +1,25 @@
|
|||
# vim:set ft=sh
|
||||
|
||||
add_module()
|
||||
{
|
||||
case :$GTK_MODULES: in
|
||||
*:$1:*)
|
||||
;;
|
||||
*)
|
||||
if [ -z "$GTK_MODULES" ]
|
||||
then
|
||||
GTK_MODULES=$1
|
||||
else
|
||||
GTK_MODULES=$GTK_MODULES:$1
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
add_module gail
|
||||
add_module atk-bridge
|
||||
|
||||
export GTK_MODULES
|
||||
if [ -x "/usr/bin/dbus-update-activation-environment" ]; then
|
||||
dbus-update-activation-environment --verbose --systemd GTK_MODULES
|
||||
fi
|
7
.config/X11/xsession.d/90gpg-agent
Normal file
7
.config/X11/xsession.d/90gpg-agent
Normal file
|
@ -0,0 +1,7 @@
|
|||
# vim:set ft=sh
|
||||
|
||||
if [ "${SSH_AUTH_SOCK:-0}" -ne $$ ]; then
|
||||
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
||||
fi
|
||||
export GPG_TTY="$(tty)"
|
||||
gpg-connect-agent updatestartuptty /bye > /dev/null
|
7
.config/X11/xsession.d/90qt-a11y
Normal file
7
.config/X11/xsession.d/90qt-a11y
Normal file
|
@ -0,0 +1,7 @@
|
|||
# vim:set ft=sh
|
||||
|
||||
export QT_ACCESSIBILITY=1
|
||||
|
||||
if [ -x "/usr/bin/dbus-update-activation-environment" ]; then
|
||||
dbus-update-activation-environment --verbose --systemd QT_ACCESSIBILITY
|
||||
fi
|
58
.config/X11/xsession.disabled/20x11-common_process-args
Normal file
58
.config/X11/xsession.disabled/20x11-common_process-args
Normal file
|
@ -0,0 +1,58 @@
|
|||
# $Id: 20x11-common_process-args 305 2005-07-03 18:51:43Z dnusinow $
|
||||
|
||||
# This file is sourced by Xsession(5), not executed.
|
||||
|
||||
# Determine how many arguments were provided.
|
||||
case $# in
|
||||
0)
|
||||
# No arguments given; use default behavior.
|
||||
;;
|
||||
1)
|
||||
# One argument given; see what it was.
|
||||
case "$1" in
|
||||
failsafe)
|
||||
# Failsafe session was requested.
|
||||
if has_option allow-failsafe; then
|
||||
if [ -e /usr/bin/x-terminal-emulator ]; then
|
||||
if [ -x /usr/bin/x-terminal-emulator ]; then
|
||||
exec x-terminal-emulator -geometry +1+1
|
||||
else
|
||||
# fatal error
|
||||
errormsg "unable to launch failsafe X session ---" \
|
||||
"x-terminal-emulator not executable; aborting."
|
||||
fi
|
||||
else
|
||||
# fatal error
|
||||
errormsg "unable to launch failsafe X session ---" \
|
||||
"x-terminal-emulator not found; aborting."
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
default)
|
||||
# Default behavior was requested.
|
||||
;;
|
||||
*)
|
||||
# Specific program was requested.
|
||||
STARTUP_FULL_PATH=$(command -v "${1%% *}" || true)
|
||||
if [ -n "$STARTUP_FULL_PATH" ] && [ -e "$STARTUP_FULL_PATH" ]; then
|
||||
if [ -x "$STARTUP_FULL_PATH" ]; then
|
||||
STARTUP="$1"
|
||||
else
|
||||
message "unable to launch \"$1\" X session ---" \
|
||||
"\"$1\" not executable; falling back to default session."
|
||||
fi
|
||||
else
|
||||
message "unable to launch \"$1\" X session ---" \
|
||||
"\"$1\" not found; falling back to default session."
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
*)
|
||||
# More than one argument given; we don't know what to do.
|
||||
message "unsupported number of arguments ($#); falling back to default" \
|
||||
"session."
|
||||
;;
|
||||
esac
|
||||
|
||||
# vim:set ai et sts=2 sw=2 tw=80:
|
10
.config/X11/xsession.disabled/35x11-common_xhost-local
Normal file
10
.config/X11/xsession.disabled/35x11-common_xhost-local
Normal file
|
@ -0,0 +1,10 @@
|
|||
# This file is sourced by Xsession(5), not executed.
|
||||
|
||||
# If xhost (from x11-xserver-utils) is installed, use it to give access
|
||||
# to the X server to any process from the same user on the local host.
|
||||
# Unlike other uses of xhost, this is safe since the kernel can check
|
||||
# the actual owner of the calling process.
|
||||
|
||||
if type xhost >/dev/null 2>&1; then
|
||||
xhost +si:localuser:$(id -un) || :
|
||||
fi
|
6
.config/X11/xsession.disabled/40x11-common_xsessionrc
Normal file
6
.config/X11/xsession.disabled/40x11-common_xsessionrc
Normal file
|
@ -0,0 +1,6 @@
|
|||
# This file is sourced by Xsession(5), not executed.
|
||||
|
||||
#Source user defined xsessionrc (locales and other environment variables)
|
||||
if [ -r "$USERXSESSIONRC" ]; then
|
||||
. "$USERXSESSIONRC"
|
||||
fi
|
22
.config/X11/xsession.disabled/60x11-common_xdg_path
Normal file
22
.config/X11/xsession.disabled/60x11-common_xdg_path
Normal file
|
@ -0,0 +1,22 @@
|
|||
# This file is sourced by Xsession(5), not executed.
|
||||
# Add additional xdg paths depending on selected desktop session
|
||||
|
||||
DEFAULT_XDG_CONFIG_DIRS='/etc/xdg'
|
||||
DEFAULT_XDG_DATA_DIRS='/usr/local/share/:/usr/share/'
|
||||
if [ -n "$DESKTOP_SESSION" ]; then
|
||||
# readd default if was empty
|
||||
if [ -z "$XDG_CONFIG_DIRS" ]; then
|
||||
XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$DEFAULT_XDG_CONFIG_DIRS"
|
||||
elif [ -n "${XDG_CONFIG_DIRS##*$DEFAULT_XDG_CONFIG_DIRS/xdg-$DESKTOP_SESSION*}" ]; then
|
||||
XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"/xdg-"$DESKTOP_SESSION":"$XDG_CONFIG_DIRS"
|
||||
fi
|
||||
export XDG_CONFIG_DIRS
|
||||
if [ -z "$XDG_DATA_DIRS" ]; then
|
||||
XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
|
||||
fi
|
||||
if [ -n "${XDG_DATA_DIRS##*/usr/share/$DESKTOP_SESSION*}" ]; then
|
||||
XDG_DATA_DIRS=/usr/share/"$DESKTOP_SESSION":"$XDG_DATA_DIRS"
|
||||
fi
|
||||
export XDG_DATA_DIRS
|
||||
fi
|
||||
|
15
.config/X11/xsession.disabled/90x11-common_ssh-agent
Normal file
15
.config/X11/xsession.disabled/90x11-common_ssh-agent
Normal file
|
@ -0,0 +1,15 @@
|
|||
# $Id: 90x11-common_ssh-agent 305 2005-07-03 18:51:43Z dnusinow $
|
||||
|
||||
# This file is sourced by Xsession(5), not executed.
|
||||
|
||||
STARTSSH=
|
||||
SSHAGENT=/usr/bin/ssh-agent
|
||||
SSHAGENTARGS=
|
||||
|
||||
if has_option use-ssh-agent; then
|
||||
if [ -x "$SSHAGENT" ] && [ -z "$SSH_AUTH_SOCK" ]; then
|
||||
STARTUP="$SSHAGENT $SSHAGENTARGS ${TMPDIR:+env TMPDIR=$TMPDIR} $STARTUP"
|
||||
fi
|
||||
fi
|
||||
|
||||
# vim:set ai et sts=2 sw=2 tw=80:
|
Loading…
Add table
Reference in a new issue