]> git.immae.eu Git - perso/Immae/Config/Ansible.git/commitdiff
Make current virtual console the default one for X
authorIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 21 Nov 2018 01:30:40 +0000 (02:30 +0100)
committerIsmaël Bouya <ismael.bouya@fretlink.com>
Wed, 21 Nov 2018 01:30:40 +0000 (02:30 +0100)
roles/shell/bash/templates/bash_profile.j2

index 4bcd09cb9d854f9a6b3df9013362b0cabbe46cf6..f622f67556e1e684cac7b5b17b0289de639ed5b6 100644 (file)
@@ -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