Setting Irfanview as Default Viewer
I have the Windows program Irfanview installed in Wine. I want to click on a an image file and have it automatically open the image. The closest I've come is getting Irfanview to open but then I have to manually select the image to open.
I found the solution here but just don't know enough to implement it. I started a new post because the original is three years old. http://www.linuxquestions.org/questi...viewer-355622/ My OS is PCLOS with KDE desk top. Any help appreciated. I tried a few things by guess to get it to work but no luck. |
In KDE, go to the KMenu, System Settings, click on Default Applications, and select File Associations on the left. Expand "images", and select the format you want. On the right, go to the General tab, under Application Preference Order click Add, then select the menu item for Irfanview if you've created one, else type the command in. You'll have to do that for each format, as far as I know (unless you want to awk the config files or something). You can also get to the App Pref Order by right clicking on an image of that type and going to Properties.
|
Thanks but as I said that only causes Irfanview to open. If you will read the original thread you will see that was suggested but didn't work. It took a script to get it to work and I just don't know how to implement the script.
From the original post: Quote:
|
I assume you are launching this from konqueror or any other kpart. Kde uses an odd naming for parameters.
I think it uses %u for files and %s for urls, or something like that. So, if you associate a given program to a file type you will need to specify the parameter as well (otherwise it will just open the viewer, as it's doing for you right now). For example, to open jpeg files with feh, you would specify "feh %u", and not just "feh". If you need to open a wrapper, like in your example, remember that you are passing arguments to it. If you pass the file name in kde using %u, and it's the only argument, then you will be able to access it as $1 in a shell script. So, you'd do: Code:
wine inrfanview "$1" |
i92guboj I appreciate the answer but it brings me back to the problem I had with the original post. It tells me what to do but not how to do it.
|
Quote:
[Sorry for not being more concrete, but I only have konqueror 4 and I don't have 3.x right now to take a closer look. However it should be easy enough to figure those steps.] Now, edit /path/to/your/script.sh and put inside this: Code:
#!/bin/bash Code:
chmod u+x /path/to/your/script.sh |
Thank you, i92guboj. That was exactly the info I needed. Don't worry about not being exact. As long as I know the basics the rest I can usually figure out.
|
Quote:
|
Quote:
|
Just a quick note that i92guboj. instructions worked for me with minor alterations. I made the file association changes in the KDE control center not konqueror. For reasons I'm not sure of I couldn't make the ".sh" file executable from command line so just did it from GUI.
Thanks i92guboj. |
All times are GMT -5. The time now is 03:29 AM. |