1

I have a question regarding the status bar in byobu. When I use byobu on my own computer the name of the current window is just the window number (starting from 0; looks like "0:" "1:", etc.). However, I installed byobu on a remote server (ssh) and there the name of the window is the full path to the current directory (e.g. "0:/home/myname/myfolder", etc.). This is not very convenient as the path is often very long. Therefore, I would like to set the name to be only the window number.

I compared the files that are in the ~/.byobu folder from my computer and from the remote server, but I could not find any difference. I tried different settings in the statusrc (and other) files and spent many hours on Internet but did not find any answer for this issue... I am rather desperate...

Could someone tell me where (which command in which file) this setting must be made ??

Thank you in advance !

Erica

Erica Fary
  • 363
  • 1
  • 2
  • 10
  • The difference might be due to change in defaults in different versions of tmux between your personal computer and the server. Also [**this answer**](http://stackoverflow.com/a/31110556/319204) explains how to configure byobu to display the path as the title. Is this set?... – TheCodeArtist Jan 14 '17 at 10:34
  • Hmm I've never seen this (I'm the author/maintainer of Byobu). But I suspect it has to do with the tmux version or settings. Is there any difference between 'byobu -v' on the two systems? – Dustin Kirkland Jan 14 '17 at 10:57

2 Answers2

0

This same problem really drove me crazy when our company upgraded the environment I use most to CentOS 7. My byobu with tmux backend, on CentOS 6 anyway, used to show the name of the executable of whatever command was running in the shell, or just "bash" if nothing was running. This was acceptable and sometimes useful, but often that command shown was just "cat" or "python" because it would only show the first token of a command or piped series of commands. Still, I'd take that over showing the current working directory which is always ridiculously long.

After a long fight, I ended up with this in my .bashrc file so I could manually set the title of any of the windows:

function set_title { printf "\033k$1\033\\" }

that way, I could at the shell prompt type set_title some_topic where some_topic was something meaningful to me to remind me of whatever I was using that shell (and its command history) for. To my surprise, and I don't know why, but byobu then started doing what it used to do - automatically change the window title in the status bar to the current command. That is the case anyway until I do execute set_title project1 (or whatever). Then, from then on the window title will stay project1 until I do a set_title again. I actually find this preferable behavior now - it defaults to showing the running command, but I can manually set it to something more meaningful and then nothing resets it on me. I'm pretty sure the set_title function above will work for you (if you are using bash) for manually setting titles. As for whether or not it magically starts showing the command name again by default, and for no reason I can tell, YMMV.

slowkoni
  • 2,146
  • 1
  • 14
  • 7
  • Also, I think there is probably a key sequence to set window titles, I'm pretty sure I saw that somewhere, but I don't know what it is. Now that I have the above, I'm not motivated anymore to figure that out. – slowkoni Jun 26 '18 at 21:05
  • 2
    You can use F8 to set window titles – sudormrfbin Jan 03 '19 at 05:17
0

I ran into this problem on Fedora, which ships tmux 3.2a.

Here's what I think has gone wrong. In tmux 3.2a, there's an option allow-rename that seems to be necessary. If you don't turn it on, I think tmux ignores attempts by byobu to use escape sequences to rename panes.

I added this line to ~/.byobu/.tmux.conf:

set -g allow-rename on

and restarted byobu. Now the status line shows

0:<directory of pane 0> 1:<directory of pane 1> etc.