View Single Post
  #1   (View Single Post)  
Old 28th August 2012
sw2wolf sw2wolf is offline
λ programmer
 
Join Date: Mar 2012
Location: China
Posts: 133
Default Why doesnot OpenBSD run /etc/profile and ~/.profile ?

Both /etc/profile and ~/.profile work ok before using tmux . After executing tmux in ~/.xsession, it seems OpenBSD donot run /etc/profile and ~/.profile.
Code:
$tail ~/.xsession
...
xterm -e ~/bin/tmuxz &
exec /usr/local/bin/dwm

$cat ~/bin/tmuxz
#!/bin/sh

cmd=$(which tmux)
session=$USER@$HOSTNAME

if [ -z $cmd ]; then
  echo "You need to install tmux."
  exit 1
fi

$cmd has -t $session

if [ $? != 0 ]; then
$cmd new -d -n work -s $session "ksh"
  $cmd splitw -v -p 65 -t $session "ksh"
  $cmd select-pane -t 1
fi

$cmd att -t $session
Sincerely!
Reply With Quote