export XDG_DATA_HOME="$HOME/.local/share" export XDG_CONFIG_HOME="$HOME/.config" export XDG_STATE_HOME="$HOME/.local/state" export XDG_CACHE_HOME="$HOME/.cache" if [ -z "$XDG_RUNTIME_DIR" ]; then export XDG_RUNTIME_DIR="/tmp/$(id -u)-runtime-dir" mkdir -pm 0700 "$XDG_RUNTIME_DIR" fi export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" touch "$XAUTHORITY" chmod 600 "$XAUTHORITY" if [ -z "$DISPLAY" ] && [ "$(tty)" = "/dev/tty1" ]; then exec startx "$XDG_CONFIG_HOME/x/xinitrc" fi case "$-" in *i*) if [ -z "$BASH_VERSION" ]; then exec bash --login fi ;; esac