summaryrefslogtreecommitdiff
path: root/home/xyz/.profile
diff options
context:
space:
mode:
Diffstat (limited to 'home/xyz/.profile')
-rw-r--r--home/xyz/.profile3
1 files changed, 2 insertions, 1 deletions
diff --git a/home/xyz/.profile b/home/xyz/.profile
index 491155ea..2fe45244 100644
--- a/home/xyz/.profile
+++ b/home/xyz/.profile
@@ -85,6 +85,7 @@ export SCR_HEIGHT=900
[ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc"
# startx when login, should be put after environmental variables for .xinitrc to use
-if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" -eq 1 ]; then
+# use `[ "$XDG_VTNR" ]` to avoid "-bash: [: : integer expression expected" warning/error message, when `sudo su - xyz` or ssh into a remote server, not sure if best practice or not
+if [ -z "$DISPLAY" ] && [ "$XDG_VTNR" ] && [ "$XDG_VTNR" -eq 1 ]; then
exec startx
fi