This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KIO-man configuration files

Tags: None
(comma "," separated)
tpe
Registered Member
Posts
50
Karma
0
OS

KIO-man configuration files

Mon Oct 30, 2017 6:10 pm
Hello everyone,
I want to change the default "browser" for the man pages. Currently, when I enter man:/<manpage> anywhere in KDE it send the output to Firefox. That's because the Firefox is the default program to handle text/html.

What I want to do, is to trick the system. I want to do configure kio-man to create a new extension (like man-html or something like that) and then configure KDE to open those files with Konqueror.

The file I found is this:

Code: Select all
/usr/share/kservices5/man.protocol

The contents of the file looks promising:
Code: Select all
[Protocol]
exec=kf5/kio/man
protocol=man
input=none
output=filesystem
reading=true
listing=Name
defaultMimetype=text/html
determineMimetypeFromExtension=false
X-DocPath=kioslave5/man/index.html
maxInstances=10
Icon=help-contents
Class=:local

But, since it's under /usr, it will be overwritten from the next update.
So, is there any other location where I could modify this? Like /etc for example?
airdrik
Registered Member
Posts
1854
Karma
5
OS

Re: KIO-man configuration files

Tue Oct 31, 2017 6:55 pm
One option is to just set the default application for text/html to konqueror. After all, how often do you open up html files saved on your computer (or otherwise accessed by clicking on the file in the file manager)?
The desktop should be smart enough to distinguish between: I want to browse to this web site and I want to open this html file (which isn't being served by a web server somewhere).
I can confirm this behavior as I too have FF set for my default browser, but I have kwrite set as the default app for text/html files. If I try using any web shortcuts or opening http/https urls, they open up in Firefox; while if I try clicking on an html file in the file manager or opening a man:/ url, they open in kwrite.


airdrik, proud to be a member of KDE forums since 2008-Dec.
tpe
Registered Member
Posts
50
Karma
0
OS

Re: KIO-man configuration files

Wed Nov 01, 2017 7:43 pm
airdrik wrote:One option is to just set the default application for text/html to konqueror. After all, how often do you open up html files saved on your computer (or otherwise accessed by clicking on the file in the file manager)?
The desktop should be smart enough to distinguish between: I want to browse to this web site and I want to open this html file (which isn't being served by a web server somewhere).
I can confirm this behavior as I too have FF set for my default browser, but I have kwrite set as the default app for text/html files. If I try using any web shortcuts or opening http/https urls, they open up in Firefox; while if I try clicking on an html file in the file manager or opening a man:/ url, they open in kwrite.


Well,
your solution seems simpler than mine! I will try it.
User avatar
raphaelra
Registered Member
Posts
209
Karma
0
OS

Re: KIO-man configuration files

Thu Feb 07, 2019 2:34 pm
tpe wrote:I want to change the default "browser" for the man pages. Currently, when I enter man:/<manpage> anywhere in KDE it send the output to Firefox.

In my case is this the chromium browser.
tpe wrote:What I want to do, is to trick the system. I want to do configure kio-man to create a new extension (like man-html or something like that) and then configure KDE to open those files with Konqueror.

I tried this approach. I works if i call kio-man from a command line with
Code: Select all
kioclient5 exec man:/ls text/man
It opens the man page for ls in rekonq (my default app for mime type text/man). But when I use Krunner (Alt+F2) or type man:/ls in the url line in Dolphin, chromium-browser is launched and it shows the raw content of the generated file (somewhre in ~/.cahe/kioexec/krun/) for the man page but not as html :( When I rename such a file adding .html extension and modify the url in chromium, it works

Does anyone knows, how to tell kio-man to use *.html file name pattern ? Or maybe a hint for proper config chromium browser ...


Bookmarks



Who is online

Registered users: bancha, Bing [Bot], Evergrowing, Google [Bot], lockheed, mesutakcan, Sogou [Bot]