evince bug

Post here if you feel others can duplicate your so discovered "bug"

Moderator: Forum moderators

Post Reply
ozsouth
Posts: 1422
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 219 times
Been thanked: 624 times

evince bug

Post by ozsouth »

If a .pdf filename has the $ symbol in it, evince won't open it (in slacko64 derivatives at least). Not a problem in fossa/bionic64 via qpdfview.

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: evince bug

Post by Burunduk »

Does evince really exist in Slacko? In woof-ce and Fossapup64 9.5 "evince" is a wrapper script:

Code: Select all

#!/bin/ash
#BK nov 2007
#it seems built-in to gtk and gnomeprint print-dialogs, if choose print-
#preview, tries to run 'evince' -- which is a Gnome document viewer.
#i looked at what gets passed into this 'evince' script when try to print-
#preview from Leafpad:
#--unlink-tempfile --preview --print-settings /tmp/settings5F8P1T.ini /tmp/previewQ2HM1T.pdf
#...interesting, it's a pdf file. so, do this...


ONLYFILENAMES="`echo -n "$*" | tr '\t' ' ' | tr -s ' ' | tr ' ' '\n' | grep -v '^-' | grep 'pdf$' | tr '\n' ' '`"

exec defaultpdfviewer $ONLYFILENAMES

The comment tells that it has a special purpose of parsing the parameters generated by Leafpad for print-preview. It does so by making some inexact transformations and shouldn't be used for anything else. It can't handle filenames that contain spaces, tabs, or start with a dash. It's easy to fix it but there is no reason for this.

This script, however, doesn't change "$" characters and it's up to the defaultpdfviewer script to deal with them. Maybe file names are not properly quoted there and undergo a parameter expansion. I don't have Slacko to find out what the actual problem is.

ozsouth
Posts: 1422
Joined: Sun Jul 12, 2020 2:38 am
Location: S.E. Australia
Has thanked: 219 times
Been thanked: 624 times

Re: evince - ok for most

Post by ozsouth »

@Burunduk - evince is a binary executable in slackos. I've since discovered that it actually works when launched via ROX-Filer, but in emelfm (& others?) reads $(number) as a parameter. So not a problem for most folk.

User avatar
mikewalsh
Moderator
Posts: 5722
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 627 times
Been thanked: 1769 times

Re: evince bug

Post by mikewalsh »

Mm. Of course, if you want to get "technical" about it, strictly speaking Evince isn't a PDF viewer at all. It's actually a multi-purpose document viewer that just happens to support PDFs as one of its many options:-

https://wiki.gnome.org/Apps/Evince

https://help.gnome.org/users/evince/stable/

It's curious that in many Pups, Evince is an actual binary.......yet, as stated, in Fossa 9.5 it's just a script. I wonder WHY that is..?

(*shrug*)

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

Geek3579
Posts: 253
Joined: Sat Jul 18, 2020 1:07 pm
Has thanked: 72 times
Been thanked: 64 times

Re: evince bug

Post by Geek3579 »

And another issue surfaced today in Fossapup64 - evince was chewing up to 50% cpu at times but without any recent open documents.

Once I killed it in task manager the cpu usage went down to a normal 10% or so ( and the temperature of the cpu went down 2 degrees too)

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: evince - ok for most

Post by Burunduk »

ozsouth wrote: Wed Dec 14, 2022 3:46 am

I've since discovered that it actually works when launched via ROX-Filer, but in emelfm (& others?) reads $(number) as a parameter.

Then it could be a problem with emelfm. I've tested evince and emelfm installed from the ubuntu repos using PPM on Fossapup64 9.5 - the emelfm2 version 0.4.1 can open files with '$' in the name in evince or other programs but if a filename contains double quotes, it removes them.

So it's possible to open, for example, teapot_service_manual_$100.pdf and there is no way to open teapot_service_manual_"$100".pdf.

I've found the emelfm2 version 0.9.1.2 here. Despite numerous warnings during the compilation on Fossapup it works and doesn't have this limitation.

