177 lines
6.2 KiB
HTML
177 lines
6.2 KiB
HTML
<!--startcut ==============================================-->
|
|
<!-- *** BEGIN HTML header *** -->
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
|
|
<HTML><HEAD>
|
|
<title>Using Screen:w LG #96</title>
|
|
</HEAD>
|
|
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
|
|
ALINK="#FF0000">
|
|
<!-- *** END HTML header *** -->
|
|
|
|
<!-- *** BEGIN navbar *** -->
|
|
<A HREF="dorgan4.html"><< Prev</A> | <A HREF="index.html">TOC</A> | <A HREF="../index.html">Front Page</A> | <A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue96/dorgan5.html">Talkback</A> | <A HREF="../faq/index.html">FAQ</A> | <A HREF="bhargava.html">Next >></A>
|
|
<!-- *** END navbar *** -->
|
|
|
|
<!--endcut ============================================================-->
|
|
|
|
<TABLE BORDER><TR><TD WIDTH="200">
|
|
<A HREF="http://www.linuxgazette.com/">
|
|
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
|
|
WIDTH="200" HEIGHT="41" border="0"></A>
|
|
<BR CLEAR="all">
|
|
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
|
|
</TD><TD WIDTH="380">
|
|
|
|
|
|
<CENTER>
|
|
<BIG><BIG><STRONG><FONT COLOR="maroon">Using Screen</FONT></STRONG></BIG></BIG>
|
|
<BR>
|
|
<STRONG>By <A HREF="../authors/dorgan.html">David Dorgan</A></STRONG>
|
|
</CENTER>
|
|
|
|
</TD></TR>
|
|
</TABLE>
|
|
<P>
|
|
|
|
<!-- END header -->
|
|
|
|
|
|
|
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<title>Using Screen</title>
|
|
<meta name="GENERATOR" content="amaya 7.2, see http://www.w3.org/Amaya/" />
|
|
<style type="text/css">
|
|
<!--
|
|
.header {
|
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
font-size: 24px;
|
|
font-weight: bold;
|
|
color: #999999;
|
|
}
|
|
.author {
|
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
font-size: 10px;
|
|
font-style: italic;
|
|
color: #666666;
|
|
margin-left: 25px;
|
|
}
|
|
.disclaimer {
|
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
font-size: 10px;
|
|
color: #CCCCCC;
|
|
margin-left: 50px;
|
|
}
|
|
.cvsinfo {
|
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
font-size: 10px;
|
|
color: #CCCCCC;
|
|
}
|
|
.body {
|
|
font-family: Verdana, Arial, Helvetica, sans-serif;
|
|
font-size: 10px;
|
|
margin-left: 50px;
|
|
}
|
|
-->
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<p class="header">Useful features of screen</p>
|
|
|
|
<p class="author">David Dorgan.</p>
|
|
|
|
<p class="disclaimer">This is a very basic introduction to some of useful
|
|
features of screen.</p>
|
|
|
|
<p></p>
|
|
|
|
<p class="body">I learned to use screen after I saw what it could do, it has
|
|
some very good uses, basically screen is a screen manager with terminal
|
|
emulation. The best way to see how it works and how it could be useful for
|
|
you, is to use it. I'll give you one reason why I use it, I use irc allot, I
|
|
don't mind idling and letting my client stay on, or sometimes I used to leave
|
|
it on and then have to kill the connection if nickserv was available on that
|
|
server, but with screen I login from a server I use, I just login and
|
|
'attach' the session, and I can detach it and reattach from any machine I
|
|
like, because the virtual screen is always there.</p>
|
|
|
|
<p></p>
|
|
|
|
<p class="body">For a really basic example, install screen, then run screen
|
|
by typing <em>screen,</em>once inside this type <em>vim myfile.c,</em>now
|
|
type <code>Ctrl A</code>, and then hit the <code>d</code>key. Now you should
|
|
be back at your normal shell, now type screen -list , and you will see there
|
|
is one screen session belong to you, now type <em>screen -x</em>to reattach
|
|
this session. Now you will see the same session, now if you have an account
|
|
on a remote host, maybe login and do the same with IRC, then detach and
|
|
reattach, and you will see all the new messages too, and you can do this with
|
|
any terminate application from anywhere, useful isn't it?</p>
|
|
|
|
<p></p>
|
|
|
|
<p class="body">Now just so that you know, you can have a few sessions
|
|
running and one easy way of re-attaching would be do to a <em>screen
|
|
-list</em> and then s<em>creen -R $screen_number .</em>There are betters ways
|
|
to handle this, but for more information on that in the screen man page.</p>
|
|
|
|
<p></p>
|
|
|
|
<p class="body">Now say you want more than one shell per screen session,
|
|
start screen, then type <em>echo 'this is number one' ,</em>then type
|
|
<code>Ctrl-A</code>and <code>n,</code> now you should see another new window,
|
|
now hit <code>ctrl-a</code> and<code>0,</code>you should now be back to your
|
|
first terminal, you can create a number of these, to destroy one just type
|
|
<code>ctrl-a</code> and <code>k, ctrl-a and p will bring you to the pervious
|
|
window and ctrl-a n will bring you to the next. For help type ctrl-a ?
|
|
.</code></p>
|
|
|
|
<p class="body">There are many other things you can do, just read the man
|
|
page.</p>
|
|
|
|
<p class="cvsinfo">$Id: using-screen.html,v 1.3 2003/08/30 15:00:35 davidd
|
|
Exp $</p>
|
|
</body>
|
|
</html>
|
|
|
|
|
|
|
|
|
|
<!-- *** BEGIN author bio *** -->
|
|
<P>
|
|
<P>
|
|
<!-- *** BEGIN bio *** -->
|
|
<P>
|
|
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
|
|
<em>
|
|
David has been a very productive writer and plans to contribute more of his
|
|
work in the future.
|
|
</em>
|
|
<br CLEAR="all">
|
|
<!-- *** END bio *** -->
|
|
|
|
<!-- *** END author bio *** -->
|
|
|
|
|
|
<!-- *** BEGIN copyright *** -->
|
|
<hr>
|
|
<CENTER><SMALL><STRONG>
|
|
Copyright © 2003, David Dorgan.
|
|
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
|
|
Published in Issue 96 of <i>Linux Gazette</i>, November 2003
|
|
</STRONG></SMALL></CENTER>
|
|
<!-- *** END copyright *** -->
|
|
<HR>
|
|
|
|
<!--startcut ==========================================================-->
|
|
<CENTER>
|
|
<!-- *** BEGIN navbar *** -->
|
|
<A HREF="dorgan4.html"><< Prev</A> | <A HREF="index.html">TOC</A> | <A HREF="../index.html">Front Page</A> | <A HREF="http://www.linuxgazette.com/cgi-bin/talkback/all.py?site=LG&article=http://www.linuxgazette.com/issue96/dorgan5.html">Talkback</A> | <A HREF="../faq/index.html">FAQ</A> | <A HREF="bhargava.html">Next >></A>
|
|
<!-- *** END navbar *** -->
|
|
</CENTER>
|
|
</BODY></HTML>
|
|
<!--endcut ============================================================-->
|