From a385f096275dedf3f8939e556eaf50bd6167a3a6 Mon Sep 17 00:00:00 2001 From: ItsDrike Date: Wed, 14 Jul 2021 19:12:51 +0200 Subject: [PATCH] Start Xorg from profile in tty1 --- home/.config/shell/profile | 9 +++++++++ home/.xinitrc | 1 - 2 files changed, 9 insertions(+), 1 deletion(-) delete mode 120000 home/.xinitrc diff --git a/home/.config/shell/profile b/home/.config/shell/profile index 35a3e39..f4a6ab4 100755 --- a/home/.config/shell/profile +++ b/home/.config/shell/profile @@ -15,6 +15,8 @@ export XDG_DATA_HOME="$HOME/.local/share" export XDG_RUNTIME_DIR="/run/user/$UID" # Pre-Application XDG settings +export XINITRC="$XDG_CONFIG_HOME/x11/xinitrc" +export XAUTHORITY="$XDG_RUNTIME_DIR/Xauthority" # This line will break some DMs. export LESSHISTFILE="-" export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc" export WGETRC="$XDG_CONFIG_HOME/wget/wgetrc" @@ -51,3 +53,10 @@ command -v bat > /dev/null && export MANPAGER="sh -c 'col -bx | bat -l man -p'" export PIPENV_VENV_IN_PROJECT=1 # Force pipenv to create new environments within projects ./.venv #export QT_QPA_PLATFORMTHEME="gtk2" # Have QT use gtk2 theme. +# Start graphical session, if startx is aviable +if [ "$(tty)" = "/dev/tty1" ]; then + if command -v startx > /dev/null; then + ! pidof -s Xorg > /dev/null 2>&1 && exec startx "$XINITRC" + fi +fi + diff --git a/home/.xinitrc b/home/.xinitrc deleted file mode 120000 index 518bb5d..0000000 --- a/home/.xinitrc +++ /dev/null @@ -1 +0,0 @@ -.config/x11/xinitrc \ No newline at end of file