diff options
author | Timmy Keller <tjk@tjkeller.xyz> | 2021-09-03 16:38:38 -0500 |
---|---|---|
committer | Timmy Keller <tjk@tjkeller.xyz> | 2021-09-03 16:38:38 -0500 |
commit | 0ca5965a24eb2c32987f819c6d16f6bf05f98c31 (patch) | |
tree | ef9a66803a0277a5c8673a1c8fd28538f057d9bc | |
parent | bee1045917bec003cd44dffbae6e8d02a589e448 (diff) | |
download | dotconfig-0ca5965a24eb2c32987f819c6d16f6bf05f98c31.tar.xz dotconfig-0ca5965a24eb2c32987f819c6d16f6bf05f98c31.zip |
change root user detection
-rw-r--r-- | zsh/zprofile.base | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zsh/zprofile.base b/zsh/zprofile.base index 5250245..86f90b0 100644 --- a/zsh/zprofile.base +++ b/zsh/zprofile.base @@ -36,4 +36,4 @@ export LESSHISTFILE="-" export QT_QPA_PLATFORMTHEME="qt5ct" # Autostart X after login -if [[ -z $DISPLAY ]] && [[ "$USER" != "root" ]] && ( [[ $(tty) = /dev/tty1 ]] || [[ $(tty) = /dev/ttyC0 ]] ); then startx $XDG_CONFIG_HOME/x11/xinitrc; fi +if [[ -z $DISPLAY ]] && [[ "$(id -u)" != 0 ]] && ( [[ $(tty) = /dev/tty1 ]] || [[ $(tty) = /dev/ttyC0 ]] ); then startx $XDG_CONFIG_HOME/x11/xinitrc; fi |