I'm using byobu-tmux with bash and .bash_profile is not sourced at all
so I'm missing my alias, functions, environment variables and even bash-
completion doesn't work. To enable profile sourcing, login mode for the
shell has to be used.

As far as I can gather, login mode is disabled on purpose. I don't know
the reason for it though (maybe so that random stuff from profiles
wouldn't get sourced), but it should provide at least a setting to chose
whether to use login shell.

There are two places where new shell is started when launching byobu:
1) /usr/bin/byobu-shell does exec "$SHELL"
2) /usr/share/byobu/profiles/tmux does set -g default-command $SHELL

Tmux by default starts login shell, but it is explicitly disabled in
/usr/share/byobu/profiles/tmux for byobu by setting default-command. A
workaround is to comment out that line. I didn't manage to figure out
how to unset default-command from user profile.

Seems like most shells support -l | --login flag, so that also can be used to 
start login shell:
1) /usr/bin/byobu-shell: exec "$SHELL" --login
2) /usr/share/byobu/profiles/tmux: set -g default-command $SHELL --login

The first point is need so that initial byobu window uses login shell
and the second for the subsequent windows.

Previous commenter mentioned using -$SHELL to get login shell, but that
link is not installed on all distros, so I think the flag is the best
option.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/525552

Title:
  Byobu overwrites shell prompt setting

To manage notifications about this bug go to:
https://bugs.launchpad.net/byobu/+bug/525552/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to