Skip to content

Instantly share code, notes, and snippets.

@krid78
Created October 20, 2012 07:01
Show Gist options
  • Save krid78/3922437 to your computer and use it in GitHub Desktop.
Save krid78/3922437 to your computer and use it in GitHub Desktop.
Gentoo ~/.xsession
#!/usr/bin/env bash
echo "*** $0: $(date) @ ${HOSTNAME}" >> ${HOME}/sessionlog.txt
xset b 100 400 20 # set bell style volume(%) pitch duration
xset c off # keyclick off
xset m 35/10 10 # mouse
xterm -name ${HOSTNAME} -geometry 90x26+0+0&
if [[ ! -z ${WINDOWMANAGER} ]]; then
XSESSION=${WINDOWMANAGER}
fi
echo "XSESSION:${XSESSION}" >> ${HOME}/sessionlog.txt
command="$(/etc/X11/chooser.sh)"
echo "command:${command}" >> ${HOME}/sessionlog.txt
if [[ -n $command ]]; then
if [ -d /etc/X11/xinit/xinitrc.d ] ; then
for f in /etc/X11/xinit/xinitrc.d/* ; do
[ -x "$f" ] && . "$f"
done
unset f
fi
exec $command
fi
echo "*** $0: $(date) **TERMINATED** " >> ${HOME}/sessionlog.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment