Screen has its own scroll buffer, as it is a terminal multiplexer and has to deal with several buffers.
Maybe there's a better way, but I'm used to scrolling using the "copy mode" (which you can use to copy text using screen itself, although that requires the paste command too):
Hit your screen prefix combination (C-a / control+A by default), then hit ...
The session is still attached on another terminal. The server hasn't detected the network outage on that connection: it only detects the outage when it tries to send a packet and gets an error back or no response after a timeout, but this hasn't happened yet. You're in a common situation where the client detected the outage because it tried to send some ...
Using the screen buffer as pointed out by njsg is a good solution. You can also disable the alternate text buffer in the xterm termcap info inside screen. When disabled you can use the scroll bars (and mouse wheel) to scroll up and down.
Add this to your ~/.screenrc.
# Enable mouse scrolling and scroll bar history scrolling
termcapinfo xterm* ti@:te@
The latest version of GNU screen allows you split the window vertically without any external patches. Here is one way to get it and use it:
Checkout/clone/download the source
Build it in an easy sequence of ./autogen.sh, ./configure, make and install. I didn't have any problems with dependencies on Mountain Lion.
To get a vertical split use:
C-a | // ...
Try detaching it first with screen -d. If that doesn't work, you can try, in increasing order of emphasis,
does not start screen, but detaches the elsewhere running screen session. It has the
same effect as typing "C-a d" from screen's controlling terminal. -D is the equivalent
to the power detach key. ...
As screen -r says, there is one screen, but it is attached. To resume it on your current terminal, you have to detach it from the other one first: screen -d -r 27863, see manpage -d.
Edit: use -d instead of -x.
Edit2: @alex78191: When using -x, screen attaches to the currently running session, resulting in a "multi-display mode": you see the session on ...
Seems like your root lacks some X11 magic cookie in the .Xauthority, which your standarduser has. Here is how to fix this.
SHORT VERSION (thanks to @bmaupin)
standarduser@localhost:~$ xauth list | grep unix`echo $DISPLAY | cut -c10-12` > /tmp/xauth
standarduser@localhost:~$ sudo su
root@localhost:~$ xauth add `cat /tmp/xauth`
Attention: check the ...
1. Tabs in screen
You're looking for this to add to your .screenrc file:
screen -t tab1
screen -t tab2
Here's a nice basic .screenrc to get you started with a status bar etc. NOTE: This is typically located in your home directory /home/<username>/.screenrc.
screen -t validate #rtorrent
screen -t compile #irssi
screen -t bash3
screen -t bash4
As mentioned in the comments, besides screen, another good terminal multiplexer is tmux. You can refer to the manual for a complete description and command reference. Some basic operations to get started are:
Split screen vertically: Ctrlb and Shift5
Split screen horizontally: Ctrlb and Shift"
Toggle between panes: Ctrlb and o
Close current pane: Ctrlb and ...
Start tmux as follows:
(cd /aaa/bbb; tmux)
Now, any new windows (or panes) you create will start in directory /aaa/bbb, regardless of the current directory of the current pane.
If you want to change the default directory once tmux is up and running, use attach-session with -c.
Quoting from the tmux man page for attach-session:
-c will set the session ...
There is a screen command to do this. From the manual:
Command: sessionname [name]
Rename the current session. Note that for screen -list the name shows up
with the process-id prepended. If the argument name is omitted, the name
of this session is displayed.
Caution: The $STY environment variable still reflects
Mouse scrolling and elevators will work if you enable them in your .screenrc.
Q: My xterm scrollbar does not work with screen.
A: The problem is that xterm will not allow scrolling if the alternate text buffer is selected. The standard definitions of the termcap initialize capabilities ti and te switch to and from the alternate text ...
If you haven't planned ahead and setup screen, etc. just do the following:
If your process is running in the background: goto #3, else: Ctrl-Z to suspend foreground process. This will report the job # of the suspended process, for example:
+ Stopped processName
Send processName to the background with bg %1 (using whatever the job # is ...
You can name a session when starting it with the -S name option. From within a running screen, you can change it by typing CTRL-a, :sessionname name. You can view running screen sessions with screen -ls, and connect to one by name with screen -xS name.
Within a single screen session, you can also name each window. Do this by typing CTRL-a, A then the name ...
To keep screen busy after the script completes, just keep something persistent running in a window. The simplest choice for that "something" is probably an interactive shell. Here's one way to do it (assuming bash as the choice of interactive shell):
screen -dmS session_name sh -c '/share/Sys/autorun/start_udp_listeners.sh; exec bash'
-dm: starts screen ...
after you reattach a ctrl-a F runs the "fit" command to resize the current window. if you reattach using the -A option it should resize all windows when you reattach. Are there others still attached to the screen session when you are attaching? For instance, are you having to use -x to reattach instead of -r? you can detach others when you reattach with "...
My favorite solution is using tmux, you could detach the session, and re-attach it in another terminal.
When you detached from previous session, you can safely close the terminal; later use tmux attach to get back to the session, even if you logged out.
tmux and screen have different models so there is no exact equivalent.
In screen terms, a split lets you display multiple windows at the same time. next (C-a n) rotates windows through the active part of the split; this lets you rotate “hidden” windows through the active region of the split.
In tmux terms, a split divides a window into one or more panes. ...
You cannot open /dev/pts/0 because it's owned by root, and after you su-ed into another user you're no longer able to open it via its path, but you're still able to use it via the opened handle to it, which was inherited from the parent process.
script /dev/null will create another pty, owned by the current user.
Anyways, that bug/limitation seems to have ...
All these answers addressed how to navigate within a screen session, but there is a built-in functionality in screen command to store everything in a file through the -L argument according to the manual which reads:
-L tells screen to turn on automatic output logging for the windows.
so you can do:
screen -L -S testscreen
and it will create a file ...
Here's my .screenrc that i use everywhere to see my screen numbers as tabs at the bottom of the window and an informational line above the tabs. The part you really need is under "look and feel".
# skip the startup message
# go to home dir
# Automatically detach on hangup.
# Change default scrollback value for new ...
At least on Debian and Ubuntu, the resize command, when applied to a full height region performs a horizontal resizing.
If it works for you, then first split vertically, next perform a resizing of the width, then split horizontally.