]> git.immae.eu Git - perso/Immae/Config/Ansible.git/blobdiff - roles/shell/bash/templates/bash_profile.j2
Some fixes
[perso/Immae/Config/Ansible.git] / roles / shell / bash / templates / bash_profile.j2
index 4bcd09cb9d854f9a6b3df9013362b0cabbe46cf6..5be21a9a2e3cebd458b50cbab5862f705fba85c1 100644 (file)
@@ -2,10 +2,11 @@
 # This file is loaded thanks to as line in /etc/profile
 # test "$BASH" && test -r "$XDG_CONFIG_HOME/bash/bash_profile" && . $XDG_CONFIG_HOME/bash/bash_profile
 
-[[ -f $XDG_CONFIG_HOME/bash/bashrc ]] && . $XDG_CONFIG_HOME/bash/bashrc
+# Loaded by /etc/profile already
+# [[ -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