LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-27-2013, 04:36 PM   #1
elesmod
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 88

Rep: Reputation: Disabled
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 ()

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?
 
Old 09-27-2013, 05:54 PM   #2
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,513

Rep: Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479Reputation: 8479
Quote:
Originally Posted by elesmod View Post
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 ()

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.
 
2 members found this post helpful.
Old 09-28-2013, 03:53 AM   #3
elesmod
Member
 
Registered: Sep 2012
Distribution: Slackware
Posts: 88

Original Poster
Rep: Reputation: Disabled
Ok, thanks for the explanation.
 
Old 09-30-2013, 09:20 AM   #4
Poprocks
Member
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: Slackware
Posts: 522

Rep: Reputation: 279Reputation: 279Reputation: 279
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.
 
Old 10-02-2013, 08:09 AM   #5
jtsn
Member
 
Registered: Sep 2011
Posts: 922

Rep: Reputation: 480Reputation: 480Reputation: 480Reputation: 480Reputation: 480
Quote:
Originally Posted by volkerdi View Post
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.
 
Old 04-08-2016, 06:59 PM   #6
jrosevear
LQ Newbie
 
Registered: Nov 2006
Distribution: Slackware
Posts: 29

Rep: Reputation: 14
I wonder if there was a misunderstanding among some of the posters to this thread. I found this thread when I too became curious about htmlview. I found htmlview, just as the OP, in pkgtool's list of setup scripts. I was actually looking for the script that makes Slackware boot sticks.

Curious about the htmlview entry in the list, I looked and found /usr/bin/htmlview. I imagine that the OP did the same thing. And, as I suppose the OP did, I looked at the script and wondered why a setup script was needed that did next to nothing.

Fueled by my interest in finding the script that made boot sticks I dug a little deeper and found /var/log/setup. It seems that this directory holds the setup scripts that correspond to pkgtool's list. On reading the script and comments by the posters, I figured it out. Now it makes sense.

Yes, the /usr/bin/htmlview does next to nothing, but it is needed apparently by some applications. I can see how it could be useful. The setup script, /var/log/setup/setup.htmlview, creates /usr/bin/htmlview if it does not exist, but a browser does exist.

I also looked up volkerdi's reference to Bob Dole. I'm guessing that it was a tongue in cheek reference to Pat Buchanan and Bob Dole having competed in the 1996 Republican presidential primary.

And I think found the script that makes boot sticks. I believe it is /var/log/setup/setup.80.make-bootdisk.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
My spoofed browser string a.k.a cloaked with a purpose acummings Slackware 1 10-15-2009 02:22 PM
htmlview ?? your_shadow03 Linux - Newbie 6 07-09-2009 06:03 AM
Details about default web Browser & default Email client sudhasmyle Linux - Software 4 06-15-2006 11:45 AM
How to Change Default Browser to a new browser banner Linux - General 1 05-13-2005 11:09 PM
gaim browser / default browser question hildog Linux - Newbie 2 10-03-2003 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration