Page 1 of 2

PZCHMView

Posted: Sun 02 May 2010, 13:52
by PANZERKOPF
Created for using with Puppy 4.3.x
Uses default html viewer. (You may change it's name by editing a corresponding variable).
Works in text and graphical modes.
No dependencies, all tools and libs included into package.
(If you want to use it in text mode, you must install any console web browser).

What is a CHM file?

Posted: Sun 02 May 2010, 14:29
by bigpup
What is a CHM file?
I see you are from Earth. I've been to that planet, but they are so primitive. They still use Windows!

Re: What is a CHM file?

Posted: Sun 02 May 2010, 15:23
by PANZERKOPF
bigpup wrote:What is a CHM file?
Microsoft compiled HTML help file.
bigpup wrote: I see you are from Earth. I've been to that planet, but they are so primitive. They still
use Windows!
:)
Sorry but "primitive" people from this planet sometimes want to read some usefull books compiled as CHM.

Posted: Sun 02 May 2010, 19:20
by jrb
Thank you PANZERKOPF,

I do need to read chm files from time to time but do not have seamonkey or firefox installed so could never use chmsee. This does a great job on its own! :D I've just installed it in my woofed up version of quirky21 and it is displaying files in Netsurf quite nicely.

One problem with your pet, there is no pet.specs file in the pet so petget manager will not uninstall it. :( I extracted your pet and reran it through dir2pet and created a pet with pet.specs in it. I was able to reinstall and then uninstall (just to make sure it would work, I immediately installed it again).

While I was rebuilding it I also included a new /root/Choices/MIME-types/application_x-chm with this code:

Code: Select all

#! /bin/sh
exec pzchmview "$1"
Now I can click on a .chm file and it will open in defaulthtmlviewer.

Thanks again, J

Edit: Reworked .pet attached

Posted: Tue 04 May 2010, 00:04
by jemimah
Nice, I'm adding this to Puppeee.

Posted: Wed 05 May 2010, 10:31
by chrome307
@ jrb

Can you upload your updated PET file for members?

Thanks in advance :)

Posted: Thu 06 May 2010, 13:00
by jrb
Reworked .pet attached to post above.

Posted: Thu 06 May 2010, 19:50
by PANZERKOPF
jrb wrote:Reworked .pet attached to post above.
Thanks for addition!

Posted: Mon 10 May 2010, 13:35
by BarryK
Hi, I installed the 1.0b PET, but it doesn't work properly for me.

I downloaded three .chm files, they all have the same problem. When I click on one, it opens in my browser -- a page of links, I click on a link and get "Page not found", I click the go-back button and get "Page not found".

It seems that whatever got created in /tmp got immediately erased, I look and there is nothing in /tmp, even while the .chm file is being viewed.

Here is where I got a couple of the .chm files:
http://code.google.com/p/htmlhelp/downl ... =label:CHM

Looking at your script, I see the problem. Quirky does not have a HTML viewer as such, uses the full SeaMonkey. In the second last line, SeaMonkey gets launched in a tab-window and there is an immediate return to the script, then the files in /tmp get deleted.

I have attached a workaround, which detects the special condition and does not delete the files in /tmp. Not a very satisfactory solution though.

Posted: Mon 10 May 2010, 22:25
by PANZERKOPF
Hi Barry !
I newer used seamonkey but installed it especially for simulate this error.
This is what I understood:
1) The "mozstart" executes seamonkey with "exec" command and immediately
exits.
3) Chmviewer goes to last string and erases all temporary html files.
2) Seamonkey continues running as a separate process but all needed files are erased.
We can use directly "seamonkey" script instead of "mozstart" for solving this problem (IMHO).

Posted: Tue 11 May 2010, 02:01
by BarryK
Oh, of course, dumb me.

For SM 2.0.4, /usr/bin/seamonkey is a symlink to /usr/lib/seamonkey/seamonkey, which is a script that runs SM but exits immediately.

The solution is to run the binary executable directly, ex:

