LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   SCREEN command (https://www.linuxquestions.org/questions/linux-newbie-8/screen-command-901403/)

sunlinux 09-06-2011 06:19 AM

SCREEN command
 
Cool, I have been working with command called screen and find it pretty handy, I have one query with it .

that like it open different windows like screen:1, screen:2 likewise. but I am confused while working with them , how can I see the list of opened screen list and move to what I would like to work ? like can we list them as below:

screen:0
screen:1
screen:2

and select which ever we wish to work with.

Nylex 09-06-2011 06:32 AM

Ctrl-a " shows you the list of windows. Ctrl-a ? shows you a list of key bindings, which might also be useful. If you want to see a list of screen sessions, run "screen -ls". This stuff is covered in the manual..

sunlinux 09-07-2011 01:43 AM

but Ctrl-a " and Ctrl-a ? keys are not working ... using centos 5.4-- any command ?

Nylex 09-07-2011 01:48 AM

Those are standard commands for Screen. What exactly do you want? A list of screen sessions (e.g. to see which are detached), or to see a list of windows in a given session? For the former, run "screen -ls" and for the latter, the commands above should work. You have to press Ctrl-a, release the keys and then type the " (which is Shift-2 for a UK keyboard), for example.

indeliblestamp 09-07-2011 02:26 AM

You can create a file called .screenrc in your home directory and add something like this:
Code:

hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][ %{=kw}%?%-Lw%?%{r}(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B}%Y-%m-%d %{W}%c %{g}].'
autodetach on
defscrollback 30000 # Use a 30000-line scrollback buffer

termcapinfo xterm ti@:te@

In my box it displays a nice, coloured list of terminals in the current screen session.

sunlinux 09-07-2011 05:56 AM

Quote:

Originally Posted by Nylex (Post 4463607)
Those are standard commands for Screen. What exactly do you want? A list of screen sessions (e.g. to see which are detached), or to see a list of windows in a given session? For the former, run "screen -ls" and for the latter, the commands above should work. You have to press Ctrl-a, release the keys and then type the " (which is Shift-2 for a UK keyboard), for example.


thanx helped.. I wonder on my foolishness


All times are GMT -5. The time now is 01:30 AM.