Byobu refuses to launch if running ssh from a screen session

Bug #403988 reported by Chow Loong Jin on 2009-07-24
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
byobu
Medium
Dustin Kirkland 
byobu (Ubuntu)
Medium
Dustin Kirkland 

Bug Description

When ssh-ing into a remote machine from inside a screen session, TERM is already set to "screen", and this environment variable gets propagated into the shell session. However, Byobu does not like this, and refuses to start. The proper way to detect if screen is already running is to check the existence of the STY environment variable, which contains the current screen session. This will be blank on a fresh SSH session.

Changed in byobu:
status: New → Fix Committed
importance: Undecided → Medium
Changed in byobu:
status: Fix Committed → Fix Released
Gabriel de Perthuis (g2p) wrote :

This bug was introduced again in revision 722 ( http://bazaar.launchpad.net/~kirkland/byobu/trunk/revision/722 ):

721 kirklan | # Make sure that we're not already in a screen session
672 kirklan | [ -z "$STY" ] || exit 0
722 kirklan | [ "$TERM" = "screen-bce" ] && exit 0

Changed in byobu:
assignee: nobody → Dustin Kirkland (kirkland)
status: Fix Released → Confirmed
Dustin Kirkland  (kirkland) wrote :

Hmm, so from my perspective, byobu doesn't work very well at all when called from within an existing screen session. Escape keys don't propagate.

I could, perhaps, add a --force or --nesting option to byobu that would allow this behavior, for those who really want to do this...

Would that be an acceptable compromise?

:-Dustin

Gabriel de Perthuis (g2p) wrote :

That's perfectly acceptable to me, although where to put that (in ~/.bash_profile or ~/.profile for most users) will not be obvious to everyone.
If --force-nesting isn't passed, put a warning that an option is necessary for nesting, and maybe add a tip that people should use byobu-config to set up screen bindings with a different escape key on the remote host. Different escape keys are quite comfortable imho.

Agreed!

I'll take care of this.

:-Dustin

Changed in byobu:
status: Confirmed → Triaged
Gabriel de Perthuis (g2p) wrote :

Thank you muchly.

Dustin Kirkland  (kirkland) wrote :

So nesting byobu sessions is actually quite useful, so I'm dropping that check altogether.

Note that I find it useful to give each of the nested hosts a different escape sequence (eg ctrl-a, ctrl-b, etc).

Changed in byobu:
status: Triaged → In Progress
Changed in byobu (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Dustin Kirkland (kirkland)
Changed in byobu:
status: In Progress → Fix Committed
Changed in byobu (Ubuntu):
status: New → Fix Committed
Changed in byobu:
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package byobu - 2.46-0ubuntu1

---------------
byobu (2.46-0ubuntu1) lucid; urgency=low

  * byobu-janitor: seed the default color choices more effciently, also
    fixes some strange crashes on first run; default the colors to white
    on black
  * byobu-config, doc/help.txt: insert version number in byobu help menu,
    LP: #502119
  * bin/network: match interface a bit better for bridges, LP: #498722
  * bin/logo, bin/release: when looking at /etc/issue, grab the first
    line that starts with a real letter rather than control character,
    LP: #432751
  * byobu: deprecate code that prevented nested byobu sessions; this is
    is actually quite useful, although you should choose different
    escape sequences for each nested host, LP: #403988
  * bin/battery, bin/custom, bin/fan_speed, bin/temp, bin/temp_f: don't
    use ls programatically in for-loops, LP: #452405
  * bin/cpu_temp, bin/temp_f, bin/temp_c, byobu-config, byobu.1,
    profiles/common, rpm/byobu.spec, statusrc: merge temp_f and temp_c
    into a single cpu_temp script
  * profiles/common: adjust the formatting-only, and run-only-at-startup
    status scripts to run every 9,999,999 seconds (~115 days), minor
    performance improvement once a day, easier to identify such jobs;
    adjust cpu_count and mem_available to run more frequently, as
    cpu-hotplug and memory-ballooning are becoming more feasible,
    particularly in VMs
 -- Dustin Kirkland <email address hidden> Thu, 07 Jan 2010 21:53:14 -0600

Changed in byobu (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers