Initial window does not respect default-command

Bug #1369783 reported by Nilbus
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
byobu
Fix Released
Medium
Unassigned

Bug Description

I'm using byobu with tmux. I have configured ~/.byobu/.tmux.conf to give me a login shell in each new window:

    set -g default-command "bash -l"

However, the initial window created for a new byobu session does not run this default-command. The initial window is not a login shell. To make things more obvious for testing purposes, try setting the default-command to ssh into some host.

This initial-window problem does not occur when running tmux directly, but only when using byobu to start tmux.

Having the default-command run in all shells is important. In my case, tools like ruby's rvm that depend on a login shell do not work. A handful of others have complained about the same thing in the more recent comments on https://bugs.launchpad.net/byobu/+bug/525552. Having the initial window's environment differ from the others is quite counter-intuitive and has led to a lot of confusion.

$ byobu -v
byobu version 5.86
tmux 1.9

Tags: shell tmux

Related branches

Nilbus (nilbus)
description: updated
Changed in byobu:
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Okay, so the fix is to inspect ~/.byobu/.tmux.conf and check if the user has specified a default-command or a default-shell, and if so, then short circuit byobu's own logic.

Revision history for this message
Dustin Kirkland  (kirkland) wrote :

bzr commit -m '* usr/bin/byobu.in: LP: #1369783
  - respect user's custom default-command and/or default-shell
    in the first window launched' --fixes 'lp:1369783'
Committing to: /local/media/src/byobu/byobu/
modified debian/changelog
modified usr/bin/byobu.in
Committed revision 2427.

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

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.