Entries Tagged as 'Werkzeuge'

GNU screen: select, copy & paste

In this little snip, we learn how to select, copy and paste text betwen screen’s and even files.
clipped from gentoo-wiki.com

Scrolling back in Screen

To enter the scrollback mode press C-a <Esc>. Now, you can scroll up and down in the current terminal using the <PageUp>/<PageDown> keys or the C-u and C-d commands.

Selecting text, copying, pasting

Copying works by selecting a start position and an end position for text to be copied. These are marked with the cursor’s current position by pressing the <Space> key. Between two strokes the buffer can be navigated with the keys <h>, <j>, <k>, <l>, <arrow keys>. And this default behavior can be changed in .screenrc. The content of the buffer can then be pasted back into any other Screen window of the current session by typing C-a ]

Advanced copying

set Screen into copy mode with C-a <Esc>, select the text between two <Space> keystrokes and then set a buffer file in the current directory with C-a :bufferfile notes.txt. This file is written into by C-a >.

GNU screen: Splitting the screen into regions

This time it’s about the how to split the screen and change the size of those regions.
clipped from gentoo-wiki.com
Screen can horizontally split into regions, each holding a different terminal.
To open a new region one types C-a S (capital s, please!).
To enter that newly created region we have to tab into it: C-a <Tab> Still nothing can be seen, but we can now cycle through our open terminals with C-a n or C-a p.
To close a region type C-a X.
A region with focus can be resized with C-a + or C-a - By default this changes the height by 3 lines.
Alternatively, you can specify the height to an absolute number by going into Screens command mode.
Typing C-a : puts Screen into command mode and the status line at the bottom changes.
Screen now accepts direct commands and resize 24 makes the currently focused region exactly 24 lines high.

GNU screen: Basic usage

This article explains some of the basic usage principles of the screen terminal multiplexer.
clipped from gentoo-wiki.com
screen is a moderately complex program that emulates a terminal. The feature it is best known for is the ability to disconnect and reconnect to screen sessions, which very gracefully survive logoffs.
GNU Screen enables you to run many shell processes in a single terminal.
Even better, you can split your terminal into different regions. Only Ratpoison gives you more bang for your bash!
The first sign of Screen successfully running can be discovered by typing C-a " which shows the list of terminals.
At the moment there is only one.
The Esc key exits that window.
Alternatively, use C-a w to list them briefly in the window’s title bar.
A new terminal is created by typing C-a c.
With C-a n for next or C-a p for previous Screen you can cycle through those windows.
To detach Screen one can either use the brute-force method
or the running instance of Screen can be properly detached with C-a d first.
To access this one instance we re-attach with screen -R. Voilà, here we go again!