#425606 apt-listchanges: Please support using a browser if $DISPLAY set and a pager if not

#425606#5
Date:
2007-05-22 19:24:28 UTC
From:
To:
If in X, I'd like to have the changes displayed in a browser; however, if not
in X, I'd like to have the changes displayed in a pager, rather than a
text-based browser.  Could apt-listchanges have some sort of fallback
mechanism like this?

- Josh Triplett

#425606#10
Date:
2007-05-22 21:28:08 UTC
From:
To:
  /usr/bin/sensible-browser is such a mechanism.
#425606#15
Date:
2007-05-23 01:39:50 UTC
From:
To:
reopen 425606
thanks

Pierre Habouzit wrote:

Not as far as I can tell.  sensible-browser uses $BROWSER, falls back to
x-www-browser or www-browser in an x-terminal-emulator if $DISPLAY, and falls
back to www-browser if not $DISPLAY.  I see no functionality to fall back to a
pager under any circumstances.  Furthermore, even if such functionality
existed, it would open the HTML generated by apt-listchanges in a pager,
rather than the usual apt-listchanges pager output.

- Josh Triplett

#425606#22
Date:
2007-05-23 09:00:36 UTC
From:
To:
  oh you prefer a pager to a text based browser OK. Well, I'll see what
I can do, as this makes sense. sorry for having read that too fast.

#425606#25
Date:
2008-11-03 18:02:31 UTC
From:
To:
I just discovered that apt-listchanges has an environment variable to
set the frontend.  Given that, I don't actually need apt-listchanges
to have support for deciding what frontend to use based on $DISPLAY .
I can simply include the following snippet in my .bashrc:

if [ -n "$DISPLAY" ]; then
    APT_LISTCHANGES_FRONTEND=browser
else
    APT_LISTCHANGES_FRONTEND=pager
fi
export APT_LISTCHANGES_FRONTEND


You might consider including this snippet in README.Debian.

(However, until bug 456454 gets fixed, I can't actually use the
browser frontend.)

- Josh Triplett