Evince puts up spurious error window when .pdf extension is missing
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
evince (Ubuntu) |
Confirmed
|
Low
|
Unassigned |
Bug Description
I first noticed this when trying to display a .pdf file that was downloaded from the New York State of Health website.
Their notices have filenames like "Template030", and have no extension.
When i couldn't use Evince, I used LibreOffice Writer to display them successfully (actually, what came up was LibreOffice Draw, for some reason).
I since took a look at the error window message, and saw that it said "Error opening file: Permission denied"
I used Sakura terminal, and the Nemo Properties context menu option to compare the permissions between one of these files, and a file that Evince had no trouble displaying, and found NO DIFFERENCE.
I took another look at the files, and suddenly noted that the file I was trying to display had no extension.
Surely, it could not be that simple...
Renamed the file with the same name + ".pdf"
Displayed fine.
Renamed a file that HAD displayed fine to remove ".pdf"
Error window.
Perhaps some part of the standard for .pdf files is that they MUST have ".pdf" extensions. I do not know.
Either way, putting up an error window that says "Permission denied" is unhelpful.
Perhaps a WARNING window with: "Required file extension .pdf missing."
Can it be that the extension is the only way Evince can tell that it is a .pdf file? I don't think so...
LibreOffice had no problem with it.
I had no problem also with GIMP.
Chromium displayed it correctly when I brought it up with file://[filename]
-------
scott@scott-
Linux scott-ASUS-
scott@scott-
Ubuntu 14.10
utopic
scott@scott-
Lubuntu
scott@scott-
GNOME Document Viewer 3.14.1
-Scott Jacobs
ProblemType: Bug
DistroRelease: Ubuntu 14.10
Package: evince 3.14.1-0ubuntu1
ProcVersionSign
Uname: Linux 3.16.0-28-generic i686
NonfreeKernelMo
ApportVersion: 2.14.7-0ubuntu8
Architecture: i386
CurrentDesktop: LXDE
Date: Wed Dec 17 22:47:58 2014
InstallationDate: Installed on 2014-11-01 (46 days ago)
InstallationMedia: Lubuntu 14.10 "Utopic Unicorn" - Release i386 (20141022.1)
SourcePackage: evince
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in evince (Ubuntu): | |
importance: | Undecided → Low |
Evince is providing the best error message it can with the information available to it. The AppArmor mandatory access control system has rejected this because the filename doesn't match something expected for evince to open.
You can modify the file /etc/apparmor. d/local/ usr.bin. evince to include whatever files you want to allow. I suggest something like:
owner @{HOME} /Downloads/ ** r,
assuming, of course, that your browser has downloaded the file to your Downloads/ directory.
Once you have modified the file to include permissions you want to allow, you can run:
sudo apparmor_parser --replace /etc/apparmor. d/usr.bin. evince
Thanks