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

Re: Coming to closure on ae...



--On Wed, May 6, 1998 1:45 am +0200 "Remco Blaakmeer"
<remco@blaakmeer.student.utwente.nl> wrote: 

> On Tue, 5 May 1998, Carlos Barros wrote:
> 
>> On Wed, 6 May 1998, Anand Kumria wrote:
>> 
>>   > On Sat, 2 May 1998, Dale Scheetz wrote:
>>   > 
>>   > > There doesn't seem to be a "reliable" method for determining
whether or
>>   > > not you are in an xterm. Any method so far suggested has "natural" 
>>   > > configuration situations that break the method.
>>   > 
>>   >   How about just checking for the existance of the DISPLAY variable?
>>   > 
>> 
>> What about trying to connext to X server, and if an error, do it in
>> terminal mode.
> 
> That doesn't work properly when working from a console if you have access
> rights to a local X server. The same goes for testing the DISPLAY
> variable. The only other way I can come up with is checking the WINDOWID
> variable. Or look at how 'elvis' determines if it's running in X or not. I
> don't know how elvis checks for X, but it does this quite well.
> 

The original problem has been resolved, but there is an important point
here, I think.

As far as possible, we shouldn't be playing games like this.  It violates
the principle of least surprise (IMHO).

There are very few cases when an xterm should be handled differently from a
console.  If I unset DISPLAY in an xterm, I do it deliberately - I don't
want X to be used by programs.  If a clever program works out that X is
there and uses it anyway, I'm going to be annoyed.  Similarly, my vc
sessions won't normally have a DISPLAY set.  If they do, it's because I for
some reason want to use X with my apps started from a console.

I think an xterm should be exactly like a VC in almost every case I can
bring to mind.  Which is why this backspace/delete thing is so annoying...

Yours,

Jules


/----------------+-------------------------------+---------------------\
|  Jelibean aka  | jules@jellybean.co.uk         |  6 Evelyn Rd        |
|  Jules aka     |                               |  Richmond, Surrey   |
|  Julian Bean   | jmlb2@hermes.cam.ac.uk        |  TW9 2TF *UK*       |
+----------------+-------------------------------+---------------------+
|  War doesn't demonstrate who's right... just who's left.             |
|  When privacy is outlawed... only the outlaws have privacy.          |
\----------------------------------------------------------------------/



--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: