Make Byobu Start at Text Login, and Undo It Safely
Text-console logins do not start Byobu on their own until something tells the shell to launch it, and that something is byobu-enable. You will turn on the automatic launch, check the shell startup entry it installs, and remove it with byobu-disable when you no longer want it. The examples match Byobu 6.11, installed here as Debian package version 6.11-0ubuntu1.1.
The route
Jump straight to the step you need, or tick off Done means at the end.
Allow about ten minutes. You need Byobu installed and access to the account whose login files you want to change. These commands operate on that account's home directory. They do not need sudo; using elevated privileges would risk changing root's login configuration instead.
1. Confirm the installed command
Check the package and the executable before changing login behaviour. This is read-only:
$ command -v byobu-enable byobu-disable
/usr/bin/byobu-enable
/usr/bin/byobu-disable
$ dpkg-query -W -f='${Package} ${Version}\n' byobu
byobu 6.11-0ubuntu1.1
The manpage synopsis has no required arguments and documents no options for either wrapper. Do not append a profile name, a shell command or an invented --enable flag. The wrappers are switches for the login configuration of the current user.
Checkpoint
You have confirmed that the two commands exist and that you are working as the account that should receive the change.
2. Inspect the current login files
Before enabling anything, look for existing Byobu launcher lines and the disable marker. The paths below are in your own home directory, so this remains an ordinary user operation:
$ grep -nH 'byobu-launch\|screen-launch' \\
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.bash_login" "$HOME/.zprofile" \\
"$HOME/.config/fish/config.fish" 2>/dev/null || true
$ ls -ld "$HOME/.byobu" 2>/dev/null || true
$ ls -l "$HOME/.byobu/disable-autolaunch" 2>/dev/null || true
Missing files and a non-zero grep status are normal. The command may find a launcher installed by an earlier Byobu version or by another tool. Record what you see before continuing, especially if a shared profile is managed by configuration management.
3. Enable automatic launch
Run the wrapper without arguments:
$ byobu-enable
The Byobu window manager will be launched automatically at each text login.
To disable this behavior later, just run:
byobu-disable
This is a persistent per-user change, not a one-session toggle. The wrapper calls byobu-launcher-install. On a normal Bourne-style login it removes old Byobu launcher lines, appends a line that sources /usr/bin/byobu-launch to ~/.profile, and creates ~/.hushlogin. It also removes Byobu's disable-autolaunch marker. If your default shell is zsh or fish, the installer can use the corresponding startup file when that file and shell arrangement apply.
Because login files are executable shell input, this step is security-sensitive. Review the resulting line rather than copying a launcher from an untrusted page:
$ grep -nH 'byobu-launch' "$HOME/.profile" "$HOME/.zprofile" 2>/dev/null || true
/home/you/.profile:1:_byobu_sourced=1 . /usr/bin/byobu-launch 2>/dev/null || true
$ test -f "$HOME/.hushlogin" && echo '.hushlogin present'
.hushlogin present
Your line number, home path and selected startup file can differ. Do not treat .hushlogin as proof that Byobu started; it suppresses login-message output. The launcher line is the relevant setting.
4. Start a fresh text login
Automatic launch is evaluated by the login shell, not by the shell that is already open. Log out of the text console and log in again, or open a new text-console login through your normal access method. Do not test only with source ~/.profile: that runs the file inside the current shell and can give a misleading result.
After a successful fresh login, Byobu should open instead of leaving you at an ordinary shell prompt. Verify from inside that session:
$ byobu
If Byobu is already running, the command may attach to or create a session according to your installed backend. The automatic-launch setting itself does not select tmux or screen and does not create a system service.
Checkpoint
A new text-console login enters Byobu, and the startup file contains the installed launcher line.
5. Disable it and recover the old login flow
To undo the persistent setting, log out of any Byobu session you want to keep separate, then run:
$ byobu-disable
The Byobu window manager will no longer be launched automatically at login.
To re-enable this behavior later, just run:
byobu-enable
The disable wrapper calls byobu-launcher-uninstall. It removes Byobu and screen launcher lines from the recognised user startup files, creates ~/.byobu/disable-autolaunch, and removes ~/.hushlogin. It does not remove your Byobu sessions, package or personal Byobu configuration. The installed wrapper also attempts to close the current Byobu session when its environment identifies that session, so treat this command as session-disrupting.
Check the result before your next login:
$ grep -nH 'byobu-launch\|screen-launch' \\
"$HOME/.profile" "$HOME/.bash_profile" "$HOME/.bash_login" "$HOME/.zprofile" \\
"$HOME/.config/fish/config.fish" 2>/dev/null || true
$ test -f "$HOME/.byobu/disable-autolaunch" && echo 'automatic launch disabled'
automatic launch disabled
If you disabled the wrong account, run byobu-enable again as that account to restore its normal Byobu startup entry. If your files are centrally managed, restore the managed version instead of repeatedly running the wrapper.
6. Troubleshoot without guessing
If a new login does not enter Byobu, first identify the shell and login mode:
$ printf 'shell: %s\n' "$SHELL"
shell: /bin/bash
$ printf 'argv0: %s\n' "$0"
argv0: -bash
$ command -v byobu-launch
/usr/bin/byobu-launch
A non-login shell may not read ~/.profile. Bash can instead use ~/.bash_profile or ~/.bash_login when present, and those files may need to source ~/.profile as part of your existing shell setup. Do not add duplicate launcher lines to several files merely to make the symptom disappear.
If the command reports a permissions error, inspect ownership and mode without using sudo:
$ id -un
you
$ ls -ld "$HOME" "$HOME/.profile" 2>/dev/null
Fix ownership through your normal account-administration process. Running the wrapper as root changes root's files and can leave the intended user's configuration untouched. Also check whether a profile manager, shell framework or fleet tool rewrites the file at login.
Do not delete ~/.profile wholesale to remove Byobu. That can discard unrelated environment variables and startup commands. Use byobu-disable, then review the small diff or restore the file from its managed source.
Done means
byobu-enableran as the intended non-root user.- A recognised login startup file contains one Byobu launcher entry.
- A fresh text-console login was used to test the behaviour.
byobu-disableis available as the undo operation and its session impact is understood.- You can distinguish a login-shell problem from a missing Byobu executable without deleting startup files.