2021-07-20 21:18:50 +00:00
|
|
|
#!/bin/sh
|
2021-07-14 17:11:50 +00:00
|
|
|
|
2021-07-19 23:59:39 +00:00
|
|
|
# User .profile definition.
|
2021-07-20 21:18:50 +00:00
|
|
|
# This file is only sourced once, after login, Unlike
|
|
|
|
# .zshrc/.bashrc, which will run whenever a new terminal
|
|
|
|
# is opened.
|
2021-07-19 23:59:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Start graphical session automatically on tty1 if startx is aviable
|
2021-07-20 21:18:50 +00:00
|
|
|
if [ "$(tty)" = "/dev/tty1" ] && [ "$UID" != 0 ]; then
|
2021-07-17 20:58:26 +00:00
|
|
|
if command -v startx > /dev/null; then
|
|
|
|
! pidof -s Xorg > /dev/null 2>&1 && exec startx "$XINITRC"
|
|
|
|
fi
|
2021-07-14 17:12:51 +00:00
|
|
|
fi
|
|
|
|
|