/usr/lib/seamonkey/seamonkey-bin file:///usr/share/doc/index.html

...so, if that is put into your script, test that 'gtkmoz' exists, check that it is a symlink to 'mozstart', then check that /usr/lib/seamonkey/seamonkey-bin exists, if all 3 are true then run seamonkey-bin directly.

Posted: Tue 11 May 2010, 13:43
by PANZERKOPF
I think that my some researches are wrong. When chmviewer uses defauthtmlviewer script (which also uses "exec" for executing viewer) this problem doesn't appear. It only appears when chmviewer uses mozstart and seamonkey is running at this time (opens files in new tab).

Posted: Wed 12 May 2010, 00:11
by BarryK
PANZERKOPF wrote:I think that my some researches are wrong. When chmviewer uses defauthtmlviewer script (which also uses "exec" for executing viewer) this problem doesn't appear. It only appears when chmviewer uses mozstart and seamonkey is running at this time (opens files in new tab).
I'm using SeaMonkey 2.0.4.

If I run this in a terminal:

# seamonkey file:///usr/share/doc/index.html
#

There is an immediate return to the prompt.

This must be different from how SeaMonkey 1.1.18 works.

Posted: Wed 12 May 2010, 00:31
by BarryK
Ah, I think that I will fix it in my seamonkey package. I'll make /usr/bin/seamonkey a link to /usr/lib/seamonkey/seamonkey-bin. I don't think that there is any need to run the /usr/lib/seamonkey/seamonkey startup script.

Then your script will work.

Posted: Wed 12 May 2010, 03:32
by BarryK
I was getting confused about the real cause of the problem. Have sorted it out, see my blog post:

http://bkhome.org/blog/?viewDetailed=01582

I have created pzchmview-1.0c.pet, here is the script:

Posted: Thu 13 May 2010, 19:20
by PANZERKOPF
BarryK wrote:I was getting confused about the real cause of the problem. Have sorted it out, see my blog post:
http://bkhome.org/blog/?viewDetailed=01582
I have created pzchmview-1.0c.pet, here is the script:
I looked into script (but didn't test yet). My opinion:
This procedure kill all seamonkey's processes. If we are browsing
some web pages and also want to view a chm file, an active browser will be killed.
Also:
Yesterday I discovered that Opera web browser has same behavior as Seamonkey.
It allows running only one instance: any next instance opens a document in new
tab and terminates immediately.
I haven't any solution now for these browsers.
I am going to think........ :)

Posted: Mon 24 May 2010, 03:06
by BarryK
See my post about Pzchmview 1.0d:

http://bkhome.org/blog/?viewDetailed=01611

Posted: Mon 24 May 2010, 03:08
by BarryK
PANZERKOPF,
Could you please post the source? Legally, we have to provide it.

Posted: Mon 24 May 2010, 20:10
by PANZERKOPF
BarryK wrote:PANZERKOPF,
Could you please post the source? Legally, we have to provide it.
Sorry but I Don't understand what means "posting a source". The PZchmview is
a script which is always a source. Explain me please. :)
BarryK wrote: See my post about Pzchmview 1.0d:
http://bkhome.org/blog/?viewDetailed=01611
I watch your blog periodically.
Helpsurfer is nice html viewer but it can't display correctly non-latin characters.
(possibly can't recognize a charset of page).

Posted: Tue 25 May 2010, 00:36
by BarryK
PANZERKOPF wrote:
BarryK wrote:PANZERKOPF,
Could you please post the source? Legally, we have to provide it.
Sorry but I Don't understand what means "posting a source". The PZchmview is
a script which is always a source. Explain me please. :)
BarryK wrote: See my post about Pzchmview 1.0d:
http://bkhome.org/blog/?viewDetailed=01611
I watch your blog periodically.
Helpsurfer is nice html viewer but it can't display correctly non-latin characters.
(possibly can't recognize a charset of page).
Your PET package includes 'extract_chmLib' binary executable and 'libchm.so.0.0.0' shared library. We need the source for these.