Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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)

share|improve this question

5 Answers 5

up vote 4 down vote accepted
+100

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.

share|improve this answer

you might want to have a look at tmux

share|improve this answer

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?

share|improve this answer
    
I consider screen inconvenient because Im used to scrolling and the copy mode is a bit irritating to me. Small things I know. :) –  NoSenseEtAl Nov 2 '11 at 8:03

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.

share|improve this answer

You can start a command via nohup:

nohup command & (if you would like to have the output somewhere saved 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).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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