Tuesday, May 14, 2024
6
rated 0 times [  6] [ 0]  / answers: 1 / hits: 870  / 3 Years ago, sat, december 4, 2021, 3:48:13

As most of you know GNU Screen is a nice tool that enables you to do something like:




One other good use for the detach and reattach is as a console-mode
"remote desktop" feature. You can detach from a screen session at
work, shell into the machine from home, and reattach. Very, very
handy. With a bit of extra work, you can even have a number of
terminals all attached to the same session--great for collaborative
efforts and meetings.




Now Im curious is there a way to do that without Screen. Aka instead of logut i type magiclogout and next time I login I get my old sesion(if OS hasnt reeboted ofc)


More From » command-line

 Answers
6

byobu is based on screen ; it has a menu option to make it your default shell.



You can either exit as normal or detach with alt-A, D as you would with plain screen, and your session will be waiting when you log in again.



In addition it adds a number of keys for terminal management, F2 to create a new terminal, and F3 and F4 to move between windows, and a status bar with a number of useful indicators like outstanding package updates.



It's installed by default on Ubuntu Server builds, and rapidly becomes my default terminal on most servers I manage.



As I said, byobu depends on screen to work though... I'm not aware of any way of resuming a session other than having a process stay running on the target machine.



Edit : byobu will also wrap tmux (which is the default on newer versions of Ubuntu). You don't have to do anything in most cases - it will just use the default terminal multiplexer.


[#42656] Sunday, December 5, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
oneeme

Total Points: 340
Total Questions: 110
Total Answers: 133

Location: Ghana
Member since Fri, Oct 21, 2022
2 Years ago
;