You are not logged in.
I use i3 with KDE. I have been using termite as my terminal for a week now and it has this nice feature where I click on URLs to open them. Problem is that I want it to open URLs using different applications. If its a image, i want it to use feh. I see that clicking on a URL a program called kfmclient is called, which is part of KDE I believe. I would either like to use a different application to open URLs or completely disable this behavior. I tried finding resources for configuring kfmclient, but couldn't find any helpful ones.
Last edited by phantom_rehan (2020-10-26 09:08:41)
Offline
You need to set your default applications properly, as a GTK application termite should use GAppinfo and thus the xdg specification
Online
I was able to get firefox working by changing
x-scheme-handler/http=kfmclient_html.desktop
to
x-scheme-handler/http=firefox.desktop
and it worked, thanks!
Last edited by phantom_rehan (2020-10-24 04:57:11)
Offline
Cool, please mark as [SOLVED] by editing the title in your first post.
PS. We don't use markdown but BBCode, there's a link for that under every comment box, for code tags you'd use
[code]code[/code]
Online
Oh this actually isn't solved. I thought it was feh opening images, but firefox open images. I have set
image/*=feh.desktop
in my ~/.config/mimeapps.list, but it still doesn't seem to use feh to open images. It uses firefox. Also, I do have feh.desktop in /usr/share/applications/
Last edited by phantom_rehan (2020-10-26 09:09:14)
Offline
I'm not finding anything that suggests globbing on mimetypes to be supported, did you just assume that or have a reference that it should work?
What you can do is copy the possible mimetypes from the spec list: https://www.iana.org/assignments/media- … html#image
Online
If you have an http-url it will always be opened with a browser. There is no way to differentiate between filetypes for web resources before fetching them.
Edit: and most applications cannot handle anything except the local filesystem anyways.
Last edited by progandy (2020-10-26 10:55:31)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
Well I do know some programs can actually differentiate between filetypes, using mailcap, and was hoping for a similar solution.
And as for "globbing" filetypes, it seemed rather convenient.
Last edited by phantom_rehan (2020-10-26 11:59:56)
Offline
Those programs either only operate on the local filesystem or download everything to local storage and only then choose how to open the file.
You can set a custom program to open URLs in the termite config that does the same.
Last edited by progandy (2020-10-26 12:21:55)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline
So I understand that I should set browser=name_of_program in my termite config. And could you reccomend such a program that operates based on mailcap, or should I write my own script?
Offline
You'll have to write your own. For file:// URLs and local paths it is trivial, just call xdg-open with the url (that uses the xdg mimetype associations instead of mailcap). It still opens all http urls with a browser, though. For that you'll have to add download and so on.
Last edited by progandy (2020-10-26 14:26:07)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' |
Offline