xfce Okular hyperlinks are not working

Hey there,

I got a small problem, namely when clicking on a hyperlink in a pdf in Okular the system starts R and shows me - what I believe is the - html code of the webpage. Does anyone know how to fix this issue?

Thank you very much for your help!

Desktop used??

Sounds like a file extension mix up

Xfce as mentioned in the thread title :wink:

Mine open in kWrite, which I also installed in Xfce, so basically the same problem.

Use Document Viewer instead of Okular.

You will find that under Menu=>Office

… never been that important, though. In Okular, I generally right click, copy link, then paste in Firefox.

Another way is to use the application finder. Again, in Okular, Right-click, copy link, Alt-F3 and paste, hit Enter

Normally, for KDE applications, the default application (eg browser) can be set via
SystemSettings > Personalisation > Applications, choose the preferred application for web browser eg firefox.

or via

kcmshell5 componentchooser

*supplied by the the kde-cli-tools5 package.

Yes, but neither of these are available in Xfce Desktop.:wink:

Also, this happens (in Okular) even though html is set to launch in Firefox in the preferred applications and in mime.

Other applications I use respect that setting, but Okular seems not to. And, that is the same problem the OP is having.

Note that it works just fine in 42.3

That’s why I hinted at the ‘kde-cli-tools5’ package. :wink:

One easy fix would be to update to 42.3.

I believe 42.2 EOL is in January, so you will have to do so by then, anyway.

Yep, but Okular in 42.2 is the KDE4 version.:wink:

Ok, so do the kcmshell4 version :wink: (I’m getting tired with all this winking though)

kcmshell5 componentchooser

Install the necessary first of course.

Sorry, managed to delete your post Fraser_Bell.

Anyway, for KDE4 app…

kcmshell4 componentchooser

Install the necessary first

Heh,heh. Out of curiosity, how did you manage to do that?rotfl!

With mod powers…slipped on the ‘edit post’ rather than ‘reply with quote’! :slight_smile: At least we’ve both stopped with the incessant winking!

BTW, the kcmshell4 command is part of the ‘kdebase4-runtime’ package.

… and “the necessary” would be …

BTW, the kcmshell4 command is part of the ‘kdebase4-runtime’ package.

ahh, that is already installed – at least on my 42.2 system. Just trying it now.

Okay, it does not seem to work as it should.

The KDE Control Module comes up as expected. Under Email Client, I was able to choose Thunderbird and set it. Works fine.

But, under Web Browser, choose “in the following browser:”, there is no browser listed in the menu, even though Firefox is installed and is in the Xfce Launcher menu.

From there, clicking on the “…” at the right, I can browse to the Firefox binary, either through /usr/bin/firefox (the link) or directly /usr/lib/firefox/firefox and hit apply, but it does not hold.

The following is the output:

gerry@FBAsusLtp01:~> kcmshell4 componentchooser
kcmshell(3691)/kdeui (KIconLoader): Error: standard icon theme "oxygen" not found! 

X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 18 (X_ChangeProperty)
  Resource id:  0x0
kcmshell(3691) KSambaSharePrivate::testparmParamValue: Running testparm ("-d0", "-s", "--parameter-name", "usershare path")
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-visio.template.macroEnabled.main+xml"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.binary.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.addin.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-visio.drawing.macroEnabled.main+xml"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slideshow.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-visio.stencil.macroEnabled.main+xml"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.sheet.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.presentation.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.template.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-excel.template.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.template.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-word.document.macroEnabled.12"
kcmshell(3691) KMimeTypeRepository::parents: "/usr/share/mime/subclasses"  refers to unknown mimetype  "application/vnd.ms-powerpoint.slide.macroEnabled.12"
X Error: BadAtom (invalid Atom parameter) 5
  Major opcode: 18 (X_ChangeProperty)
  Resource id:  0x0


QClipboard: Unable to receive an event from the clipboard manager in a reasonable time
gerry@FBAsusLtp01:~>

… yet, I can successfully choose instead “xfce4-appfinder” and it will hold.

After that, when I click on a link in Okular, the appfinder will pop up, and I can choose Firefox in there, and the link then pops up. There is no apparent way to save the link to Firefox, though, and it is necessary to go through the appfinder and then to Firefox each time I click a link.

It (sorta) works, as a workaround, but I imagine that is not what the OP really wants.

For me, it is just as easy, if not easier, to select the text, copy, and paste it into Firefox.

So, something is not working there.

… but, I rarely click links in PDF files, anyway. And, 42.2 is approaching EOL. So it is not something I need, did not even notice it was not working until I saw the OP.

Still, if you get no response from the User who created the Original Post in the meantime, I will continue to test until I fall asleep, just so we can provide an elegant solution.

… and your next suggestion would be?

I have no idea why it doesn’t hold. The kcmshell4 changes are made to ~/.kde4/share/config/kdeglobals

[General]
BrowserApplication$e]=!firefox

I’ll leave you to investigate further - I’m running openSUSE 42.3 (with KDE Plasma 5).

If you want to use Firefox, you can just delete that “BrowserApplication” line though, as Firefox is the default anyway.

Also, it may be that the application actually doesn’t use the (KDE) default browser, but rather the application associated with the “text/html” mimetype.
The standard file associations can be changed in “kcmshell4 filetypes”.

Note that KDE actually follows standards here, but KDE4 (being outdated and basically unmaintained) uses an older one.
KF5 should actually respect the XFCE settings, or more precise, should use the same (newer) standard and config files as XFCE for this.
(Okular in 42.2 is still KDE4 based, 42.3 contains the KF5 version)

See also Default applications - ArchWiki

Although, according to Fraser_Bell’s previous comment, that doesn’t seem to be the problem here.

Yes, perhaps that is the case. I don’t use openSUSE 42.2 any longer so can’t test.

Actually, the OP’s problem is that the hyperlink in the PDF isn’t launching a browser at all, but rather…

I got a small problem, namely when clicking on a hyperlink in a pdf in Okular the system starts R and shows me - what I believe is the - html code of the webpage.