---

Geek3579 wrote: Thu Dec 15, 2022 7:08 am

evince was chewing up to 50% cpu

evince worked well for me but it was a test too short to notice the problem.

User avatar
Keef
Posts: 254
Joined: Tue Dec 03, 2019 8:05 pm
Has thanked: 3 times
Been thanked: 68 times

Re: evince bug

Post by Keef »

It's curious that in many Pups, Evince is an actual binary.......yet, as stated, in Fossa 9.5 it's just a script. I wonder WHY that is..?

It's a wrapper script. Points to defaultpdfviewer, which launches qpdfview. So its not exactly Evince anyway.

User avatar
mikewalsh
Moderator
Posts: 5722
Joined: Tue Dec 03, 2019 1:40 pm
Location: King's Lynn, UK
Has thanked: 627 times
Been thanked: 1769 times

Re: evince bug

Post by mikewalsh »

Keef wrote: Thu Dec 15, 2022 7:49 pm

It's curious that in many Pups, Evince is an actual binary.......yet, as stated, in Fossa 9.5 it's just a script. I wonder WHY that is..?

It's a wrapper script. Points to defaultpdfviewer, which launches qpdfview. So its not exactly Evince anyway.

How very odd. Why would Phil try to pass QPdfView off as Evince? No makee much sense....

(*shrug*)

Mike. ;)

Puppy "stuff" ~ MORE Puppy "stuff" ~ ....and MORE! :D
_______________________________________________________

Image

Burunduk
Posts: 245
Joined: Thu Jun 16, 2022 6:16 pm
Has thanked: 6 times
Been thanked: 123 times

Re: evince bug

Post by Burunduk »

mikewalsh wrote: Fri Dec 16, 2022 2:05 am

No makee much sense....

I tend to agree. Almost nothing in this world appears to make much sense. Nonetheless, the comment in the wrapper script [see above] tries to explain its purpose: when the print-preview function is activated in many gtk applications (like leafpad, geany, or abiword), the evince command is called and if the distro lacks it, the wrapper is used instead.

Edit: As expected, geany and abiword can't show a print preview without evince (real or a wrapper) but leafpad is clever - it shows a warning: Error launching preview Failed to execute child process “evince” (No such file or directory) and then launches qpdfview.

User avatar
BarryK
Posts: 2370
Joined: Tue Dec 24, 2019 1:04 pm
Has thanked: 103 times
Been thanked: 603 times

Re: evince bug

Post by BarryK »

Burunduk wrote: Wed Dec 14, 2022 1:51 am

Does evince really exist in Slacko? In woof-ce and Fossapup64 9.5 "evince" is a wrapper script:

Code: Select all

#!/bin/ash
#BK nov 2007
#it seems built-in to gtk and gnomeprint print-dialogs, if choose print-
#preview, tries to run 'evince' -- which is a Gnome document viewer.
#i looked at what gets passed into this 'evince' script when try to print-
#preview from Leafpad:
#--unlink-tempfile --preview --print-settings /tmp/settings5F8P1T.ini /tmp/previewQ2HM1T.pdf
#...interesting, it's a pdf file. so, do this...


ONLYFILENAMES="`echo -n "$*" | tr '\t' ' ' | tr -s ' ' | tr ' ' '\n' | grep -v '^-' | grep 'pdf$' | tr '\n' ' '`"

exec defaultpdfviewer $ONLYFILENAMES

I was surprised to see my initials in that script!
2007, that is a long time ago.

In EasyOS, /usr/bin/evince is the actual binary.

Well, well, it is still in woofQ:

https://github.com/bkauler/woofq/blob/m ... bin/evince

But during the build of EasyOS, the script gets overwritten by the evince binary.

Yes, I can see why the script might be required, if evince is not in the build of the pup or easy.

And yes, I can see the problem with that script if the path has a space character.

Post Reply

Return to “Bug Reports”