Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In Byobu 5.17 (using tmux 1.6), how ought I format the windows.tmux file? I've poked around a bit, but have been unable to find a proper answer.

For reference, here's the screen version of what I want:

screen -t log watch -n 10 tail -n 5 /var/log/syslog /var/log/auth.log /var/log/ dmesg
screen -t mem watch -n 30 "df -h; echo ""; free -mt"
screen -t top top
screen -t bash /bin/bash

Many thanks.

share|improve this question
1  
Is this really still not answerable? I haven't seen any windows.tmux instructions out there yet. – Tohuw Nov 9 '13 at 16:35

Something like this should work, but you might also want to look into tmuxinator to specify tmux profiles in YAML.

new -s tmuxs # creates a new tmux session, replace "tmuxy" with whatever you'd like to name the session
new-window -n log 'watch -n 10 tail -n 5 /var/log/syslog /var/log/auth.log /var/log/dmesg'
new-window -n mem 'watch -n 30 "df -h; echo ""; free -mt"'
new-window -n top 'top'
new-window -n bash

It's pretty self explanatory, create a session and then start creating windows, naming them via '-n' and including the command you want to run as the last argument.

share|improve this answer

I finally found out how to get it to work. First you need an update to version Byobu 5.85 or later. Here is the corresponding commit with the fix and there is a PPA for Ubuntu.

First, check that the line source-file $BYOBU_CONFIG_DIR/windows.tmux in /usr/share/byobu/profiles/tmuxrc is uncommented or it won't work.

As you can see in updated documentation part of the commit you need to chain your commands with semicolons. To take the tmux example from the Arch Wiki and make it work it would look like this:

new -A -s SessionName -n WindowName nano;
neww -n foo/bar top;
splitw -v -p 50 -t 0 top;
selectw -t 1;
selectp -t 0

Don't forget to add -A to the new/new-session command or Byobu will be unable to reconnect to an existing session.

You should update to a newer version of tmux if you are on 14.04 or an older version than tmux 1.9, to avoid running into this issue: Create new-window with current directory in tmux

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.