Comment 39 for bug 525552

Revision history for this message
Trenton Bullard (trent-bullard) wrote :

+1 for @readan2

I've been trying to make byobu+screen automatically start a login shell for months (i know that sounds pathetic), and this workaround adequately solves this for me. In order to utilize my ruby on rails environment I must be logged into a login shell which required me to do bash -l, /bin/bash --login, etc. every time I opened my ssh connection. To clarify this workaround however,

With my distro, in /usr/local/bin/byobu-shell there is a line that looks like this:
[ -n "$SHELL" -a -x "$SHELL" ] && exec "$SHELL" || exec /bin/bash

I changed it to look like this:
[ -n "$SHELL" -a -x "$SHELL" ] && exec "$SHELL" --login || exec /bin/bash --login

just in case anyone wasn't sure how to implement @readan2's instructions, doing this worked for me.

I also inserted this just before the 3 present commands in /usr/share/byobu/profiles/screenrc (assuming it would work the same as with tmux). I also didn't test after the first modification so this may or may not be necessary, but after doing these two things I no longer need to run /bin/bash --login.:
set -g default-command $SHELL --login

thanks @readan2 for the working solution. WHY COULDN'T I FIND YOU WEEKS AGO??