From: Ismaƫl Bouya Date: Wed, 21 Nov 2018 01:30:40 +0000 (+0100) Subject: Make current virtual console the default one for X X-Git-Tag: v1.0~1 X-Git-Url: https://git.immae.eu/?p=perso%2FImmae%2FConfig%2FAnsible.git;a=commitdiff_plain;h=44c40b43e46ce0fcf3e2e31fde8f27666bbd3807 Make current virtual console the default one for X --- diff --git a/roles/shell/bash/templates/bash_profile.j2 b/roles/shell/bash/templates/bash_profile.j2 index 4bcd09c..f622f67 100644 --- a/roles/shell/bash/templates/bash_profile.j2 +++ b/roles/shell/bash/templates/bash_profile.j2 @@ -5,7 +5,7 @@ [[ -f $XDG_CONFIG_HOME/bash/bashrc ]] && . $XDG_CONFIG_HOME/bash/bashrc {% if "graphical_vt" in features.get(profile, []) %} -if [[ ! $DISPLAY && $XDG_VTNR -eq 1 ]]; then +if [[ ! $DISPLAY && $XDG_VTNR -eq {{ lookup('env', "XDG_VTNR") | default(1, true) }} ]]; then [[ -f "$XDG_STATE_HOME/bash/bashrc_temp" ]] && rm -f $XDG_STATE_HOME/bash/bashrc_temp exec startx $XDG_CONFIG_HOME/xinitrc > $XDG_STATE_HOME/xsession_errors 2>&1 fi