Wrong pdf viewer set by default on Lubuntu settings

Bug #657335 reported by KJ4OHH
36
This bug affects 5 people
Affects Status Importance Assigned to Milestone
lubuntu-default-settings (Ubuntu)
Fix Released
Medium
Julien Lavergne
Maverick
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: chromium-browser

SRU explanation :
1. This bug prevent users from launching directly the pdf viewer when clicking on a pdf file on Lubuntu, because the default pdf viewer is set for epdview, the previous pdf viewer installed by default. The new one is evince.
2. The bug was fixed on revision 0.13 on natty, replacing epdfview.desktop by evince.desktop on default.list
3. Patch is on revision 92 of the lubuntu-default-settings-maverick branch (see http://bazaar.launchpad.net/~lubuntu-desktop/+junk/lubuntu-default-settings-maverick/revision/92)
4. TEST CASE: start a fresh install of Lubuntu, try to launch a pdf file by clicking on it, nothing should happen.
5. I can't see any regression possible.

On Lubuntu 10.10 Beta 2, when I download a pdf file in Chromium, then click on it to open it up, the pdf is being redirected back to Chromium instead of the pdf viewer.

This results in Chromium "downloading" the pdf again, this time from the user's Downloads directory. It creates another copy of the file with "(1)" appended to the filename.

Not sure if this is happening with other file types or not, have only seen it with pdf files.

ProblemType: BugDistroRelease: Ubuntu 10.10
Package: chromium-browser 6.0.472.63~r59945-0ubuntu2
ProcVersionSignature: Ubuntu 2.6.35-22.33-generic 2.6.35.4
Uname: Linux 2.6.35-22-generic i686
Architecture: i386
Date: Sat Oct 9 09:47:55 2010
Desktop-Session:
 DESKTOP_SESSION = Lubuntu
 GNOME_DESKTOP_SESSION_ID = None
 XDG_CONFIG_DIRS = /etc/xdg/lubuntu:/etc/xdg
 XDG_DATA_DIRS = /etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share
DetectedPlugins: (no entry found in the Preferences file)
Env:
 MOZ_PLUGIN_PATH = None
 LD_LIBRARY_PATH = NoneInstallationMedia: Lubuntu 10.10 "Maverick Meerkat" - Beta i386 (20100930)
ProcEnviron:
 LANG=en_US.UTF-8
 SHELL=/bin/bashSourcePackage: chromium-browser
chromium-default:
 # Default settings for chromium-browser. This file is sourced by /bin/sh from
 # /usr/bin/chromium-browser

 # Options to pass to chromium-browser
 CHROMIUM_FLAGS=""

Revision history for this message
KJ4OHH (kj4ohh) wrote :
Revision history for this message
Fabien Tassin (fta) wrote :

Please paste the results of the following commands:

/usr/bin/xdg-mime query default application/pdf
/usr/lib/chromium-browser/xdg-mime query default application/pdf

(both should return the desktop file of your preferred pdf viewer)

if it's ok, maybe the mime type is wrong:

try:

xdg-mime query filetype /name/of/one/of/your.pdf

it should say "application/pdf"

Revision history for this message
KJ4OHH (kj4ohh) wrote :

kj4ohh@nano:~$ /usr/bin/xdg-mime query default application/pdf
epdfview.desktop
kj4ohh@nano:~$ /usr/lib/chromium-browser/xdg-mime query default application/pdf
epdfview.desktop
kj4ohh@nano:~$ xdg-mime query filetype Downloads/VX-2R.pdf
application/pdf; charset=binary
kj4ohh@nano:~$

Revision history for this message
KJ4OHH (kj4ohh) wrote :

Just tried a bunch of different pdfs from various websites and they're all doing the same thing, it downloads the file correctly but when you click on the downloaded file on chromium's download bar it just makes another copy of the file instead of opening it with the default pdf viewer.

Revision history for this message
Fabien Tassin (fta) wrote :

does "xdg-open Downloads/VX-2R.pdf" work at all?
if not, it's a bug in xdg-utils

Revision history for this message
KJ4OHH (kj4ohh) wrote :

Hmmm, we may be getting somewhere, got an error when I typed that command, then it launched chromium. However if I use the file manager (PCManFM) to open a pdf it opens correctly.

Here's the output I got, not sure if the "Registration failed" messages are related to this problem or just some other warning chromium is printing out.

Apparently the .desktop file for the pdf viewer is missing:

kj4ohh@nano:~$ xdg-open Downloads/VX-2R.pdf
Warning: unknown mime-type for "/usr/share/applications/epdfview.desktop" -- using "application/octet-stream"
Error: no such file "/usr/share/applications/epdfview.desktop"
[1526:1553:81264160:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12
[1526:1553:81264391:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12
[1526:1553:81264560:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12
[1526:1553:81264715:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12
[1526:1553:81264853:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12
[1526:1553:81264990:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12
[1526:1553:81265190:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12
[1526:1553:81265340:ERROR:chrome/browser/sync/notifier/registration_manager.cc(127)] Registration failed with code: 12

Revision history for this message
KJ4OHH (kj4ohh) wrote :

Yes, I just looked in the /usr/share/applications directory and there is no epdfview.desktop file.

I haven't done many modifications to the system after installing it on my netbook, I could do another install of Lubuntu from scratch and see if the file is missing after the install finishes.

Revision history for this message
Fabien Tassin (fta) wrote :

could you locate where epdfview.desktop is in your install? maybe Lubuntu uses a different path.

according to this: http://packages.ubuntu.com/search?searchon=contents&keywords=epdfview.desktop&mode=exactfilename&suite=maverick&arch=any

the epdfview package in regular ubuntu provides /usr/share/applications/epdfview.desktop
you may find out with:

dpkg -S epdfview.desktop

Revision history for this message
KJ4OHH (kj4ohh) wrote :

$ dpkg -S epdfview.desktop
dpkg: *epdfview.desktop* not found.

Revision history for this message
KJ4OHH (kj4ohh) wrote :

Ah, this is the problem, it seems evince is installed and not epdfview, but edpfview is set as the default application.

The only change I remember doing is replacing Lubuntu's default mail client of sylpheed with Thunderbird. Maybe that pulled in extra gnome app dependencies? I will re-install Lubuntu from scratch and see if epdfview gets installed by default and something I did messed that up. Otherwise it looks like the default pdf viewer is incorrectly set. I'll post an update later tonight.

Revision history for this message
KJ4OHH (kj4ohh) wrote :

Just booted the Lubuntu 10.10 Beta 2 Live CD and the Live CD has the same problem.

evince is the installed pdf viewer but "xdg-mime query default application/pdf" returns "epdfview.desktop"

Revision history for this message
Micah Gersten (micahg) wrote :

This seems to be an issue with lubuntu-default-settings since I just read that Lubuntu recently switched from ePDFView to evince.

affects: chromium-browser (Ubuntu) → lubuntu-default-settings (Ubuntu)
Revision history for this message
KJ4OHH (kj4ohh) wrote :

Yes, I agree.

Doing a "xdg-mime default evince.desktop application/pdf" fixed the problem.

Julien Lavergne (gilir)
Changed in lubuntu-default-settings (Ubuntu):
status: New → In Progress
importance: Undecided → Medium
assignee: nobody → Julien Lavergne (gilir)
Revision history for this message
ohiomoto (ohiomoto) wrote :

I was able to solve this by editing "/usr/bin/xdg-open" as described in this thread: http://ubuntuforums.org/showthread.php?t=1499046

I commented out these lines:
# generic)
# open_generic "$url"
# ;;

And added these:
generic)
pcmanfm "$url"
;;

Julien Lavergne (gilir)
description: updated
summary: - Chromium browser redirects downloaded pdf files back to itself
+ Wrong pdf viewer set by default on Lubuntu settings
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lubuntu-default-settings - 0.14

---------------
lubuntu-default-settings (0.14) natty; urgency=low

  * etc/xdg/lubuntu/lxdm/lxdm.conf
   - Enable user list in lxdm 0.3.0.
  * etc/xdg/lubuntu/applications/default.list
   - Replace epdfview by evince. LP: #657335
 -- Julien Lavergne <email address hidden> Tue, 09 Nov 2010 22:53:38 +0100

Changed in lubuntu-default-settings (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted lubuntu-default-settings into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in lubuntu-default-settings (Ubuntu Maverick):
status: New → Fix Committed
tags: added: verification-needed
Revision history for this message
Mauricio Strello (mstrello) wrote :

By the way, is is possible add do the same thing for folders. I need to do the following:

xdg-mime default pcmanfm.desktop application/x-directory

By default Lubuntu have Nautilus as the application for opening folders! See the /usr/share/applications/defaults.list.

Thanks in advance.

Best regards,
--
Mauricio Strello C.

Revision history for this message
Jonathan Marsden (jmarsden) wrote :

Verified. Lubuntu 10.10 in a virtualbox VM.

Before the updated lubuntu-default-settings PDF files were "double downloaded" in Chromium. After the proposed pacakge was installed, they behave normally, being downloaded once and then opened in evince when the downloaded PDFs are clicked on.

tags: added: verification-done
removed: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package lubuntu-default-settings - 0.13.1

---------------
lubuntu-default-settings (0.13.1) maverick-proposed; urgency=low

  * etc/xdg/lubuntu/applications/default.list
   - Replace epdfview by evince. LP: #657335
 -- Julien Lavergne <email address hidden> Tue, 09 Nov 2010 22:56:07 +0100

Changed in lubuntu-default-settings (Ubuntu Maverick):
status: Fix Committed → Fix Released
tags: added: testcase
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.