Referencer opens all PDFs in GIMP after Adobe Reader is installed and removed

Bug #401837 reported by sebastian
30
This bug affects 6 people
Affects Status Importance Assigned to Milestone
Referencer
Fix Released
Undecided
Mads Chr. Olesen

Bug Description

To reproduce the bug do the following. First, start with a system with no Adobe Reader and install Referencer. At this point if you're in Ubuntu/Gnome, Referencer would open all PDFs in Evince. Now install Adobe Reader from the repository. Just like the rest of the system, Referencer now opens all PDFs in Adobe. Now remove Adobe Reader (Ubuntu reverts to Gimp at this point) and make sure the default for opening PDFs in the system is Evince again. Now if you open a PDF in the file manager, it will open in evince, whereas Referencer will open it in Gimp. This is very annoying. If anyone knows of a workaround, please let me know.

Revision history for this message
sebastian (meznaric) wrote :

OK, I did an strace and found that Referencer uses the file /usr/share/applications/defaults.list to find out what is the default application that opens a certain file type. Adding application/pdf=evince.desktop line to the above file made Referencer open the PDFs with Evince once again.

Revision history for this message
Paweł T. Jochym (jochym) wrote :

I have some more info on this. If you change locale to pl_PL it will stop opening pdf-s at all and if you switch to C locale it will open it in gedit. I belive this is a wrong method for handler selection. I belive it should use xdg-open to open the file. This is very inconvinient. One of the strengths of referencer was easy access to files. Now it is gone...

Revision history for this message
Paweł T. Jochym (jochym) wrote :

I forgot. This is karmic beta and referencer 1.1.5

Revision history for this message
Jean-Marc Hengen (dev-128) wrote :

This bug is actually caused by gnome-vfs. To be more precise, gnome-vfs doesn't respect the user settings but selects the first entry in /usr/share/applications/defaults.list. Since gnome-vfs is officially deprecated I guess this will not change anymore.

I prepared a patch which is using GIO instead of gnome-vfs for opening files. GIO is the replacement for gnome-vfs.

Revision history for this message
Jean-Marc Hengen (dev-128) wrote :

This patch uses GIO instead of gnome-vfs to open files. GIO is the replacement for gnome-vfs.

Changed in referencer:
status: New → In Progress
Changed in referencer:
assignee: nobody → Mads Chr. Olesen (shiyee)
Revision history for this message
António Lima (amrlima) wrote :

I've started doing some work done on GIo port as well. It's a long one and not as easy as the GtkBuilder port.

Mads, are you working on this? I can provide a patch with the work I've done so far in a few days.

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

Antonio: Yes, I have.
All my changes are in https://code.launchpad.net/~referencer-devs/referencer/shiyee_andrease_changes
I believe I've fixed this particular bug, there should be a commit in my branch with a reference to it.
(The bugs I have fixed I have set as "In progress" and assigned to me)

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

I have however not completed the port to GIO, so please feel free to work on that :-)

Revision history for this message
António Lima (amrlima) wrote :

Ok then, I'll continue the port on top of your work.

There's a bug about that I think.

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

Antonio: If you could create a branch and push your changes often, that would be great. Then we can avoid working on the same areas.

Revision history for this message
António Lima (amrlima) wrote :

I'll do that then. I'm very familiar with bazaar yet but I'll look into creating a branch here.

Revision history for this message
António Lima (amrlima) wrote :

I'm *not* very familiar ;)

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

Quick intro: http://doc.bazaar.canonical.com/latest/en/mini-tutorial/

#create local branch
bzr branch lp:~referencer-developers/shiyee_andrease_changes/

# hack hack hack

#commit locally, any number of times
bzr commit

#push changes to your own branch
bzr push lp:~referencer-developers/amrlima_gio_port/

Also, "bzr vis" is a really nice gui (requires the bzr-gtk package)

Revision history for this message
Mads Chr. Olesen (shiyee) wrote :

Oh sorry, "~referencer-developers "should be "~referencer-devs".

Revision history for this message
António Lima (amrlima) wrote :
Changed in referencer:
status: In Progress → Fix Committed
Changed in referencer:
milestone: none → 1.2.0
Changed in referencer:
status: Fix Committed → Fix Released
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.