Chapter 11. Customized programs
90
11.3 Using pseudo ttys and modifying wtmp, utmp and lastlog
Some programs need to create pseudo ttys. This should be done using Unix98 ptys if the C
library supports it. The resulting program must not be installed setuid root, unless that is
required for other functionality.
The files
/var/run/utmp
,
/var/log/wtmp
and
/var/log/lastlog
must be installed
writable by group
utmp
. Programs which need to modify those files must be installed set 
gid
utmp
.
11.4 Editors and pagers
Some programs have the ability to launch an editor or pager program to edit or display a
text document. Since there are lots of different editors and pagers available in the Debian
distribution, the system administrator and each user should have the possibility to choose
their preferred editor and pager.
In addition, every program should choose a good default editor/pager if none is selected by
the user or system administrator.
Thus, every program that launches an editor or pager must use the EDITOR or PAGER envi 
ronment variable to determine the editor or pager the user wishes to use. If these variables
are not set, the programs
/usr/bin/editor
and
/usr/bin/pager
should be used, respec 
tively.
These two files are managed through the
dpkg
 alternatives  mechanism. Thus every package
providing an editor or pager must call the
update alternatives
script to register these
programs.
If it is very hard to adapt a program to make use of the EDITOR or PAGER variables,
that program may be configured to use
/usr/bin/sensible editor
and
/usr/bin
/sensible pager
as the editor or pager program respectively. These are two scripts pro 
vided in the Debian base system that check the EDITOR and PAGER variables and launch
the appropriate program, and fall back to
/usr/bin/editor
and
/usr/bin/pager
if the
variable is not set.
A program may also use the VISUAL environment variable to determine the user's choice of
editor. If it exists, it should take precedence over EDITOR. This is in fact what
/usr/bin
/sensible editor
does.
It is not required for a package to depend on
editor
and
pager
, nor is it required for a
package to provide such virtual packages.
2
2
The Debian base system already provides an editor and a pager program.






footer




 

 

 

 

 Home | About Us | Network | Services | Support | FAQ | Control Panel | Order Online | Sitemap | Contact

gay web hosting

 

Our partners: PHP: Hypertext Preprocessor Best Web Hosting Java Web Hosting Inexpensive Web Hosting  Jsp Web Hosting

Cheapest Web Hosting Jsp Hosting Cheap Hosting

Visionwebhosting.net Business web hosting division of Web Design Plus. All rights reserved