LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Purpose of htmlview in pkgtool; default browser (http://www.linuxquestions.org/questions/slackware-14/purpose-of-htmlview-in-pkgtool%3B-default-browser-4175478791/)

elesmod 09-27-2013 04:36 PM

Purpose of htmlview in pkgtool; default browser
 
In pkgtool, Setup, there's a script "htmlview - Set a default browser link". Nothing happens when I run it. Upon closer inspection, it's only a one-line script:
Code:

#!/bin/sh
exec konqueror "$@"

When I try to execute it normally, it starts konqueror of course.

Now, when I open links from:
1) LibreOffice, they open in Seamonkey (which I want)
2) Mumble - in Firefox (which I don't like)
3) Okular - since it's a KDE program, I thought it would open in konqueror, but no, it opens in Seamonkey too, however not the actual website, but only a cashed file from var/tmp/kdecache-elesmod/krun (:scratch:)

So what's the purpose of that htmlview script? Did it used to work and now it's obsolete? Or maybe it has some use which I haven't figured out?

volkerdi 09-27-2013 05:54 PM

Quote:

Originally Posted by elesmod (Post 5036096)
In pkgtool, Setup, there's a script "htmlview - Set a default browser link". Nothing happens when I run it. Upon closer inspection, it's only a one-line script:
Code:

#!/bin/sh
exec konqueror "$@"

When I try to execute it normally, it starts konqueror of course.

Now, when I open links from:
1) LibreOffice, they open in Seamonkey (which I want)
2) Mumble - in Firefox (which I don't like)
3) Okular - since it's a KDE program, I thought it would open in konqueror, but no, it opens in Seamonkey too, however not the actual website, but only a cashed file from var/tmp/kdecache-elesmod/krun (:scratch:)

So what's the purpose of that htmlview script? Did it used to work and now it's obsolete? Or maybe it has some use which I haven't figured out?

I'm not exactly sure where I picked that up from, other than I don't think I wrote it. For one thing, I'm not in the habit of referring to myself as Pat (or as Bob Dole).

IIRC, some other distribution (I think it was Debian, but I'm not sure) began shipping such a script, and there are now some KDE and GTK+ things that expect to be able to start a browser with it. If the script isn't there, they can't open a browser.

It appears that either the test order should be reversed, or the loop should exit when the first browser is found. The browsers seem to be listed in preferred order, but the way it is processed now leaves the least preferred browser in the htmlview script.

Currently only geeqie and kalzium are using this, so it has nothing to do with the behavior of those other programs. Those are probably hardcoded according to their developers' own preferences. Perhaps they should be using this script so the preference could be assigned in a single location.

elesmod 09-28-2013 03:53 AM

Ok, thanks for the explanation.

Poprocks 09-30-2013 09:20 AM

I believe Bernhard Rosenkraenzer ("bero"), formerly a Red Hat employee, wrote it. I remember older Red Hat releases had a globe icon browser launcher on gnome-panel that ran htmlview and other RH config tools used it too.

I remember bero pulling it into Ark Linux when he forked RH. I did a bit of packaging for Ark and remember patching it to look for KDE's default web browser if you were running KDE and GNOME's default if you were running GNOME. If you were running neither, it would go fall back on going through a list unless you put some config file in /etc.

So yeah. That's my story.

jtsn 10-02-2013 08:09 AM

Quote:

Originally Posted by volkerdi (Post 5036127)
Currently only geeqie and kalzium are using this, so it has nothing to do with the behavior of those other programs. Those are probably hardcoded according to their developers' own preferences. Perhaps they should be using this script so the preference could be assigned in a single location.

I think, "xdg-open" is the correct command to launch the user's preferred browser. It also accepts URLs.


All times are GMT -5. The time now is 01:30 PM.