Recent Changes - Search:

Softwares

.

GNU-Screen

Main.GNU-Screen History

Hide minor edits - Show changes to output

August 16, 2014, at 02:39 AM by 72.163.217.103 -
Added line 3:
August 09, 2014, at 04:40 PM by 72.163.217.104 -
Added lines 188-210:

[@
Ctrl+A then c creates a new window.
Ctrl+A then A sets the name of the current window.
Ctrl+A then a digit from 0 to 9 switches to that window.
Ctrl+A then " displays a list of all windows.
Ctrl+A then S splits the current window in two.
Ctrl+A then Ctrl+I changes the focus to the next window.
Ctrl+A then x locks Screen (much like a screensaver).
Ctrl+A then d detaches from the current Screen session.

.screenrc file in our home directory:

cd;vi .screenrc

Add the following two lines, keeping in mind that everything after the first line (bind X remove) is one single line:

bind X remove
hardstatus alwayslastline '%{= G}[ %{G}%H %{g}][%= %{= w}%?%-Lw%?%{= R}%n*%f %t%?%{= R}(%u)%?%{= w}%+Lw%?%= %{= g}][ %{y}Load: %l %{g}][%{B}%Y-%m-%d %{W}%c:%s %{g}]'

Save and exit.

@]
July 29, 2014, at 07:09 AM by 115.242.178.1 -
Added lines 184-187:

!!Example:

http://www.itmission.org/images/screen-slpit-example.PNG
July 29, 2014, at 07:05 AM by 115.242.178.1 -
Changed line 183 from:
https://imageshack.com/i/p8J80hL8p
to:
http://www.itmission.org/images/splitscreen-usage.PNG
July 29, 2014, at 07:01 AM by 115.242.178.1 -
Added lines 180-183:

!!!How to split the terminal into more than one “view”?

