lynx-dev
[Top][All Lists]
Advanced

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

Re: LYNX-DEV DISPLAY variable settings


From: Bela Lubkin
Subject: Re: LYNX-DEV DISPLAY variable settings
Date: Mon, 22 Sep 1997 15:40:12 +0000

Jim Spath wrote:

> I received the following message in the "TODO" context and am
> forwarding it to the list for possible discussion:
> 
> -----
> From: address@hidden (Andreas Leitgeb)
> Date: Mon, 15 Sep 1997 10:07:04 -0600
> when I start Lynx without a DISPLAY-variable, I'd still like
> to be able to specify the display in the option-form and NOT get
> the following message: (for example if an X-display becomes available
> later)
> "... WARNING: Lynx is NOT configured for XWINDOWS!"
> -----
> 
> 1)  The DISPLAY variable isn't saved to .lynxrc, so setting it in the
>     options screen rather than the command line is dubious.
> 
> 2)  I'm not sure who might be capable of actually hooking in XWindows
>     library code to get an X-display to function.
> 
> 3)  What is the value of suppressing the warning that this doesn't work?

Saving it to .lynxrc has obvious problems.

But he's right that it would sometimes be nice to be able to tell Lynx,
"Ok, now I have an X display available, please use it when I try to
invoke a graphical viewer."  A Lynx session has enough context that it
can be painful to exit and restart -- you lose your history, visited
pages, etc.  He's asking about adding it in mid-session.

Don't worry about question 3.  2 is irrelevant; Lynx doesn't actually
link with the X libraries, it just knows whether or not X viewers can be
invoked.

The problem is that Lynx pre-calculates the values of "test -n
$DISPLAY", "test -z $DISPLAY" options in the various mailcaps.  To fix
this, after the putenv(putenv_commands) in src/LYOptions.c, it would
have to call HTFormatInit() again to re-calculate those values.  But it
probably isn't safe to call that twice (I didn't try).

Anyway, there's a relatively simple way to fix this.  In your mailcap
file, get rid of the ``test=test -n "$DISPLAY"'' clause:

  image/jpeg; xv %s

Now, if you try to load an image with DISPLAY unset, it fails in xv
("xv: Can't open display").  Use the options screen to set DISPLAY, and
now it works.

>Bela<
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]