dotfiles

personal configurations for my systems and programs
git clone git@git.eonndev.com/dotfiles.git
Log | Files | Refs

commit 1fb6280da1cfee428696361b1d5a8580d9e1d8b2
parent 5ff59f54ac2b4c12b54d0dfe465e0ddef04989d9
Author: iressa <ian@eonndev.com>
Date:   Sun, 21 Mar 2021 12:22:59 -0400

3/21/21 - Fixing kerfuffle caused by bash_profile invoking tmux before X

Diffstat:
A.bash_profile | 16++++++++++++++++
M.bashrc | 2+-
2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/.bash_profile b/.bash_profile @@ -0,0 +1,16 @@ +# /etc/skel/.bash_profile + +# This file is sourced by bash for login shells. The following line +# runs your .bashrc and is recommended by the bash info pages. +if [[ -f ~/.bashrc ]] ; then + . ~/.bashrc +fi + +# Automatically launch X server if login is on /dev/tty1 +unset -v HOME # Force bash to obtain its value for HOME from getpwent(3) on first use, so tilde-expansion is sane. +if shopt -q login_shell; then + [[ -f ~/.bashrc ]] && source ~/.bashrc + [[ -t 0 && $(tty) == /dev/tty1 && ! $DISPLAY ]] && exec startx +else + exit 1 # Somehow this is a non-bash or non-login shell. +fi diff --git a/.bashrc b/.bashrc @@ -14,7 +14,7 @@ if [[ $- != *i* ]] ; then return fi -if command -v tmux >/dev/null 2>&1; then +if command -v tmux >/dev/null 2>&1 && ! shopt -q login_shell ; then [ -z "${TMUX}" ] && (tmux attach || tmux) >/dev/null 2>&1 fi