|
Softpanorama
(slightly skeptical)
Open Source Software Educational Society |
May the
source be with you,
but remember the KISS principle ;-)
|
GNU Screen -- an Orthodox Window Manager
A "must" tool for Unix Administrators
GNU
Screen is a simple but at the same time flexible and programmable windows manager.
It is often called terminal multiplexer, but the key functionality of screen
is in the area of windows management: creation, destruction and resizing
of windows. For example it can split the console screen horizontally
and display two windows at the same time. Screen is a Unix program
(Cygwin version exists and is quite usable).
For good Windows terminal emulator see Teraterm
In addition to the ability to run many shell processes in a single
terminal, screen provides classic windows management capabilities -- the
ability to split terminal into regions (horizontal stripes of varying length,
each containing its own session. What is also important is that like VNC
screen provides the ability
to detach the terminal emulator from the running programs and then reattach
the same or new terminal to them.
This feature is enabled by default.
|
An important feature of screen is that
like VNC it provides the ability to detach the terminal
emulator from the running programs and then reattach the same
or new terminal to them.
|
This means screen will keep shells
and programs running in all windows that you opened even if you accidentally
disconnected from the remote server or closed the terminal emulator. Like
VNC screen also permits to share a terminal (in read-only mode) with someone
else in real time. This permits to collaborate on a project by several remote
users located in different places. It also frees administrator
from waiting until a particular task ends. He/she can be connected to
any number of servers, start a task, detatch from the task, and the task
keeps running. Then reattach later, check the status and intervene of
needed. That means that you can start a job at the office and check for
it completion at home.
Screen has a certain architectural affinity to the orthodox file managers
(OFM ), especially
deco
as well as orthodox editors like vi and THE (the power of command line).
Like in vi in screen you have to hit
certain prefix to get to command line. The default prefix
is Ctrl-A. For example
Ctrl-A,C will open window.
This availability of command line operations and related scriptability
via screenrc file makes screen attractive
to system administrators who value blend of power and simplicity
provided by "orthodox" tools. Like
in all orthodox utilities there is an extensive set of commands
(mini-language) that
can used to modify the behavior of screen.
Ctrl-a is called
attention/command key and is similar to Esc in vi (you also
can change Ctrl-A to another sequence, if you wish). This sequence
presuppose that you are using Sun keyboard (with Ctrl instead of Caps
lop) or switched Ctrl and CapsLock keys (in Windows you can use Install RandyRants
SharpKeys -- registry hack that permits remapping CapsLock to Alt.
).
If the colon (":") is entered after it, then
screen switches to command mode
and you'll see a highlighted colon prompt at the bottom of the
screen.
After that, like in vi, you can enter commands that change the behavior of the screen
and modify its current configuration. For example you can open and close
windows, change size of windows, etc.
For example you open new window also by typing command
Ctrl-A: screen
which is equivalent to the shortcut Ctrl-A,C
that we discussed above.
So shortcut Ctrl-A,C and command
Ctrl-A: screen are synonyms.
This is just an association that is defined in
.screenrc file - screen's dotfile. File .screenrc is a
list of commands which are executed at startup. While by default screen
is using the name .screenrc you can start screen using arbitrary screen's dotfile using option -c, for example
screen -c ~myhome/.screenrc_`uname`
This example demonstrated that you can have multiple
.screenrc files and use the
one that suits current environment (for example Linux, AIX, Solaris,
etc) and the task in hand.
You can also execute predefined sequences
of screen commands stored in the files (screen scripts) using the
command source. One common application
is the execution of the set of command creating a particular combination
of windows and loading particular applications into each window. For example,
you can load Perl in debugging mode on one window, vi in another and Perl
POD browser in the third creating poor man IDE environment. For example
source .screenrc_perl
or
source ~myhome/perl.screenrc
That provides you with the flexibility to have several predefined sets
of windows working on a particular task, the capability that improves your
productivity dramatically as you can polish the arrangement and gradually
connect a set of useful shortcuts as you gain experience with the
environment (in the example above, working with Perl). System
administrators can (and should) have a custom part of
configuration encoded for particular hosts (that's the way I use screen
at work) :
source ${HOME}/${HOST}.screenrc
|
Due to availability
of command line interface and scriptability Screen can be considered
to be a member of "orthodox" family of utilities which include
orthodox file managers (mc, FAR, etc) and orthodox editors (vim,
Xedit, THE, etc). Command line can be activated with
Ctrl-A: after
that you can enter any command from the screen command set to
modify behavior of the screen or execute sets of commands (screen
script) from particular file using command source.
|
A typical and probably the simplest application of this capability is to launch a predefined set
of windows at screen startup., for example:
source $HOME/.screenrc # read in your normal screenrc
screen top # now start opening windows
screen -t irc epic # with the -t option it's possible to set the window title
screen -t mail 8 mutt # you can also specify the window number to launch in
screen -t messages 9 tail -f /var/log/messages
In X-windows world screen inspired several minimalist windows managers
which usually are bungled with linux mini-distributions. Classic example
of this genre is
ratpoison
(the name suggest that it is one of the few that not support mouse "out
of principle" ;-).
Screen is portable and is an almost a standard utility on all flavors
of Unix. It is often preinstalled by default in Linux distributions
(for example, Suse 10). And it is easily installed in Solaris, AIX and HP-UX.
For example Solaris 10 package can be found on
sunfreeware.com:
screen-4.0.2-sol10-intel-local.gz Screen provides an ANSI/vt100
terminal emulator, which can multiplex up to 10 pseudo-terminals - installs
in /usr/local. There are further configuration
steps in the /usr/local/doc/screen/INSTALL.
The etc and terminfo directories containing other relevant files are
in /usr/local/doc/screen. The screen
package may also require that you install the
ncurses package.
Using it, you can run any number of console-based applications -- interactive
command shells, curses-based applications, text editors, etc. -- within
a single terminal. Many administrators who use
screen open a dozen or even more sessions.
Screen can be used in two ways (you
can use both local and remote screen
instances simultaneously by changing control character in local to say
Ctrl-\ via
.screenrc, see below):
- On local workstation (in this case you multiplex between
terminal sessions opened in multiple screen windows). Many administrators
use it as a terminal on steroids and have a window for each remote server
they administer.
- Remotely (in this case you need first to connect to remote
machine using, say ssh or telnet, run screen and then multiplex windows
on this remote machine). In this case screen
provide the ability to have serial local terminal sessions via single
ssh or telnet connection (for example one root window and one non-root
window).
A nested master-slave invocation of screen is also possible, but it is
unclear how practical it is. See
Jason White
page and
my
screenrc and
my slave screenrc by Tim Chambers. Here is how he explained
this method in Slashdot post:
You run an "outer" screen session (the "slave" session) that in turn
runs an "inner" (or "master") session. You use the regular escape sequence
(Ctrl-A d) to detach from the master, and you map Ctrl-^ to be the control
key for the slave session. If you press Ctrl-^ while using screen this
way, you'll see one process in the slave session. It's running ssh-agent.
That's the key to using ssh with screen. The slave's only purpose is
to run ssh-agent. The master runs as a child of that. Consequently,
all shells in the master session are running under the ssh-agent. Just
run ssh-add from any master shell, and then all shells have your ssh
identity.
As we mentioned above, after starting screen
you need to open windows using the command Ctrl-a
c. Every window in screen
is identified by a unique number. The first window is usually numbered 0
(you can change this to one if you do not like counting from zero).
For each created windows screen starts
default shell. After that user for example can open remote session to a
particular server and rename it to simplify recognition after switching
to another (an optimal typical number of windows for one screen instance
is around a dozen). You can use multiple screen instances each with its
own set of servers to connect (DMZ servers, database servers, etc).
Minimum set of commands necessary to use screen productively includes
just five commands:
- Ctrl-a c to create a new
window
(Ctrl-a N --
lists the number of the active windows)
- Ctrl-a
<number> to switch between them
(Ctrl-a n, Ctrl-a p or Ctrl-a Ctrl-a will work too providing
previous and next windows, but are less convenient
and there are two of them instead of one)
- Ctrl-a " (windows)
Show a list of active windows. You can navigate this list
with the arrow keys (or vi-style, with j and k), and pick a window
to activate by pressing Enter when it's highlighted. As this is
one of the most often used commands you will be better off redefining
this command as Ctrl-a space (see
.screenrc examples on how to do that).
- Ctrl-a d.
detach from current
session. You can also detach just by closing the terminal emulator
that contains the session. Neither of these actually end your session.
All they do is unbind your session from the current terminal. All of
the programs you started running within screen are still running. To
reattach type screen -r
from the command prompt
- Ctrl-a Ctrl-\ (quit)
Kill all windows and terminate screen. You can close
individual window by exiting shell with command
exit.
There are also several more advanced features that can improve your productivity.
Among them I would like first of all mention regions.
Regions can dramatically improves your productivity in pure command line
environment. This feature turns screen in rudimentary windows manager able
to create "strips" non-overlapping horizontal zones each of which corresponds
to a separate shell window. To split the screen into two regions just press
C-a S. The current window will split into two separate areas
with the bottom area blank. To switch to the bottom part press
C-a [Tab]. If you need to create a new shell in the new window,
so press C-a c. If you want to see one of the existing sessions
press Ctrl-a " and select
the necessary session. You
can create more regions by pressing C-a S again: each time
the current "strip" will be split into two. Tabs display the active region
shell name in its title bar. You can also switch between tabs being in a
region, so e.g.: you have 4 tabs and 2 regions. Each region can display
one of these tabs. A nice trick is that upper region can react on the change
of the particular environment variable and display either file you are editing
or the listing of the current directory. This arrangement is close for the
OFM paradigm. You can change the size of each region by entering resize
[size], where size is the number of lines.
| The key additional feature of Screen that you need
to master after mastring basic commands is split command.
|
Here is slightly more elaborate set of commands, which we will call
Level 1 command set. It includes regions-related commands:
- Ctrl-a A
(title)
Allow the user to enter a name for the current
window (useful fo naming each window according to the purpose
(for example each can represent a different directory).
- Ctrl-a Ctrl-a
(other) will switch you to whichever window you were
using before the current one.
- Ctrl-a S (split,
capital s, please!). Screen can
horizontally by split into regions(panels), each
holding a different terminal. After you split the window you need to
move to the new region using Ctrl-tab
and create a session in it using
Ctrl-a-c.
- To enter that newly created region we have to tab into it:
Ctrl-a <Tab>
- (change focus switch from one panel to another in OFMs)
- To close a region type Ctrl-a X.
- A region with focus can be resized with Ctrl-a + or
Ctrl-a -
By default this changes the height by 3 lines.
- Typing Ctrl-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. Alternatively, you can specify the
height to an absolute number by going into Screens command mode.
Ctrl-a X removes the current region.
Note:
It is easy to confuse with the lowercase Ctrl-a
s which actually sends a command to freeze to the parent terminal.
To reverse this effect one doesn't have to go as far as closing
the terminal and re-attach again, but simply type Ctrl-a q.
- Ctrl-a <Tab> (focus) move the the next split window
- Ctrl-a X (remove) Close
current region
- Ctrl-a N, where N is a number from 0 to 9, will switch
to the corresponding window.
- Ctrl-a w lists windows in one like with the active marked
by asterism. This is a noninteractive list and you cannot navigate it.
Interactive list is by
default assigned to Ctrl-a "
- Ctrl-a d.
detach from current
session. You can also detach just by closing the terminal emulator
that contains the session. Neither of these actually end your session.
All they do is unbind your session from the current terminal. All of
the programs you started running within screen are still running. To
reattach type screen -r
- Screen remembers a configurable number of scrollback lines. You
can access the scrollback buffer by entering "copy mode", which is accomplished
by typing Ctrl-a [. You can mark text anywhere in the scrollback
buffer and paste it with Ctrl-a ]. Screen is also capable of
logging to files.
- Screen has features that allow you to monitor a window for silence,
useful, for example, for knowing when a compile has finished. To start
or stop monitoring the current window for 30 seconds of silence, type
Ctrl-a _; to start or stop monitoring a window for activity,
type Ctrl-a M.
- To close sessions you need to to close each of your screen windows.
Exit whatever programs or shells each is running, and they will go away.
When the last program running inside screen is exited, screen itself
will go away. You can forcefully quit screen with Ctrl-a Ctrl-\.
As you progress you "screen vocabulary" extends and in some point you can
switch from Level 1 command set to Level 2 command set which includes several
additional useful commands (and first of all
bindkey command):
-
Ctrl-a ' (select)
-
Prompt for a window name or number to switch to.
-
Ctrl-a " (windowlist -b)
-
Present a list of all windows for selection.
-
Ctrl-a 0 (select 0)
-
... ...
-
Ctrl-a 9 (select 9)
-
Ctrl-a - (select -)
-
Switch to window number 0 - 9, or to the blank window.
-
Ctrl-a tab (focus)
-
Switch the input focus to the next region.
-
Ctrl-a Ctrl-a (other)
-
Toggle to the window displayed previously.
Note that this binding defaults to the command character typed twice,
unless overridden. For instance, if you use the option "-e]x",
this command becomes "]]".
-
Ctrl-a a (meta)
-
Send the command character (Ctrl-a) to window. See escape
command.
-
Ctrl-a A
(title)
-
Allow the user to enter a name for the current
window (useful fo naming each window according to the purpose
(for example each can represent a different directory).
-
Ctrl-a b
-
Ctrl-a Ctrl-b (break)
-
Send a break to window.
-
Ctrl-a B (pow_break)
-
Reopen the terminal line and send a break.
-
Ctrl-a c
-
Ctrl-a Ctrl-c (screen)
-
Create a new window with a shell and switch to that window.
-
Ctrl-a C (clear)
-
Clear the screen.
-
Ctrl-a d
-
Ctrl-a Ctrl-d (detach)
-
Detach screen from this terminal.
-
Ctrl-a D D (pow_detach)
-
Detach and logout.
-
Ctrl-a f
-
Ctrl-a Ctrl-f (flow)
-
Toggle flow on, off or auto.
-
Ctrl-a F (fit)
-
Resize the window to the current region size.
-
Ctrl-a Ctrl-g (vbell)
-
Toggles screen's visual bell mode.
-
Ctrl-a h (hardcopy)
-
Write a hardcopy of the current window to the file "hardcopy.n".
-
Ctrl-a H (log)
-
Begins/ends logging of the current window to the file "screenlog.n".
-
Ctrl-a i
-
Ctrl-a Ctrl-i (info)
-
Show info about this window.
-
Ctrl-a k
-
Ctrl-a Ctrl-k (kill)
-
Destroy current window.
-
Ctrl-a l
-
Ctrl-a Ctrl-l (redisplay)
-
Fully refresh current window.
-
Ctrl-a L (login)
-
Toggle this windows login slot. Available only if screen
is configured to update the utmp database.
-
Ctrl-a m
-
Ctrl-a Ctrl-m (lastmsg)
-
Repeat the last message displayed in the message line.
-
Ctrl-a M (monitor)
-
Toggles monitoring of the current window.
-
Ctrl-a space
-
Ctrl-a n
-
Ctrl-a Ctrl-n (next)
-
Switch to the next window.
-
Ctrl-a N (number)
-
Show the number (and title) of the current window.
-
Ctrl-a backspace
-
Ctrl-a h
-
Ctrl-a p
-
Ctrl-a Ctrl-p (prev)
-
Switch to the previous window (opposite of Ctrl-a n).
-
Ctrl-a q
-
Ctrl-a Ctrl-q (xon)
-
Send a control-q to the current window.
-
Ctrl-a Q (only)
-
Delete all regions but the current one.
-
Ctrl-a r
-
Ctrl-a Ctrl-r (wrap)
-
Toggle the current window's line-wrap setting (turn the current
window's automatic margins on and off).
-
Ctrl-a s
-
Ctrl-a Ctrl-s (xoff)
-
Send a control-s to the current window.
-
Ctrl-a S (split)
-
Split the current region into two new ones.
-
Ctrl-a t
-
Ctrl-a Ctrl-t (time)
-
Show system information.
-
Ctrl-a v (version)
-
Display the version and compilation date.
-
Ctrl-a Ctrl-v (digraph)
-
Enter digraph.
-
Ctrl-a w
-
Ctrl-a Ctrl-w (windows)
-
Show a list of window.
-
Ctrl-a W (width)
-
Toggle 80/132 columns.
-
Ctrl-a x
-
Ctrl-a Ctrl-x (lockscreen)
-
Lock this terminal.
-
Ctrl-a X (remove)
-
Kill the current region.
-
Ctrl-a z
-
Ctrl-a Ctrl-z (suspend)
-
Suspend screen. Your system must support BSD-style job-control.
-
Ctrl-a Z (reset)
-
Reset the virtual terminal to its "power-on" values.
-
Ctrl-a . (dumptermcap)
-
Write out a ".termcap" file.
-
Ctrl-a ? (help)
-
Show key bindings.
-
Ctrl-a Ctrl-\ (quit)
-
Kill all windows and terminate
screen.
-
Ctrl-a :
(colon)
-
Enter command line mode.
-
Ctrl-a [
-
Ctrl-a Ctrl-[
-
Ctrl-a esc (copy)
-
Enter copy/scrollback mode.
-
Ctrl-a ] (paste .)
-
Write the contents of the paste buffer to the stdin queue of the
current window.
-
Ctrl-a {
-
Ctrl-a } (history)
-
Copy and paste a previous (command) line.
-
Ctrl-a > (writebuf)
-
Write paste buffer to a file.
-
Ctrl-a < (readbuf)
-
Reads the screen-exchange file into the paste buffer.
-
Ctrl-a = (removebuf)
-
Removes the file used by Ctrl-a < and Ctrl-a >.
-
Ctrl-a , (license)
-
Shows where screen comes from, where it went to and why you
can use it.
-
Ctrl-a _ (silence)
-
Start/stop monitoring the current window for inactivity.
-
Ctrl-a * (displays)
-
Show a listing of all currently attached displays.
Here are some examples of keyboard bindings:
bindkey -d # Show all of the default key bindings. The application mode entries are marked
with [A].
bindkey -k k1 select 1 # Makes the "F1" key switch to window one.
bindkey -k F1 command # Makes the F11 (not F1!) key an alternative screen escape (besides `Ctrl-a').
You can also easily change Ctrl-A (the default attention/command key
sequence) to another sequence. This can be done either via putting
command escape into
.screenrc or via a switch when
you start screen.
- -e xy specifies the
command character to be x and the character generating a literal command
character to y (when typed after the command character). The default
is «Ctrl-a» and `a', which can be specified as
"-e ^Aa". When creating
a screen session, this option sets the default command character. In
a multi-user session all users added will start off with this command
character. But when attaching to an already running session, this option
changes only the command character of the attaching user. This option
is equivalent to either the commands «defescape» or «escape» respectively.
If you invoked screen by using "screen
-e ^Ww" you can see that ^W
became attention/command key combination. So
^W-? gets the Help screen.
Ctrl-A and then ? no longer worked.
- Adding co the .screenrc
file using excape command is explained in the man page:
escape xy
Set the command character to x and the character generating
a literal command character (by triggering the "meta" command)
to y (similar to the -e option). Each argument is either a single
character, a two-character sequence of the form "^x" (meaning
"Ctrl-x"), a backslash followed by an octal number (specifying
the ASCII code of the character), or a backslash followed by
a second character, such as "\^" or "\\". The default is "^Aa".
For example if you add
escape ^\\
into the .screenrc you will see
that ^\ became attention
key sequence instead of default
^A.
It is also important to make screen more user friendly. In order
better see what open windows you have you can do it by adding the following
lines to .screenrc :
1 hardstatus alwayslastline
2 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}]'
In his paper
Screen Tips & Tricks Łukasz Olender suggests several
other variants:
But so as not to get lost in these windows, I suggest you create
tabs similar to those found in web browsers. You can do this by writing
to your configuration file ~/.screenrc one of the following
codes:
hardstatus alwayslastline
hardstatus string '%{= mK}%-Lw%{= KW}%50>%n%f* %t%{= mK}
%+Lw%< %{= kG}%-=%D %d %M %Y %c:%s%{-}'
or
hardstatus alwayslastline
hardstatus string '%{= kG}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{r}
(%{W}%n*%f%t%?(%u)%?%{r})%{w}%?%+Lw%?%?%= %{g}][%{B} %d/%m
%{W}%c %{g}]'
or
hardstatus alwayslastline
hardstatus string '%{gk}[ %{G}%H %{g}][%= %{wk}%?%-Lw%?%{=b kR}
(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?%+Lw%?%?%= %{g}][%{Y}%l%{g}]
%{=b C}[ %m/%d %c ]%{W}'
With the first code each tab will have a number, a name plus time
and date. The second one will give you tabs that will be created in
the center and the active tab will be highlighted in red and also have
the hostname displayed. The last code will additionally display the
processor usage. You can create your own codes but it is a rather specialized
task - I refer you to the system manuals for more information.
You can combine ideas from those into you own status line that suits
your need. But in any case it is important to improve visibility of windows
by using this capability of screen.
Dr. Nikolai Bezroukov
Notes:
- This is a Spartan WHYFF (We Help
You For Free) site written by people for whom English
is not a native language.
Some amount of grammar and spelling errors should be
expected.
- The site contain some broken links
as it develops like a living tree...
Please try to use Google, Open directory,
etc. to find a replacement link (see
HOWTO search the WEB for details). We would appreciate
if you can
mail us a correct link.
|
|
|
|
September 11, 2009 |
ServerWatch.com
Monitor a window for output: Hit Ctrl-A Shift-M
when in window 1, and then flip to window 2 (with Ctrl-A N), and
you'll be notified in window 2 when there's output in window 1. This
is useful if you're running a job that takes a long time; no need to
keep flipping between windows. You can also monitor for silence with
Ctrl-A _. This is useful if you're running a compile job or
something else that outputs a lot of stuff when it's running
successfully.
Selected comments
To enter copy mode in screen,
hit Ctrl+A, then
[. You can now use the arrow keys,
or vim-like keybindings, to move around the screen.
0 gets you to the start of a line, and $ to the end
of a line.
- When you've reached the point
where you want to start the copy, hit Enter.
- Move the cursor to the end point
of your selection (you'll see what you're
copying highlighted), and then hit Enter again.
- Now move the cursor to wherever
you want to paste the selection (you can move to
another screen within your session), and hit
Ctrl+A ]
to paste the selection.
You can also use Ctrl+A >
filename
to paste the selection to a filename and Ctrl+A <
filename to read a file into the selection
buffer so you can then paste it out again using
Ctrl+A ].
When in copy mode, you can also use
screen's scrollback feature (i.e., you can
scroll back upward past the top of the currently
displayed text) and the search function.
Use ? to search backward. This is
probably what you want initially, as you'll be
starting by default from the bottom of the
scrollback.
/ searches forward.
Bear in mind that the default
scrollback is only 100 lines. To increase this, add
a line to your ~/.screenrc:
defscrollback 1000
created by
Eric Van Dewoestine
Screenshot:
http://eclim.sourceforge.net/_images/screenshots/vim/gnu_screen_shell.png
Note: gvim is not supported. You must be running vim in a
console.
Currently tested on Linux and cygwin, but should work on any
unix based
platform where screen is supported (OSX, BSD, Solaris,
etc.). Note that
in my testing of cygwin, invocations of screen were
significantly slower
and less fluid than on Linux.
This plugin aims to simulate an embedded shell in vim by
allowing you to
easily convert your current vim session into one running in
gnu screen
with a split gnu screen window containing a shell, and to
quickly send
statements/code to whatever program is running in that shell
(bash,
python, irb, etc.).
Commands:
:ScreenShell [cmd] - Opens the split shell by doing the
following:
1. save a session file from your currently running vim
instance
(current tab only)
2. start gnu screen with vim running in it
3. load your saved session file
4. create a lower gnu screen split window and start a
shell
5. if a command was supplied to :ScreenShell, run it
Ex. :ScreenShell ipython
Note: If you are already in a gnu screen session, then
only steps
4 and 5 above will be run.
:ScreenSend - Send the visual selection or the entire
buffer contents to
the running gnu screen shell window.
:ScreenQuit - Save all currently modified vim buffers and
quit gnu
screen, returning you to your previous vim
instance
running outside of gnu screen
Note: :ScreenQuit is not available if you where already
in a gnu
screen session when you ran :ScreenShell.
Note: By default, if the gnu screen session was started
by
:ScreenShell, then exiting vim will quit the gnu
screen session
as well (configurable via
g:ScreenShellQuitOnVimExit).
An example workflow may be:
Open a python file to work on:
$ vim something.py
Decide you want to run all or pieces of the code in an
interactive
python shell:
:ScreenShell python
Send code from a vim buffer to the shell:
:ScreenSend
Quit the screen session and return to your original vim
session:
:ScreenQuit
or
:qa
Gotchas:
- While running vim in gnu screen, if you detach the
session instead of
quitting, then when returning to the non-screen vim, vim
will complain
about swap files already existing. So try to avoid
detaching.
- Not all vim plugins support saving state to or loading
from vim
session files, so when running :ScreenShell some buffers
may not load
correctly if they are backed by such a plugin.
install details
Download the script and put it in your plugin directory
(~/.vim/plugin).
screen is a very useful
program which in effect gives
you multiple console screens in
the same window. It's handy if
you're using a console rather
than an xterm, or if you're
connected to another machine, as
it means you can do multiple
things at once without having to
move to another console or open
another ssh connection. Even
more useful if you're working
remotely: If your connection
falls over while you're still in
a screen session, you can ssh
back to the machine and reattach
the screen (with
screen -r) and get straight
back to where you were, rather
than having to start over.
You can also
manually detach the screen, with
screen -d (detach
screen), or by hitting Ctrl-A
then D while in a screen
session. This leaves the screen
running in the background, and
it can be useful for running
background jobs. Or you can
leave a screen session connected
to another machine: Run
screen before you open the
ssh session, then instead of
logging out when you're done,
detach the screen, and then just
reattach it (screen -r)
when you need to connect to that
machine again. The downside of
this is that it does have
security implications!
A final screen
trick enables you to remotely
look over a user's shoulder if
you're trying to fix a problem.
Log on to the user's machine as
him, then type
Then, get him to type
and he'll join your screen
session. After this, whatever he
does will be replicated on your
screen (and vice versa).
('debug' is the identifier; any
other name would also be fine.)
This can save a lot of time when
trying to track down a problem
or to explain a solution!
tmux is a "terminal
multiplexer". It allows a number of terminals (or windows)
to be accessed and controlled from a single terminal. It is
intended to be a simple, modern, BSD-licensed alternative to
programs...
such as GNU screen
Customizing the configuration file
Screen keeps its configuration file in the same vein that many applications
do: in a dot file in your user’s home directory. This file is aptly
named .screenrc. In my experience, most people use ~/.screenrc to do
two things:
- Make a hardstatus line. This is basically a line at the bottom
of the screen that lists your current terminal and all opened ones.
It can also display the system clock and the hostname.
- Default screens on startup. It’s quite nice to have your IRC
connection, mail client, and default SSH connections auto-start
for you!
The lines below are numbered for reference. Your config file should
not have numbered lines.
1 hardstatus alwayslastline
2 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}]'
3
4 # Default screens
5 screen -t shell1 0
6 screen -t shell2 1
7 screen -t server 2 ssh me@myserver
On lines 1 and 2, you are setting the hardstatus. Line 1 makes the
hardstatus always show up as the last line. Line 2 is about what will
be shown in the hardstatus line. In this case you will see something
like so at the bottom:
Using Screen
From your ssh login prompt enter the following command
screen
or
screen -S 1
and select your profile option.

-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.
... ... ...
Customise
Screen-profiles
If you look in the bottom right
corner you’ll see there’s an “F9 Menu” you can press
F9 to reconfigure your screen profiles. Once it opens
you should see similar to the following screen here
you can see list of changes you can do

Sample screenshots for screen-profile
options






In case of broken links
please try to use Google search. If you find the page please notify
us about new location
Solaris Packages
-
screen-4.0.2-sol10-sparCtrl-local.gz Screen provides an ANSI/vt100
terminal emulator, which can multiplex up to 10 pseudo-terminals - installs
in /usr/local. There are further configuration steps in the /usr/local/doc/screen/INSTALL.
The etc and terminfo directories containing other relevant files are
in /usr/local/doc/screen. The screen package may also require that you
install the ncurses package.
Solaris Package Archive -- GNU screen 3.9.4
GNU screen 3.9.4 provides you with an ANSI/vt100 terminal emulator,
which can multiplex up to 10 pseudo-terminals. On startup, it executes
$SHELL in window 0. Then it reads $HOME/.screenrc to learn configuration,
keybindings, and possibly open more windows. GNU screen has the ability
to detach from your virtual screens and re-attach at a later time.
Email To
Send bug reports or queries to screen@uni-erlangen.de.
Upgrading Packages
When upgrading from an earlier GNU screen package, remember to
pkgrm GNUscreen before you
pkgadd the new version.
Solaris Issues
Click
here to read about 32 bit and 64 bit packages.
Source Code
You can ftp the source code from
ftp://ftp.gnu.org/pub/gnu/screen/screen-3.9.4.tar.gz
Special Issues
You may need to configure your terminal definitiosn to get the most
out of GNU screen. See the files in the
/usr/local/share/screen directory
for more information.
See the main packages
README for installation information.
Screen User's Manual - Table of Contents
[Stolen pretty much verbatim from the man page. <PMG>]
Each window in a screen session emulates
a VT100 terminal, with some extra functions
added. The VT100 emulator is hardcoded;
no other terminal types can be emulated.
Usually screen tries to emulate as much
of the VT100/ANSI standard as possible. But if your
terminal lacks certain capabilities, the
emulation may not be complete. In these cases screen
has to tell the applications that some of the features are missing. This
is no problem on machines using termcap, because
screen can use the $TERMCAP variable to
customize the standard screen termcap.
But if you do a rlogin on another machine or your machine supports only
terminfo this method fails. Because of this, screen
offers a way to deal with these cases. Here is how it works:
When screen tries to figure out a
terminal name for itself, it first looks
for an entry named “screen.<term>”, where
<term> is the contents of your $TERM variable. If no such entry exists,
screen tries “screen”
(or “screen-w” if the
terminal is wide (132 cols or more)). If
even this entry cannot be found, “vt100” is used as a substitute.
The idea is that if you have a terminal
which doesn’t support an important feature (e.g. delete char or clear to
EOS) you can build a new termcap/terminfo entry for
screen (named “screen.<dumbterm>”)
in which this capability has been disabled. If this entry is installed on
your machines you are able to do a rlogin and still keep the correct termcap/terminfo
entry. The terminal name is put in the $TERM
variable of all new windows. Screen also
sets the $TERMCAP variable reflecting the capabilities of the virtual
terminal emulated. Notice that, however,
on machines using the terminfo database this variable has no effect. Furthermore,
the variable $WINDOW is set to the window number of each window.
The actual set of capabilities supported by the virtual
terminal depends on the capabilities supported
by the physical terminal. If, for instance,
the physical terminal does not support underscore
mode, screen does not put the us
and ue capabilities into the window’s $TERMCAP variable, accordingly.
However, a minimum number of capabilities must be supported by a
terminal in order to run
screen; namely scrolling, clear
screen, and direct cursor addressing (in
addition, screen does not run on hardcopy
terminals or on
terminals that overstrike).
Also, you can customize the $TERMCAP value used by
screen by using the “termcap” .screenrc
command, or by defining the variable $SCREENCAP
prior to startup. When the is latter defined, its value will be copied verbatim
into each window’s $TERMCAP variable. This can either be the full
terminal definition, or a filename where
the terminal “screen”
(and/or “screen-w”) is defined.
Note that screen honors the “terminfo”
.screenrc command if the system uses the
terminfo database rather than termcap.
When the boolean ‘G0’ capability is present in the termcap entry for
the terminal on which
screen has been called, the
terminal emulation of
screen supports multiple character sets.
This allows an application to make use of, for instance, the VT100 graphics
character set or national character sets. The following control functions
from ISO
2022 are supported: lock shift G0 (SI), lock shift G1 (SO),
lock shift G2, lock shift G3, single shift G2, and single shift G3. When
a virtual terminal is created or reset,
the
ASCII character set is designated as G0 through G3. When the
G0 capability is present, screen
evaluates the capabilities S0, E0, and C0
if present. S0 is the sequence the
terminal uses to enable and start the graphics character set rather
than SI. E0 is the corresponding replacement for
SO. C0 gives a character by character translation
string that is used during semi-graphics mode. This string is built like
the acsc terminfo capability.
When the po and pf capabilities are present
in the terminal’s termcap entry, applications
running in a screen window can send output
to the printer port of the terminal. This
allows a user to have an application in one window sending output to a printer
connected to the terminal, while all other
windows are still active (the printer port is enabled and disabled again
for each chunk of output). As a side-effect, programs running in different
windows can send output to the printer simultaneously. Data sent to the
printer is not displayed in the window. The info command displays a line
starting ‘PRIN’ while the printer is active.
Screen maintains a hardstatus line for
every window. If a window gets selected, the display’s hardstatus will be
updated to match the window’s hardstatus line. If the display has no hardstatus
the line will be displayed as a standard screen
message. The hardstatus line can be changed with the ANSI Application Program
Command (APC): ESC_<string>ESC\. As a convenience
for xterm users the sequence ESC]0..2;<string>^G is
also accepted.
Some capabilities are only put into the $TERMCAP variable of the virtual
terminal if they can be efficiently implemented
by the physical terminal. For instance,
dl (delete line) is only put into the $TERMCAP variable if
the terminal supports either delete line
itself or scrolling regions. Note that this may provoke confusion, when
the session is reattached on a different terminal,
as the value of $TERMCAP cannot be modified by parent processes.
The “alternate screen” capability is
not enabled by default. Set the altscreen
.screenrc command to enable it.
The following is a list of control sequences recognized by
screen. “(V)” and “(A)” indicate VT100-specific
and ANSI- or
ISO-specific
functions, respectively.
ESC E |
|
Next Line |
ESC D |
|
Index |
ESC M |
|
Reverse Index |
ESC H |
|
Horizontal Tab Set |
ESC Z |
|
Send VT100 Identification String |
ESC 7 |
(V) |
Save Cursor and Attributes |
ESC 8 |
(V) |
Restore Cursor and Attributes |
ESC [s |
(A) |
Save Cursor and Attributes |
ESC [u |
(A) |
Restore Cursor and Attributes |
ESC c |
|
Reset to Initial State |
ESC g |
|
Visual Bell |
ESC Pn p
|
|
Cursor Visibility (97801) |
| |
Pn = |
6 |
|
Invisible |
| |
7 |
|
Visible |
ESC = |
(V) |
Application Keypad Mode |
ESC > |
(V) |
Numeric Keypad Mode |
ESC # 8 |
(V) |
Fill Screen with Es |
ESC \ |
(A) |
String Terminator |
ESC ^ |
(A) |
Privacy Message String (Message Line) |
ESC ! |
|
Global Message String (Message Line) |
ESC k |
|
A.k.a. Definition String |
ESC P |
(A) |
Device Control String. Outputs a string directly to the host
terminal without interpretation.
|
ESC _ |
(A) |
Application Program Command (Hardstatus) |
ESC ] 0 ; string
^G |
(A) |
Operating System Command (Hardstatus, xterm title hack) |
ESC ] 83 ; cmd
^G |
(A) |
Execute screen command. This
only works if multi-user support is compiled into
screen. The pseudo-user “:window:”
is used to check the access control list. Use aclchg :window:
-rwx #? to create a user with no rights and allow only the
needed commands. |
Control-N |
(A) |
Lock Shift G1(SO) |
Control-O |
(A) |
Lock Shift G0 (SI) |
ESC n |
(A) |
Lock Shift G2 |
ESC o |
(A) |
Lock Shift G3 |
ESC N |
(A) |
Single Shift G2 |
ESC O |
(A) |
Single Shift G3 |
ESC ( Pcs
|
(A) |
Designate character set as G0 |
ESC ) Pcs
|
(A) |
Designate character set as G1 |
ESC * Pcs
|
(A) |
Designate character set as G2 |
ESC + Pcs
|
(A) |
Designate character set as G3 |
ESC [ Pn ;
Pn H |
|
Direct Cursor Addressing |
ESC [ Pn ;
Pn f |
|
same as above |
ESC [ Pn J
|
|
Erase in Display |
| |
Pn = |
None or 0 |
|
From Cursor to End of Screen
|
| |
1 |
|
From Beginning of Screen to
Cursor |
| |
2 |
|
Entire Screen |
ESC [ Pn K
|
|
Erase in Line |
| |
Pn = |
None or 0 |
|
From Cursor to End of Line |
| |
1 |
|
From Beginning of Line to Cursor |
| |
2 |
|
Entire Line |
ESC [ Pn X
|
|
Erase character |
ESC [ Pn A
|
|
Cursor Up |
ESC [ Pn B
|
|
Cursor Down |
ESC [ Pn C
|
|
Cursor Right |
ESC [ Pn D
|
|
Cursor Left |
ESC [ Pn E
|
|
Cursor next line |
ESC [ Pn F
|
|
Cursor previous line |
ESC [ Pn G
|
|
Cursor horizontal position |
ESC [ Pn '
|
|
same as above |
ESC [ Pn d
|
|
Cursor vertical position |
ESC [ Ps ;...;
Ps m |
|
Select Graphic Rendition |
| |
Ps = |
None or 0 |
|
Default Rendition |
| |
1 |
|
Bold |
| |
2 |
(A) |
Faint |
| |
3 |
(A) |
Standout Mode (ANSI: Italicized) |
| |
4 |
|
Underlined |
| |
5 |
|
Blinking |
| |
7 |
|
Negative Image |
| |
22 |
(A) |
Normal Intensity |
| |
23 |
(A) |
Standout Mode off (ANSI: Italicized off) |
| |
24 |
(A) |
Not Underlined |
| |
25 |
(A) |
Not Blinking |
| |
27 |
(A) |
Positive Image |
| |
30 |
(A) |
Foreground Black |
| |
31 |
(A) |
Foreground Red |
| |
32 |
(A) |
Foreground Green |
| |
33 |
(A) |
Foreground Yellow |
| |
34 |
(A) |
Foreground Blue |
| |
35 |
(A) |
Foreground Magenta |
| |
36 |
(A) |
Foreground Cyan |
| |
37 |
(A) |
Foreground White |
| |
39 |
(A) |
Foreground Default |
| |
40 |
(A) |
Background Black |
| |
... |
|
|
| |
49 |
(A) |
Background Default |
ESC [ Pn g
|
|
Tab Clear |
| |
Pn = |
None or 0 |
|
Clear Tab at Current Position |
| |
3 |
|
Clear All Tabs |
ESC [ Pn ;
Pn r |
(V) |
Set Scrolling Region |
ESC [ Pn I
|
(A) |
Horizontal Tab |
ESC [ Pn Z
|
(A) |
Backward Tab |
ESC [ Pn L
|
(A) |
Insert Line |
ESC [ Pn M
|
(A) |
Delete Line |
ESC [ Pn @
|
(A) |
Insert Character |
ESC [ Pn P
|
(A) |
Delete Character |
ESC [ Pn S
|
|
Scroll Scrolling Region Up |
ESC [ Pn T
|
|
Scroll Scrolling Region Down |
ESC [ Pn ^
|
|
same as above |
ESC [ Ps ;...;
Ps h |
|
Set Mode |
ESC [ Ps ;...;
Ps l |
|
Reset Mode |
| |
Ps = |
4 |
(A) |
Insert Mode |
| |
20 |
(A) |
Automatic Linefeed Mode |
| |
34 |
|
Normal Cursor Visibility |
| |
?1 |
(V) |
Application Cursor Keys |
| |
?3 |
(V) |
Change Terminal Width to 132
columns |
| |
?5 |
(V) |
Reverse Video |
| |
?6 |
(V) |
Origin Mode |
| |
?7 |
(V) |
Wrap Mode |
| |
?9 |
|
X10 mouse tracking |
| |
?25 |
(V) |
Visible Cursor |
| |
?47 |
|
Alternate Screen (old xterm
code) |
| |
?1000 |
(V) |
VT200 mouse tracking |
| |
?1047 |
|
Alternate Screen (new xterm
code) |
| |
?1049 |
|
Alternate Screen (new xterm
code) |
ESC [ 5 i |
(A) |
Start relay to printer (ANSI Media Copy) |
ESC [ 4 i |
(A) |
Stop relay to printer (ANSI Media Copy) |
ESC [ 8 ; Ph ;
Pw t |
|
Resize the window to Ph lines and Pw columns
(SunView special) |
ESC [ c |
|
Send VT100 Identification String |
ESC [ x |
|
Send Terminal Parameter Report
|
ESC [ > c |
|
Send VT220 Secondary Device Attributes String |
ESC [ 6 n |
|
Send Cursor Position Report |
Screen has the following command-line options:
-
-a
-
include all capabilities (with some minor exceptions) in each
window's termcap, even if screen must redraw parts of the display
in order to implement a function.
-
-A
-
Adapt the sizes of all windows to the size of the current terminal.
By default, screen tries to restore its old window sizes when
attaching to resizable terminals (those with "WS" in its description,
e.g. suncmd or some xterm).
-
-c file
-
override the default configuration file from "$HOME/.screenrc" to
file.
-
-d|-D [pid.tty.host]
-
does not start screen, but detaches the elsewhere running
screen session. It has the same effect as typing "Ctrl-a d" from
screen's controlling terminal. -D is the equivalent to
the power detach key. If no session can be detached, this option is
ignored. In combination with the -r/-R option more powerful
effects can be achieved:
-
-d -r
-
Reattach a session and if necessary detach it first.
-
-d -R
-
Reattach a session and if necessary detach or even create it first.
-
-d -RR
-
Reattach a session and if necessary detach or create it. Use the first
session if more than one session is available.
-
-D -r
-
Reattach a session. If necessary detach and logout remotely first.
-
-D -R
-
Attach here and now. In detail this means: If a session is running,
then reattach. If necessary detach and logout remotely first. If it
was not running create it and notify the user. This is the author's
favorite.
-
-D -RR
-
Attach here and now. Whatever that means, just do it.
-
-
Note: It is always a good idea to check the status of your sessions
by means of "screen -list".
-
-e xy
-
specifies the command character to be x and the character generating
a literal command character to y (when typed after the command
character). The default is "Ctrl-a" and `a', which can be specified
as "-e^Aa". When creating a screen session, this option sets
the default command character. In a multiuser session all users added
will start off with this command character. But when attaching to an
already running session, this option changes only the command character
of the attaching user. This option is equivalent to either the commands
"defescape" or "escape" respectively.
-
-f, -fn, and -fa
-
turns flow-control on, off, or "automatic switching mode". This can
also be defined through the "defflow" .screenrc command.
-
-h num
-
Specifies the history scrollback buffer to be num lines high.
-
-i
-
will cause the interrupt key (usually Ctrl-c) to interrupt the display
immediately when flow-control is on. See the "defflow" .screenrc command
for details. The use of this option is discouraged.
-
-l and -ln
-
turns login mode on or off (for /etc/utmp updating). This can also be
defined through the "deflogin" .screenrc command.
-
-ls and -list
-
does not start screen, but prints a list of pid.tty.host
strings identifying your screen sessions. Sessions marked `detached'
can be resumed with "screen -r". Those marked `attached' are running
and have a controlling terminal. If the session runs in multiuser mode,
it is marked `multi'. Sessions marked as `unreachable' either live on
a different host or are `dead'. An unreachable session is considered
dead, when its name matches either the name of the local host, or the
specified parameter, if any. See the -r flag for a description
how to construct matches. Sessions marked as `dead' should be thoroughly
checked and removed. Ask your system administrator if you are not sure.
Remove sessions with the -wipe option.
-
-L
-
tells screen your auto-margin terminal has a writable last-position
on the screen. This can also be set in your .screenrc by specifying
`LP' in a "termcap" command.
-
-m
-
causes screen to ignore the $STY environment variable. With "screen
-m" creation of a new session is enforced, regardless whether screen
is called from within another screen session or not. This flag
has a special meaning in connection with the `-d' option:
-
-d -m
-
Start screen in "detached" mode. This creates a new session but
doesn't attach to it. This is useful for system startup scripts.
-
-D -m
-
This also starts screen in "detached" mode, but doesn't fork a new process.
The command exits if the session terminates.
-
-O
-
selects a more optimal output mode for your terminal rather than true
VT100 emulation (only affects auto-margin terminals without `LP'). This
can also be set in your .screenrc by specifying `OP' in a "termcap"
command.
-
-q
-
Suppress printing of error messages. In combination with "-ls" the exit
value is as follows: 9 indicates a directory without sessions. 10 indicates
a directory with running but not attachable sessions. 11 (or more) indicates
1 (or more) usable sessions. In combination with "-r" the exit value
is as follows: 10 indicates that there is no session to resume. 12 (or
more) indicates that there are 2 (or more) sessions to resume and you
should specify which one to choose. In all other cases "-q" has no effect.
-
-r [pid.tty.host]
-
-r sessionowner/[pid.tty.host]
-
resumes a detached screen session. No other options (except combinations
with -d/-D) may be specified, though an optional prefix
of [pid.]tty.host may be needed to distinguish between
multiple detached screen sessions. The second form is used to
connect to another user's screen session which runs in multiuser mode.
This indicates that screen should look for sessions in another user's
directory. This requires setuid-root.
-
-R
-
attempts to resume the first detached screen session it finds.
If successful, all other command-line options are ignored. If no detached
session exists, starts a new session using the specified options, just
as if -R had not been specified. The option is set by default
if screen is run as a login-shell (actually screen uses "-xRR"
in that case). For combinations with the -d/-D option
see there.
-
-s
-
sets the default shell to the program specified, instead of the value
in the environment variable $SHELL (or "/bin/sh" if not defined). This
can also be defined through the "shell" .screenrc command.
-
-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.
-
-t name
-
sets the title (a.k.a.) for the default shell or specified program.
See also the "shelltitle" .screenrc command.
-
-U
-
Run screen in UTF-8 mode. This option tells screen that your terminal
sends and understands UTF-8 encoded characters. It also sets the default
encoding for new windows to `utf8'.
-
-v
-
Print version number.
-
-wipe [match]
-
does the same as "screen -ls", but removes destroyed sessions instead
of marking them as `dead'. An unreachable session is considered dead,
when its name matches either the name of the local host, or the explicitly
given parameter, if any. See the -r flag for a description how
to construct matches.
-
-x
-
Attach to a not detached screen session. (Multi display mode).
-
-X
-
Send the specified command to a running screen session. You can use
the -d or -r option to tell screen to look only for attached
or detached screen sessions. Note that this command doesn't work if
the session is password protected.
dtach is a tiny program that emulates the detach feature of screen,
allowing you to run a program in an environment that is protected from
the controlling terminal and attach to it later. dtach does not keep
track of the contents of the screen, and thus works best with programs
that know how to redraw themselves.
dtach does not, however, have the other features of screen, such
as its support of multiple terminals or its terminal emulation support.
This makes dtach extremely tiny compared to screen, making it more easily
audited for bugs and security holes, and also allows it to fit in environments
where space is limited, such as on rescue disks.
dtach has many possible uses, even though it is tiny. With dtach,
you can:
- Attach multiple times to the same program. Access to the dtach
session is controlled through the Unix filesystem permissions; thus,
you can trivially allow other people to watch your session.
- Run a program in an environment that is protected from the controlling
terminal. This means that, for instance, the program running under
dtach would not be affected by the terminal being disconnected for
some reason.
- Run programs such as emacs, which tend to want full control
over the terminal. dtach mostly acts as a relay, and does not mangle
the text between the application and your terminal.
- Suspend dtach without suspending the running program. dtach
can handle the suspend key itself instead of passing it to the running
program, which may be useful for certain programs such as ircII.
The latest version of dtach is version 0.7, which you can fetch
here. Other download formats may be available at the sourceforge
download area for dtach.
The changes in version 0.7 are:
- The redraw method can now be explicitly specified on the command
line (either no redraw at all, the old ^L character method, and
the new WINCH signal method), since many programs only handle one
or the other properly.
- Changed the default redraw method back to the old ^L character
method.
- Changed the attach code to check the return value of select
more carefully.
- Changed the SIGWINCH handler to reinstall itself, to handle
systems that always reset the handler.
- Added more proper process group handling.
The changes in version 0.6 are:
- Redraws are now handled by sending the child process a WINCH
signal instead of by sending a ^L character. This should help prevent
line-oriented programs (such as bash) from clearing the screen excessively.
- Flow control is now disabled when setting raw mode on the terminal.
- Switched to using select instead of poll.
- Changed some exits to exit succesfully instead of non-sucessfully.
- Updated my email address.
- Updated to Autoconf 2.59, renaming some files in the process.
The changes in version 0.5 are:
- Fix fd leakage.
- Prevent atexit from being called twice on dtach -A.
The changes in version 0.4 are:
- Slightly improved README and dtach.1
- Portability updates thanks to sourceforge's compile farm. dtach
should now work on: FreeBSD, Debian/alpha, Debian/sparc, Debian/PPC,
and Solaris.
The changes in version 0.3 are:
- Fixed a typo in dtach.1
- Changed the attach code so that it tells the master when a suspend
occurs.
- Decreased the client <-> master packet size.
- Changed the master to send a stream of text to attaching clients
instead of sending a huge packet all the time.
- Use getrlimit and dynamically allocate the data structures,
if possible.
- Added some more autoconf checks.
- Initial sourceforge release.
You can also obtain information on how to access the CVS tree
here, and access the sourceforge project page
here.
You can send any comments or questions about dtach to the
author.
Comments and suggestions are welcome.
Copyright © 1996-2009 by Dr. Nikolai Bezroukov.
www.softpanorama.org was
created as a service to the UN Sustainable Development Networking Programme (SDNP)
in the author free time.
Submit
comments This document is an industrial compilation designed and created
exclusively for educational use and is placed under the copyright of the
Open Content License(OPL).
Site uses AdSense so you need to be aware of Google privacy policy. Original materials copyright belong to respective owners. Quotes are made
for educational purposes only in compliance with the fair use doctrine.
Disclaimer:
- The statements, views and opinions presented on
this web page are those of the author and are not endorsed by, nor do they necessarily
reflect, the opinions of the author present and former employers, SDNP or any other
organization the author may be associated with.
- We do not warrant the correctness of the information provided or its
fitness for any purpose
- In no way this site is associated with or endorse cybersquatters
using
the term "softpanorama" with other main or country domains (e.g. softpanorama.com) with
bad faith intent to profit from the goodwill belonging to
someone else.
Last modified:
September 15, 2009
the one i use ;)
@bertocasa (amelgar) ~ :: cat .screenrc
#kill startup message
startup_message off
defscrollback 1024
hardstatus on
hardstatus alwayslastline
#hardstatus string "%{.bW}%-w%{.rW}%n %t%{-}% w %=%{..G} %H %{..Y} %m/%d %C%a "
hardstatus string '%{= kg}[ %{G}%H %{g}][%= %{= kw}%?%-Lw%?%{=b kR}(%{W}%n*%f %t%?(%u)%?%{=b kR})%{= kw}%?% Lw%?%?%= %{g}]%{=b C}[ %d %M %c ]%{W}'
screen -t rOOt 0 su -
screen -t ncmpc 1 bash
screen -t terminal 2 bash
screen -t MComander 3 mc
screen -t vimTerm 4 bash
screen -t terminal 5 bash
screen -t dropbox 6 bash