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)


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.


you might want to have a look at tmux


You could have something like this with a remote desktop software that create its own session, like for example FreeNX on the server and NoMachine client on the client.

You can also use this with server and client machine being the same machine, so as to simulate what you ask for.


This not possible without using screen, byobu (as mentioned by Adrian) or similar tools.

An interactive shell must be connected to a tty. If you logout, the shell looses the connection to the tty and exits.

Screen and friends avoid this by creating one or more persistent virtual ttys. When you logout, the shell remains connected to the virtual tty and does not notice that the user was disconnected.

For non-interactive programs, a tty is not required and instead of screen, you could use nohup.

As Adrian points out, it is possible use byobu per default, and, as you know, many power users will just start screen as the very first thing they do after login. Is there a specific reason, you want to avoid screen?

  • I consider screen inconvenient because Im used to scrolling and the copy mode is a bit irritating to me. Small things I know. :) Nov 2 '11 at 8:03

You can start a command via nohup:

nohup command &

If you would like to have the output somewhere saved do

nohup command > output.txt &

Now you have to detach the running software by

  1. pressing CTRL-Z
  2. enter bg
  3. disown %1

More hints to nohup can be found in its manpage (http://ss64.com/osx/nohup.html), same for disown (http://ss64.com/osx/disown.html).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.