[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: all xterms

> On Mon, Nov 01, 1999 at 11:06:36AM -0500, Brian Mays wrote:

> > There is no such convention, however, for X terminals, so we do not
> > need to implement one for compatibility's sake.  And since there are
> > better ways to handle multiple xterm-like programs (IMHO), we should
> > use these techniques instead of applying this old, unnecessary
> > convention.

Tomasz Wegrzanowski <maniek@beer.com> wrote:

> Tell us what are better (this means: easier for user and needing less
> coding in existing apps) ways to have different xterm for each user.

Okay.  Assume that every program that needs to run an X terminal
emulator is modified to run x-terminal-editor (preferably, not
'/usr/bin/X11/x-terminal-editor').  This is as reasonable an assumption
as requiring every program to run '/usr/bin/sensible-xterm'.

As far as I can see, it is just as easy for the system administrator to
provide a link

    /usr/local/bin/x-terminal-editor -> <preferred xterm-like program>


    /etc/alternatives/x-terminal-editor -> <preferred xterm-like program>

(either will work, although the latter will work with programs that
have a hard-coded path to x-terminal-editor) as to add a line to
/etc/environment (or some similar file) to specify this program through
an environment variable for every user.

If a user is not happy with the default, then he always has the
opportunity to provide his own such link in his own PATH or write a
script, or whatever.  The example that has been cited on this list (by
Branden Robinson) is

ln -s /usr/bin/X11/<xterm replacement> $HOME/bin/x-terminal-emulator

If this user is going to customize his account to any extent whatsoever,
he should add such a directory of his own scripts, programs, and links
to his path anyway.  This type of solution should be encouraged.

Furthermore, this solution is not limited to Debian systems alone.  It
is a trick that, in general, works on any Unix-like system.  (Don't
forget that EDITOR, VISUAL, and PAGER are supported to remain compatible
with common practice among traditional Unix programs.)  I think that it
is better than providing an environment variable that is used only on
Debian accounts, and I think it is FAR better than providing an obscure
Debian-specific ~/.alternatives/ directory (which fortunately has not
been advocated very heavily by you or anyone else on this list).

It is not like we are tying the hands of the system administrator.
Anyone who wants to use an XTERM environment variable is free to put a
script such as yours in '/usr/local/bin/x-terminal-editor'.  I don't
think that such a script is necessary for all Debian systems, however.

> > Finally, I would like to add that any program that has the path
> > hard-coded to something like xterm, or an equivalent, is broken.

> You are right. Such program is broken. But I use such one for mailing.

This should be fixed.  Indeed, if we are to do this the right way,
everything running xterm, should be changed to run x-terminal-editor
(without the path).

> BTW : Is anything using x-terminal-emulator ?

Not very much, since the x-terminal-emulator link is relatively new,
but it is as easy to fix everything to use this as it is to modify
everything to use sensible-xterm.


Reply to: