Install and configure GNU’s screen on AIX

Sometimes we have only one terminal to an AIX system and we need to open multiples logins to make parallel tasks. This is where GNU screen (http://www.gnu.org/software/screen/) comes to play.  I use ‘GNU screen’ also tu run a long tasks inside AIX without the fear to lost my SSH/Telnet connection and stop the update process.

So, let’s install GNU’s screen on AIX. First we need to download AIX’s rpm  package from AIX Open Source Packages (Perzl.org)
URL:
http://www.perzl.org/aix/index.php?n=Main.Screen

last vgersion of screen is 4.0.3.1, see below:
http://www.oss4aix.org/download/RPMS/screen/screen-4.0.3-1.aix5.1.ppc.rpm

But, there are some dependencies like ‘GNU Info’ and ‘GNU Gettext’.
http://www.perzl.org/aix/index.php?n=Main.Info
http://www.perzl.org/aix/index.php?n=Main.Gettext

There is another dependency, GNU BASH, but we’re not going to install it because we use KSH shell.

Once all rpm’s  files are on AIX box:

1
2
3
4
5
6
# ls -ltr
total 7600
-rw-r--r--    1 root     system       824861 Oct 30 12:57 gettext-devel-0.17-1.aix5.1.ppc.rpm
-rw-r--r--    1 root     system      2223925 Oct 30 12:57 gettext-0.17-1.aix5.1.ppc.rpm
-rw-r--r--    1 root     system       560723 Oct 30 12:57 screen-4.0.3-1.aix5.1.ppc.rpm
-rw-r--r--    1 root     system       276171 Oct 30 12:59 info-5.2-1.aix5.1.ppc.rpm

let’s install all rpm’s files:

1
2
3
4
5
rpm -ivh *.rpm
gettext                     ##################################################
gettext-devel               ##################################################
info                        ##################################################
screen                      ##################################################

To verify the instllation:

1
2
3
4
# /tmp/rpms -> rpm -qa|grep screen
screen-4.0.3-1
# /tmp/rpms -> which screen
/usr/bin/screen

Now it’s time to play with GNU screen.

Type ‘screen’ with no options on the shell:

1
# screen

then Ctrl+A+? and you will all screen parameters:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
                                              Screen key bindings, page 1 of 1.
 
                                              Command key:  ^A   Literal ^A:  a
 
 break       ^B b        hardcopy    h           monitor     M           remove      X           version     v
 clear       C           help        ?           next        ^@ ^N sp n  removebuf   =           width       W
 colon       :           history     { }         number      N           reset       Z           windows     ^W w
 copy        ^[ [        info        i           only        Q           screen      ^C c        wrap        ^R r
 detach      ^D d        kill        K k         other       ^A          select      '           writebuf    >
 digraph     ^V          lastmsg     ^M m        pow_break   B           silence     _           xoff        ^S s
 displays    *           license     ,           pow_detach  D           split       S           xon         ^Q q
 dumptermcap .           lockscreen  ^X x        prev        ^H ^P p ^?  suspend     ^Z z
 fit         F           log         H           quit        \           time        ^T t
 flow        ^F f        login       L           readbuf     <           title       A
 focus       ^I          meta        a           redisplay   ^L l        vbell       ^G
 
^]  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 .

Let’s see common examples with GNU screen:

  • Open a new screen and execute ‘topas’ command:
1
2
# screen
# topas

Press Ctrol+A+d to detach the screen session and getback the shell prompt.

1
[detached]
  • Reattach the above screen:
1
# screen -r

And you will see topas running. Ctrol+A+d again to detach:

1
[detached]
  •  List screens available
1
2
3
4
5
# screen -ls
There are screens on:
        10158258.pts-0.aix    (Detached)
        7798960.pts-0.aix     (Detached)
2 Sockets in /tmp/screens/S-root.
  •  Reopen a screen session. For exampe, 7798960
1
# screen -r 7798960
  •  Switching between scrren sessions. Yes, you can!!.
    Just press Ctrol+A+n
  • Lock a screen session. Just run Ctrol+A+x inside the session:
1
2
3
# screen -r 7798960
Screen used by  <root>.
Password:
  •  Leaving screen session.
    Just type:
1
2
# exit
[screen is terminating]

Finnaly you can find tons of information on internet regarding GNU’s screen.

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
Replacing a failed disk (rootvg)
Viewed 3557 times since Mon, May 21, 2018
Part 3, Tuning swap space settings AIX7
Viewed 9604 times since Wed, Jun 19, 2019
Mirroring the rootvg Volume Group for AIX 4.1/4.2
Viewed 3598 times since Mon, May 21, 2018
AIX lsdevinfo
Viewed 10883 times since Mon, Jun 3, 2019
The new VIOS performance advisor tool part util
Viewed 3906 times since Tue, Jun 4, 2019
How to enable Large Pages for a specific user on AIX?
Viewed 3322 times since Thu, Nov 29, 2018
AIX Undocumented AIX command lquerypv
Viewed 4170 times since Tue, Jul 17, 2018
Using Kerberos security with Server for NFS
Viewed 10490 times since Wed, Jun 27, 2018
AIX, Red Hat, Security, System Admin↑ System-wide separated shell history files for each user and session
Viewed 2806 times since Fri, Apr 19, 2019
AIX routing - How Do I Compare ODM with the Current Routing Table?
Viewed 3245 times since Mon, Jul 29, 2019