 
 sysline  -- statusline display utility for Linux
 
 INTRO
 
 Well, I saw the sysline utility mentioned in the O'Reilly book on BSD and
 found no such thing for Linux, so took a stab at porting it myself.  The
 result is before you.  The original sources are included here in ./BSD.
 
 I'm no C expert nor a Unix expert, so if this port aggravates you, feel
 free to improve on it; I guess that was partly my intention. Flames, praise
 comments, changes and additions are all welcome.
 
 I have not tested the rwho part of it, nor have I tested it under emacs -
 perhaps one of these days, as far as emacs goes.  Incidentally, I believe
 emacs has a built-in utility that sort of does what sysline does.  
 
 The reporting of login/logout of users may be a bit flaky if you're not
 using getty_ps v2.0.7d or later (which differ in utmp logging from v2.0.7c)
 or if you're using a mix of getty's. I got the impression everyone has his
 own way of logging things to utmp.

 INSTALL
 
 The program assumes presence of the /proc filesystem (which prob. everybody
 has that nowadays).  If you don't have it, you've got three choices at this
 time: don't use sysline, recompile the kernel to include /proc, or send me
 diffs to get process info from /dev/kmem.  I might do the latter myself,
 but don't hold your breath.
 
 Compile with TERMINFO in the Makefile defined to use terminfo, comment it
 out to use termcap.  If you compile for terminfo, you need to have the
 ncurses package installed (Zeyd M. Ben-Halim's ncurses-1.85 for instance). 
 You might try curses, but I had problems with it the nature of which I
 don't exactly recall when defining TERMINFO.
 
 The Makefile has some other compiling options you can to change to your
 liking.  Running `make' will compile sysline, `make install' will install
 sysline and sysline.1 in the paths as per the Makefile.

 Your /etc/termcap or /usr/lib/terminfo/<your_terminfo_file> -whichever
 you're using- might be lacking some capabilities that sysline
 needs/appreciates.  They were for /etc/termcap:

	:hs:\					has status line
	:es:\					esc in status line ok
	:ws#80:\				width of status line
	:i2=\E[1;24r\E[H\E[J:\			initialization string
	:ts=\E7\E[%i25;%dH\E[1K:\		move to status line
	:fs=\E[0K\E8:\				move from status line
	:ds=\E7\E[25;1H\E[2K\E8:\		disable status line
	:cs=\E[%i%d;%dr:\			change scroll region
	:so=\E[7m:\				begin standout mode
	:se=\E[m:\				exit standout mode
	:ce=\E[K:\				clear to end of line
	:bl=^G:\				audible signal (bell)

 and their /usr/lib/terminfo/<your_terminfo_file> equivalents:
 
	hs,					has status line
	eslok,					esc in status line ok
	wsl#80,					width of status line
	is2=\E[1;24r\E[H\E[J,			initialization string
	tsl=\E7\E[%i25;%p1%dH\E[1K,		move to status line
	fsl=\E[0K\E8,				move from status line
	dsl=\E7\E[25;1H\E[2K\E8,		disable status line
	csr=\E[%i%p1%d;%p2%dr,			change scroll region
	smso=\E[7m,				begin standout mode
	rmso=\E[m,				exit standout mode
	el=\E[K,				clear to end of line
	bel=^G,					audible signal (bell)	
 
 You may wish to change the 80 in ws/wsl, 24 in i2/is2 an 25 in ts/tsl
 according to your particular setup.  You should NOT have a ws/wsl string in
 the xterm termcap/terminfo entry, so that instead sysline can figure it out
 itself at startup, and change it correctly each time the window's size
 changes.  You might as well leave it out from your regular termcap/terminfo
 entry too.
 
 (Note: the bl/bel, is/is2 and ce/el strings are additions and the ts/tsl
 strings have changed from the first release of sysline; you may want to
 add/change them).
 

 HINTS
 
 The cs shell-script utility to set the scroll-region that came with the
 first release of sysline is no longer needed if you have the i2/is2
 init-string in your termcap and/or terminfo files as shown above; sysline
 will at startup execute i2/is2 under normal circumstances (i.e. no -e and
 -w flag).

 In any case, you still have to do 'stty rows 24' if you're using sysline
 without -e and -w flag, otherwise if you do 'man <whatever>' or start an
 editor like joe or emacs, it will mess up the status line during and
 afterwards.
 
 Use the -w flag for instance when running sysline in a 1-line xterm.

 If you run sysline as root (not as another user), it keeps running after
 you log out. This happens with getty_ps at least (2.0.7c and later), not
 with getty4.20 by Fred van Kempen, I don't know about other getty's, nor
 why they behave so differently and what sort of behaviour would be the
 correct one. Can any UNIX guru tell me what's going on here?  Anyway, to
 avoid this, you could start it like:
 
        	sysline -i >~/sysline.pid
 	       
 and then have:
 
		kill -HUP `cat ~/sysline.pid`
		rm -f ~/sysline.pid
	
 in your ~/bash_logout, or something more elaborate.
 

 Enjoy.
 
				- Bauke Jan Douma
				``in the software business since tuesday''
				bjdouma@hacktic.nl
