Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Since upgrading to 10.10 none of evince, okular or xpdf recognise up/down, pageup/pagedown keys when working as a pdf reader embedded in firefox.

I had this problem before (10.04) with okular, which was part of the reason I switched it back to evince (I also don't like the KDE save file thing in okular). But now I have the same issue in evince as well even after switching back to evince. [Why does ubuntu insist on making okular the default, even on gnome?]

So:

How do I make my PgUp/PgDn keys work with embedded pdf readers?

share|improve this question
    
I can't make evince or okular tags –  Seamus Oct 20 '10 at 12:31
    
This answer will help you pick which one to open by default: askubuntu.com/questions/7480/… –  Jorge Castro Oct 20 '10 at 13:31
    
No it won't. I'm talking about pdf readers embedded in firefox. And I don't need an answer on how to do that, I already know: ubuntuforums.org/showthread.php?t=25685 –  Seamus Oct 20 '10 at 13:45

2 Answers 2

up vote 5 down vote accepted
+50

Are you using mozplugger to embed a PDF reader into Firefox? In that case, you can change which PDF program gets embedded by creating a local mozpluggerrc in ~/.mozilla/, e.g.:

cp /etc/mozplugger ~/.mozilla/

(Your "base" mozplugger may not be there. That's where it is for me on Arch.)

And then edit the part that has to do with PDFs so it only contains what you want.

application/pdf:pdf:PDF file
application/x-pdf:pdf:PDF file
text/pdf:pdf:PDF file
text/x-pdf:pdf:PDF file
       repeat noisy swallow(okular) fill: okular "$file"
       repeat noisy swallow(evince) fill: evince "$file"
       repeat noisy swallow(Xpdf) fill: xpdf -g +9000+9000 "$file"
       repeat swallow(acroread) fill: acroread7 -openInNewWindow "$file"
       GV()

Delete the lines having to do with PDF viewers you don't want. (It's not Ubuntu that's making it default to Okular, it's the mozplugger devs.)

Try evince, okular, mupdf, epdfviewer and see if any of them work.

I can't replicate it, so I don't really know how to solve the problem with the keys, but suffice it to say, you're not the only one having the problem. Some bug reports to read:

http://bugreports.qt.nokia.com/browse/QTBUG-3814

https://www.mozdev.org/bugs/show_bug.cgi?id=22359

https://bugzilla.mozilla.org/show_bug.cgi?id=560501

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=519832

EDIT: After poking around a bit more, I found the following note on the Ubuntu manpage about mozplugger:

   needs_xembed
          Some applications when embedded requires  the  Xembed  protocol,
          other applications don’t want the Xembed protocol. Add or remove
          this flag if you find that you cannot move keyboard focus to the
          embedded  window.  Currently  it  appears QT4 based applications
          require this flag.

So try, chaging the line in mozplugger:

 repeat noisy swallow(evince) fill: evince "$file"

to

 repeat noisy needs_xembed swallow(evince) fill: evince "$file"
share|improve this answer
    
The base mozpluggerrc is at /etc/mozpluggerrc on ubuntu. –  Seamus Oct 23 '10 at 13:05
2  
Actually, this is exactly opposite to the right solution! The trick was to remove the needs_xembed tag from that line! –  Seamus Oct 23 '10 at 13:15
    
Hey, whatever works! Maybe it needs to have it for KDE/QT apps and needs not to have it for GNOME/GTK apps? –  frabjous Oct 23 '10 at 15:33

I had the same issu. I had the option activated, that new windows are opend in background and would not get foucus automatically. When I changed this setting (Setting Manager --> Window manager or within the Compiz Manager) it worked.

Br Benji

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.