You are not logged in.
Pages: 1
I discovered the screen command some days ago, and i am starting to use it, but, even checking the man pages, i still have some questions about its usage:
I ssh into a headless server of mine, and then i run the command screen.
Then, in that "screen" i created and i am in, i run, for example, finch (Console-mode pidgin) - that is full screen. How can i open now, without closing this program, access to the prompt or change to another screen instance? i am doing it currently by closing the connection (closing the terminal which i used to ssh) and ssh back to my server again.... but i dont think this is the correct way.... anyone with extensive screen knowledgement?
Thanks!
Offline
Ctrl-A-D to detach and then "screen -r" to reattach.
Last edited by lucke (2009-04-26 21:59:41)
Offline
Ctrl-A-D to detach and then "screen -r" to reattach.
Exactly what i was looking for . Thanks!!
Offline
Hey Xion,
screen is a handy lil program, I use it all the time as well. Once you have screen running, and you want to get off that instance of screen you first need to detach it. [ctrl]+A+D will detach the screen putting you back to your regular bash shell.
Now you can create another screen session the exact same way as your first. You can use screen -ls to get a listing of your currently running screen sessions in the background. Then to reattach you simply type screen -r [# of session]
Also if you start screen with the -S option, you can name that session so you can pick it out easier with -ls. for example
screen -S [session name]
hope this helps
Offline
Thanks to both: Is a new tool that i discovered, and that will come handy for my headless server.
Many, many thanks to both
Offline
this is so useful, put this in .bashrc
function scr {
if screen -ls | grep -q Main; then
screen -xr Main
else
screen -S Main
fi
}
then type scr in the terminal, and it mount your existing screen session, this is useful for one screen session and not when you use two or more screens
Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.
-- Antoine de Saint-Exupery
Offline
Thanks for the tip
Offline
I usually don't have more than one instance of screen running because you can have multiple windows inside of a single screen session.
Ctrl+a c creates a new window.
Ctrl+a n or p switches to next/previous window
Ctrl+a w lists current windows
Ctrl+a 0-9 switches to that window number
Offline
Pages: 1