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.
evince bug
Moderator: Forum moderators
Re: evince bug
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.
-
- Posts: 1491
- Joined: Sun Jul 12, 2020 2:38 am
- Location: S.E. Australia
- Has thanked: 228 times
- Been thanked: 667 times
Re: evince - ok for most
@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.
- mikewalsh
- Moderator
- Posts: 6034
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 738 times
- Been thanked: 1899 times
Re: evince bug
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.
Re: evince bug
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)
Re: evince - ok for most
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.
---
evince worked well for me but it was a test too short to notice the problem.
Re: evince bug
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.
- mikewalsh
- Moderator
- Posts: 6034
- Joined: Tue Dec 03, 2019 1:40 pm
- Location: King's Lynn, UK
- Has thanked: 738 times
- Been thanked: 1899 times
Re: evince bug
How very odd. Why would Phil try to pass QPdfView off as Evince? No makee much sense....
(*shrug*)
Mike.
Re: evince bug
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.
Re: evince bug
Burunduk wrote: ↑Wed Dec 14, 2022 1:51 amDoes 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.