echo "Starting new session"
+DATE=$(date "+%Y%m%d_%H%M%S")
+# track xsession errors
+mv ~/.xsession-errors ~/.xsession-errors_${DATE};
+ln ~/.xsession-errors-current ~/.xsession-errors_${DATE};
+# delete old xsession error files
+find ~/ -maxdepth 1 -mindepth 1 -type f \
+ -iname '.xsession-errors*' -ctime +30 -delete;
+
if locale -a |grep -qi en_US.utf8; then
LANG="en_US.UTF-8"
else
# make a backup of the .Xauthority
if [ -e ~/.Xauthority ]; then
cp -f .Xauthority .Xauthority.bak
-fi;
+fi
if [ -x /usr/bin/xautolock ]; then
/usr/bin/xautolock -notifier true -bell 0 &