Re: Mc digest, Vol 1 #372 - 3 msgs



Hello!

Red Hat's htmlview can be a good starting point, but it doesn't check if
KDE is running and it doesn't convert filenames to the "file:" URLs for
the browsers that need it.

Why not simply using the $BROWSER environment variable?
Normally a system correctly configured should use it (as $EDITOR
etc...).

I realise that it's surely not enough, as it may be undefined, but
it's IMHO a good starting point, a good way to "choose the best
browser".

Yes, it's a good starting point.  If $BROWSER is set, it should be assumed
to be correct.

Also, I think that determining whether "file:" is needed or not is the
browser job, isn't it?

Konqueror, mozilla, (surely galeon too), dillo, lynx, links do it
correctly.

If the full path is provided.  There is no way to request in mc.ext full
path to the file and fetching a local copy from VFS in the same time.
This problem has been in the TODO list for some time, and really needs to
be fixed.

I agree, it's better to fix mc than to add the workaround to the browser
wrapper.

if [ ! "$BROWSER" ]; then
        if [ "`ps ux | grep kdeinit`" ] ; then

This condition can be met if any KDE program is running, even under GNOME.
We need to search for "kdeinit: kwin" or "kicker" or something like that.

                        bin_item=`which $item 2>&1`

"which" is non-portable, but it's easy to work around.  And by the way,
$DISPLAY needs to be taken into account.  If it's not set, links, lynx and
w3m should be considered.

Maybe you can mix htmlview with additional test for KDE.

It's easier to have our own htmlview.

-- 
Regards,
Pavel Roskin



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