You are not logged in.
Hello,
I'm working on xfce. While clicking in psi IM to a http://....image.jpg link, the image gets opened in a new card of Firefox. Firefox is my default browser. In terminal
xdg-open http://upload.koci.net.pl/uploads/crusader.jpgdoes the same. I wish this image to be opened in my image viewer, not in Firefox. In xfce's MIME type configuration I can see image image/jpeg is set to Ristretto.
Last edited by mkkot (2013-06-11 15:29:41)
Offline
xdg-open uses the browser for all urls (except file://). Everything starting with a scheme and a colon is considered a url.
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
Okay, but I want to open a link to an image in my image viewer. It is possible in KDE.
Offline
Replace xdg-open. There are a number of good replacements out there, but all you really need is a script that opens a program of your choosing. At the simplest, something like:
#!/bin/bash
IMAGE=/path/to/image/viewer
BROWSER=${BROWSER:-/path/to/browser}
fname="$@"
case ${fname##*.} in
jpg|png|jpeg|bmp) $IMAGE $fname ;;
html|htm|shtml|sthm) $BROWSER $fname ;;
esacLast edited by Trilby (2013-06-11 13:50:34)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Thanks. Shall I understand your answer as a statement that for now there is no "right way" to do what I want?
Offline
Thanks. Shall I understand your answer as a statement that for now there is no "right way" to do what I want?
The "right" way is to create a custom script. I suppose with KDE you use Konqueror as a multipurpose application (Konqueror is not only the browser, but also filemanager, ftp client, file viewer)
| alias CUTF='LANG=en_XX.UTF-8@POSIX ' | alias ENGLISH='LANG=C.UTF-8 ' |
Offline
No, actually KDE gave me the way to create bindings as I wanted without Konqueror. It's realized there via kio_ slaves.
look at: https://bugs.kde.org/show_bug.cgi?id=273238
Last edited by mkkot (2013-06-11 14:44:32)
Offline
Creating your own script could work. But my best recommendation would be to use one of the ready made replacements for xdg-open. I've never used it enough to have a real opinion on it, but you're not the first to be unsatisfied with xdg-open - and when archers are unsatisfied, they write solutions.
There is a relatively recently active thread one one archers solution to this problem ... was it mimi or mimi-open, something like that. I've never had a need for such a tool, but it seems to have been warmly received by other users, so it may do what you want.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Okay, thanks! I think the thread can be marked as solved then ![]()
Offline