By launching GNU screen or tmux as the initial default shell (set with chsh, for instance), passing arguments seems not to be supported, such as "-d RR" for screen and "attach" for tmux. chsh's argument is the full pathname to a shell file executable (listed in /etc/shells
).
For screen, is there an internal command to reattach itself to a previous screen session? Or is there a way to pull the individual processes from the previous screen session into the current session?
For tmux, is there a way to set, in the user configuration file (~/.tmux.conf
by default), an option to go directly to the previous session?
After launching tmux without any arguments (which creates a new session), one can manually switch to the previous session (CTRL+B, () and then kill the newly launched session (CTRL+B, :kill-session -a
).
chsh
to make screen your default shell without root? – Arkadiusz Drabczyk Aug 18 '19 at 11:13chsh -s /usr/bin/screen <login>
. In the chsh man page: "A normal user may only change the login shell for her own account; the superuser may change the login shell for any account." – Pedro Palhoto Aug 18 '19 at 11:20/etc/shells
? – Arkadiusz Drabczyk Aug 18 '19 at 11:23