https://imageshack.com/i/p8J80hL8p
December 04, 2012, at 05:38 PM by 15.211.153.75 -
Changed line 33 from:
* The first window (the one you're actually using) is numbered as 0, while future windows will be labeled as 1, 2, 3 etc.
to:
The first window (the one you're actually using) is numbered as 0, while future windows will be labeled as 1, 2, 3 etc.
December 04, 2012, at 05:37 PM by 15.211.153.75 -
Added line 28:
Added line 30:
Added line 32:
December 04, 2012, at 11:01 AM by 15.211.153.74 -
Added lines 5-14:
!!DESCRIPTION
Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells).

!!SYNOPSIS
[@
screen [ -options ] [ cmd [ args ] ]
screen -r [[pid.]tty[.host]]
screen -r sessionowner/[[pid.]tty[.host]]
@]
Changed lines 28-29 from:
When creating a new session, this option can be used to specify a meaningful name for the session. This name identifies the session for "screen -list" and "screen -r" actions. It substitutes the default [tty.host] suffix.
to:
When creating a new session, this option can be used to specify a meaningful name for the session.
This name identifies the session for "screen -list" and "screen -r" actions. It substitutes the default [tty.host] suffix.
Deleted line 39:
December 04, 2012, at 10:55 AM by 15.211.153.74 -
Changed lines 9-12 from:
* The standard way to create a new window is to type "C-a c".

!!Example: %blue%screen emacs prog.c
* "C-a ?". Typing these two characters will display a list of the available screen commands and their bindings.
to:
* The standard way to create a new window is to type "C-a c" where C= ctrl key
December 04, 2012, at 10:46 AM by 15.211.153.77 -
Changed lines 5-10 from:
* You need to have screen installed check for.
%blue%/usr/bin/screen

* Install if not found.
%blue% yum install screen
to:
* You need to have screen installed check for. %blue%/usr/bin/screen
* Install if not found. %blue% yum install screen
Changed lines 11-13 from:
!!Example:
%blue%screen emacs prog.c
to:
!!Example: %blue%screen emacs prog.c
Changed lines 80-81 from:
!!!Step 8 To split the screen in two
to:
!!!Step 9 To split the screen in two
Changed lines 88-89 from:
!!!Step 9 Help within Screen.
to:
!!!Step 10 Help within Screen.
Changed line 133 from:
!!!Step 10 Help from command help.
to:
!!!Step 11 Help from command help.
December 04, 2012, at 10:44 AM by 15.211.153.77 -
Deleted line 136:
Added lines 139-176:
!!!Step 10 Help from command help.

[@
Use: screen [-opts] [cmd [args]]
or: screen -r [host.tty]

Options:
-a Force all capabilities into each window's termcap.
-A -[r|R] Adapt all windows to the new display width & height.
-c file Read configuration file instead of '.screenrc'.
-d (-r) Detach the elsewhere running screen (and reattach here).
-dmS name Start as daemon: Screen session in detached mode.
-D (-r) Detach and logout remote (and reattach here).
-D -RR Do whatever is needed to get a screen session.
-e xy Change command characters.
-f Flow control on, -fn = off, -fa = auto.
-h lines Set the size of the scrollback history buffer.
-i Interrupt output sooner when flow control is on.
-l Login mode on (update /var/run/utmp), -ln = off.
-list or -ls. Do nothing, just list our SockDir.
-L Turn on output logging.
-m ignore $STY variable, do create a new screen session.
-O Choose optimal output rather than exact vt100 emulation.
-p window Preselect the named window if it exists.
-q Quiet startup. Exits with non-zero return code if unsuccessful.
-r Reattach to a detached screen process.
-R Reattach if possible, otherwise start a new session.
-s shell Shell to execute rather than $SHELL.
-S sockname Name this session <pid>.sockname instead of <pid>.<tty>.<host>.
-t title Set title. (window's name).
-T term Use term as $TERM for windows, rather than "screen".
-U Tell screen to use UTF-8 encoding.
-v Print "Screen version 4.00.02 (FAU) 5-Dec-03".
-wipe Do nothing, just clean up SockDir.
-x Attach to a not detached screen. (Multi display mode).
-X Execute <cmd> as a screen command in the specified session.

@]
December 04, 2012, at 10:43 AM by 15.211.153.77 -
Added line 37:
!!!List the window created.
Deleted lines 45-89:

* Ctrl+a ? shows the key bindings

[@
Screen key bindings, page 1 of 2.

Command key: ^A Literal ^A: a

break ^B b lockscreen ^X x reset Z
clear C log H screen ^C c
colon : login L select '
copy ^[ [ meta a silence _
detach ^D d monitor M split S
digraph ^V next ^@ ^N sp n suspend ^Z z
displays * number N time ^T t
fit F only Q title A
flow ^F f other ^A vbell ^G
focus ^I pow_break B version v
help ? pow_detach D width W
history { } prev ^P p ^? windows ^W w
info i readbuf < wrap ^R r
kill K redisplay ^L l writebuf >
lastmsg ^M m remove X xoff ^S s
license , removebuf = xon ^Q q

^] paste [.]
" windowlist -b
- select -
0 select 0
1 select 1
2 select 2
3 select 3
4 select 4
5 select 5
6 select 6
7 select 7
8 select 8
9 select 9
I login on
O login off
] paste .


@]
Changed lines 78-79 from:
!!!To scroll back through screen's history.
to:
!!! Step 8 To scroll back through screen's history.
Added lines 93-139:

!!!Step 9 Help within Screen.

* Ctrl+a ? shows the key bindings

[@
Screen key bindings, page 1 of 2.

Command key: ^A Literal ^A: a

break ^B b lockscreen ^X x reset Z
clear C log H screen ^C c
colon : login L select '
copy ^[ [ meta a silence _
detach ^D d monitor M split S
digraph ^V next ^@ ^N sp n suspend ^Z z
displays * number N time ^T t
fit F only Q title A
flow ^F f other ^A vbell ^G
focus ^I pow_break B version v
help ? pow_detach D width W
history { } prev ^P p ^? windows ^W w
info i readbuf < wrap ^R r
kill K redisplay ^L l writebuf >
lastmsg ^M m remove X xoff ^S s
license , removebuf = xon ^Q q

^] paste [.]
" windowlist -b
- select -
0 select 0
1 select 1
2 select 2
3 select 3
4 select 4
5 select 5
6 select 6
7 select 7
8 select 8
9 select 9
I login on
O login off
] paste .


@]
December 04, 2012, at 10:39 AM by 15.211.153.77 -
Changed lines 41-46 from:
!!!Step 3

*
To kill not responding programs, use

%blue%Ctrl+a K.
to:
!!!Step 3 To detach from this session, press

%blue%Ctrl+a d.
Changed lines 90-93 from:
!!!Step 4 To detach from this session, press

%blue%Ctrl+a d.
to:
!!!Step 4 To kill not responding programs, use

%blue%Ctrl+a K.
Changed lines 130-131 from:
!!!To split the screen in two
to:
!!!Step 8 To split the screen in two
December 04, 2012, at 10:37 AM by 15.211.153.77 -
Changed lines 16-18 from:
screen emacs prog.c
to:
%blue%screen emacs prog.c
Changed lines 22-23 from:
* Fresh screen session:
to:
!!!Step 1 create fresh screen session:

%blue%screen -S <Yourname>
Deleted line 26:
Deleted lines 28-30:
%blue%screen -S <Yourname>
Changed lines 31-32 from:
* To create a new window, type
to:
!!!Step 2 create a new window.
Added lines 41-42:
!!!Step 3
Changed lines 91-92 from:
!!!To detach from this session, press
to:
!!!Step 4 To detach from this session, press
Changed lines 95-96 from:
!!!To see the screen sessions created.
to:
!!!Step 5 To see the screen sessions created.
Changed lines 99-100 from:
!!!To re-attach to a detached session, open a terminal and type.
to:
!!!Step 6 To re-attach to a detached session, open a terminal and type.
Changed line 103 from:
!!!Sharing a screen session
to:
!!!Step 7 Sharing a screen session
December 04, 2012, at 10:25 AM by 15.211.153.77 -
Changed lines 6-7 from:
/usr/bin/screen
to:
%blue%/usr/bin/screen

* Install if not found.
%blue% yum install
screen
December 04, 2012, at 10:06 AM by 15.211.153.75 -
Changed lines 23-24 from:
screen -S <Yourname>
to:
%red% -S sessionname

When creating a new session, this option can be used to specify a meaningful name for the session. This name identifies the session for "screen -list" and "screen -r" actions. It substitutes the default [tty.host] suffix.

%blue%screen -S
<Yourname>
Changed lines 34-35 from:
Ctrl+a and then press c (create).
to:
%blue%Ctrl+a and then press c (create).
Changed lines 44-45 from:
Ctrl+a K.
to:
%blue%Ctrl+a K.
Changed lines 92-93 from:
Ctrl+a d.
to:
%blue%Ctrl+a d.
Changed lines 96-97 from:
screen -list
to:
%blue%screen -list
Changed lines 100-101 from:
screen -r <session>
to:
%blue%screen -r <session>
Changed lines 106-107 from:
chmod +s /usr/bin/screen
to:
%blue%chmod +s /usr/bin/screen
Changed lines 110-111 from:
screen -S sessionName
to:
%blue%screen -S sessionName
Changed line 120 from:
screen -x sessionName
to:
%blue%screen -x sessionName
December 04, 2012, at 09:58 AM by 15.211.153.75 -
Added line 2:
(:Googletxt:)
Changed line 10 from:
* By default, each command begins with a control-a (abbreviated C-a from now on), and is followed by one other keystroke.
to:
* By default, %red%each command begins with a control-a (abbreviated C-a from now on), and is followed by one other keystroke.
Deleted line 134:
(:Googletxt:)
December 04, 2012, at 09:56 AM by 15.211.153.75 -
Changed lines 4-5 from:
* You need to have
to:
* You need to have screen installed check for.

/usr/bin/screen
Changed lines 12-15 from:
* screen emacs prog.c
to:
!!Example:

screen
emacs prog.c
Changed lines 18-22 from:
!!Getting Started.

* Fresh
screen session: screen -S <Yourname>
to:
!!Getting Started with screen for the first time.

* Fresh screen session:

screen -S <Yourname>
Changed lines 26-27 from:
* To create a new window, type Ctrl+a and then press c (create).
to:
* To create a new window, type

Ctrl+a and then press c (create).
Changed lines 36-37 from:
* To kill not responding programs, use Ctrl+a K.
to:
* To kill not responding programs, use

Ctrl+a K.
Changed lines 86-87 from:
Ctrl+a d.
to:
Ctrl+a d.
Changed lines 90-91 from:
screen -list
to:
screen -list
Changed lines 94-95 from:
screen -r <session>
to:
screen -r <session>
Changed lines 100-101 from:
chmod +s /usr/bin/screen
to:
chmod +s /usr/bin/screen
Changed lines 104-105 from:
screen -S sessionName
to:
screen -S sessionName
Changed lines 110-111 from:
Ctrl+a: acladd username, where username is the Unix user for the second user.
to:
Ctrl+a: acladd username, where username is the Unix user for the second user.
Changed line 114 from:
screen -x sessionName
to:
screen -x sessionName
December 04, 2012, at 09:49 AM by 15.211.153.75 -
Added line 4:
* You need to have
December 04, 2012, at 09:47 AM by 15.211.153.75 -
Added lines 1-124:
!!GNU Screen terminal emulation
(:Google1:)
----

* When screen is called, it creates a single window with a shell.
* By default, each command begins with a control-a (abbreviated C-a from now on), and is followed by one other keystroke.
* The standard way to create a new window is to type "C-a c".

* screen emacs prog.c
* "C-a ?". Typing these two characters will display a list of the available screen commands and their bindings.


!!Getting Started.

* Fresh screen session: screen -S <Yourname>

* The first window (the one you're actually using) is numbered as 0, while future windows will be labeled as 1, 2, 3 etc.

* To create a new window, type Ctrl+a and then press c (create).

* Press Ctrl+a, then n to switch to next window and Ctrl+a, then n to switch to the previous one.

* Press Ctrl+a, and then Shift+" to see the list.

* Press Ctrl+a, then a number from 0 to 9, to switch to the corresponding window.

* To kill not responding programs, use Ctrl+a K.

* Ctrl+a ? shows the key bindings

[@
Screen key bindings, page 1 of 2.

Command key: ^A Literal ^A: a

break ^B b lockscreen ^X x reset Z
clear C log H screen ^C c
colon : login L select '
copy ^[ [ meta a silence _
detach ^D d monitor M split S
digraph ^V next ^@ ^N sp n suspend ^Z z
displays * number N time ^T t
fit F only Q title A
flow ^F f other ^A vbell ^G
focus ^I pow_break B version v
help ? pow_detach D width W
history { } prev ^P p ^? windows ^W w
info i readbuf < wrap ^R r
kill K redisplay ^L l writebuf >
lastmsg ^M m remove X xoff ^S s
license , removebuf = xon ^Q q

^] paste [.]
" windowlist -b
- select -
0 select 0
1 select 1
2 select 2
3 select 3
4 select 4
5 select 5
6 select 6
7 select 7
8 select 8
9 select 9
I login on
O login off
] paste .


@]

!!!To detach from this session, press

Ctrl+a d.

!!!To see the screen sessions created.

screen -list

!!!To re-attach to a detached session, open a terminal and type.

screen -r <session>

!!!Sharing a screen session

* Set the screen binary setuid root.

chmod +s /usr/bin/screen

* Login as root and then type.

screen -S sessionName

* Enable screen's multi-user access function by pressing Ctrl+a then :multiuser on (to type ":", press "shift+;")

* Grant permissions to the second user by pressing

Ctrl+a: acladd username, where username is the Unix user for the second user.

* User can now connect.

screen -x sessionName

!!!To scroll back through screen's history.

* Enable the copy mode by pressing Ctrl+a [
* Now, use either one of the arrow keys, page up, page down, home and end keys to scroll through screen's history.

* Pressing Enter will start marking text for copying.
* Pressing Enter again will copy the selected text into the clipboard. Now, to paste that text, press Ctrl+a ].


!!!To split the screen in two

* First create two screen sessions.
* Press Ctrl+a S which will split the screen in half.
* To move to the bottom half, press Ctrl+a, then the TAB key.
* Next press Ctrl+a, then " (shift+'). You will be presented with a list of available screen sessions
* To Go back before the split press Ctrl+a Q.

----
(:Googletxt:)
(:Googlemm:)
Edit - History - Print - Recent Changes - Search
Page last modified on August 16, 2014, at 02:39 AM