Hot answers tagged

15

tmux kill-session [-t session_name] the processes in the virtual terminals should receive SIGHUP.


13

From the byobu help menu Shift + F1: Use Shift+Alt+[←↑→↓].


11

Here's a few samples from the byobu documentation, section Status Notifications: cpu_count - the number of cpu's or cores on the system; displayed in the lower bar toward the right in the default text color on the default background, followed by a trailing 'x' cpu_freq - the current frequency of the cpu in GHz; displayed in the lower bar ...


8

Unfortunately, GNU Screen is unable to cleanly support UTF8 in the status bar. This was one of several reasons why I added the Tmux backend support to Byobu. Full disclosure: I'm the author and maintainer of Byobu.


8

I needed to do the same thing, found the key documented as Dustin Kirkland had stated, but for me, ctrlb shift-F12. Of course, if you have remapped your bind-key to ctrla then adjust accordingly. The bind-key is not necessary for this to work. It is a toggle, so you only need to toggle it once with the shift-F12 and then if you need the Byobu function keys ...


6

The problem is twofold. First, tmux by default converts the control-arrow keys from one type of escape sequence to another. So special keys such as controlleft are sent to vim without the modifier, e.g., left. If you use cat -v to see the different escape sequences, you might see something like this ^[OD versus this (outside tmux): ^[[1;5D The line ...


6

It's possible that there's a runaway status script from Byobu that's consuming all of the CPU. You can perhaps disable them one by one until you find the culprit. The updates_available script is probably the most resource intensive, and the one that causes this sort of trouble most often. If you do find which one is misbehaving, please file a bug at https:...


6

Just set the default-terminal in profile.tmux: $ echo 'set -g default-terminal "screen-256color"' >> ~/.byobu/profile.tmux


6

This was bothering me as well, so I wrote a tmux plugin for this. It's not perfect, but can easily be extended to know how to safely kill most kinds of processes before exiting tmux: tmux-safekill


4

Maybe it's not the most elegant solution, but does what you asked for: tmux list-panes -s -F "#{pane_pid} #{pane_current_command}" | grep -v tmux | awk '{print $1}' | xargs kill -9 If you run this from within your tmux-session, it will kill all the processes it spawned, and you can then quit tmux with exit.


4

GNU screen (one backend that byobu can use, along with tmux) has the lockscreen functionality. Have a look at the man page to see what it does. The default binding is C-a C-x. With regard to your trying to lock root out, it's rather pointless. What you can try is to find a locking program that let you set a password and hope that root doesn't know about it.


4

All GNU Screen's keys binding work exactly the same in byobu. To select a window, simply pressing Ctrl+a, then Window number Note that Ctrl+a is conflict with GNU Emacs keys binding, so byobu will ask you to chose the behavior. In any case, you can use Ctrl+a, then a to go to beginning of line in Emacs keys binding mode.


4

byobu is just a wrapper around tmux, which is responsible for the behavior you're seeing. tmux is attempting to translate "keys" into the character sequence that xterm would encode modified special keys. In the manual, that's documented: xterm-keys [on | off] If this option is set, tmux will generate xterm(1) -style ...


3

tput tells you what the terminal advertises as its function keys. Terminals often don't advertise all the function keys and keychords that they support. To see what escape sequences the terminal actually sends, use the Ctrl+V method mentioned in that same answer: press Ctrl+V in a terminal application that doesn't rebind the Ctrl+V key (such as the shell). ...


3

Byobu now also supports a tmux backend, in addition to screen. For tmux, you can issue the lock-session (to lock the entire session and all attached clients), or the lock-client command, to just lock the current client.


3

As of Byobu 5.x, several menu options have been deprecated, most notably the ones you've mentioned (the ability to choose your colors and set default windows). Regarding the colors, you can trivially set them by editing the file ~/.byobu/colors or ~/.byobu/colors.tmux depending on your backend (screen or tmux). When Byobu was originally released (under its ...


3

set-window-option -g status-left " #S " you can try while using tmux.


2

Not sure how to make this work with the window file as that seems to be dedicated to screen, but I may be wrong. Anyway, the following works with byobu here (tmux backend): byobu new-session -n NAME -d \; split \; attach You may also want to take a look at this.


2

The bug is in version 5.21 of byobu currently on the official Ubuntu repos. In the byobu PPA, version 5.22 doesn't bleed colors to the right anymore. Still no answer on the {-} issue. Procedure: sudo add-apt-repository ppa:byobu/ppa sudo apt-get update sudo apt-get install byobu


2

The only reasonable way that I've found to run a command, leaving the output and an interactive shell behind within screen is to use the 'stuff' command to execute the command: screen -t title1 bash stuff 'ls /tmp^M' # in vim type control-v control-m to insert the return at the end


2

If it's important to use the same shell use the --rcfile flag. $ cat test.bashrc ls PS1='TEST \$' $ screen -t test bash --rcfile test.bashrc -i a.file b.file test.bashrc TEST $ If your .bashrc is setting the environment, be sure to source it.


2

You could switch the irssi process to use tmux, instead of the login process.


2

If you want a command to be executed at boot time, you can put it in your crontab with @reboot instead of a time. So run crontab and add a line like @reboot byobu -S boot-time mycommand Instead of putting the command on the command line of byobu, you can put it in a Byobu session file. If you want the session to be executed as root, you can start it from /...


2

From here you can unbind the key combination in byobu: Create a file ~/.byobu/.tmux.conf with (or add if the file exists): set-window-option -g xterm-keys on Then add the following to ~/.byobu/keybindings.tmux: unbind-key -n C-Left unbind-key -n C-Right


2

Have a look at the commands: keep-one-running(1) run-one-until-success(1) run-one-until-failure(1) and friends in the run-one package in Ubuntu. Simply wrap your command with one of those, as appropriate. Full disclosure: I'm the author of Byobu, as well as the run-one suite of utilities.


2

This was a bug in a previous version of Byobu. It should be fixed now. If you can still reproduce it with the latest released version, then please open a bug at https://bugs.launchpad.net/byobu. Thanks!


2

The key to the answer was in this stack overflow question. Use the ssh -t flag to open an interactive pseudo-terminal. Then byobu new-session and byobu send-keys to pass commands to a byobu session. First make a .ssh/config on the local machine to set up the ssh connection Host remote-server-jupyter HostName 123.45.6.789 User ...


1

That odd series of characters typically is the function key, but you can also fake it with Meta shortcuts and the fact that an escape prefix makes the next key meta. Press Esc, and then 1 to send M-1 which is generally parsed as F1 in many commandline tools, including byobu.


1

cd /usr/share/byobu/profiles sudoedit tmux Find this: # Cannot use: # - screen-bce, screen-256color-bce: tmux does not support bce # - screen-256color: vim broken without -bce set -g default-terminal "screen" ...and change that to this: set -g default-terminal "screen-256color" You might be able to achieve the same result for your own account only ...


1

I accomplished this with tmuxinator.


Only top voted, non community-wiki answers of a minimum length are eligible