Page 1 of 1

"Open with" function corrected

Posted: Thu Aug 22, 2013 2:24 pm
by napfkuchen
I'm using XnViewMP Version 0.61 on Lubuntu 12.04 and Lubuntu 13.04.

The filemanager is PCManFm. This one offers a feature called "Open with" to open a selected file with an other program. If I try to open a jpg or a png file that way with XnViewMP, XnViewMP tells it couldn't find the file.

XnViewMP start with the script "/usr/sbin/xnview". So I opened the script with root privileges and add a view thing things, so that will work for me. This is stored in "xnview.sh.gz"

Hint:
Goto in "/usr/sbin". Rename the original script (mv xnview xnview.old). Unpack my script and put it in "/usr/sbin", then make a softlink "xnview" to my script (ln -s xnview.sh xnview) . After all give my script the same owner und rights als file "xnview.old".

Re: "Open with" function corrected

Posted: Thu Dec 19, 2013 11:03 am
by Skulptron
Script works good on Lubuntu 13.10
XnViewMP Version 0.61 (Jul 17 2013)

thanx napfkuchen :D

Re: "Open with" function corrected

Posted: Wed Jul 08, 2015 9:45 am
by napfkuchen
I revised my script. Now it also works with a list of files that have been selected in a fille manager, and opens them all in XnViewMP. In contrast to the original startup script (/usr/bin/xnview) my revised script also supports the PCManFM file manager.

I tested my revised script on: PCManFM, Nautilus, Nemo
under: Debian "Jessie", Lubuntu 15.04, Fedora 22

Procedure: To use my revised script download the file "install_xnview-fm.gz" and run in a console with the following command:

Code: Select all

zcat install_xnview-fm.gz |sudo bash
The install script saves the original startup script of XnViewMP.

Re: "Open with" function corrected

Posted: Fri Jul 17, 2015 12:24 pm
by LordHelmchen
Hi napfkuchen,

many thanks for your useful script. It worked immediately.
I especially like the hidden feature

Code: Select all

VDIR=on
in your script. It's a very nice idea.

Re: "Open with" function corrected

Posted: Wed Jul 22, 2015 2:30 am
by Pequi
Running Debian 7 with LXDE here. Script worked perfectly. Should be included with
the instalation package, IMHO, saves noobs like me a lot of time. TY.
:D

Re: "Open with" function corrected

Posted: Mon Sep 21, 2015 5:04 pm
by Pequi
I just updated XnView XP to 0.75, using Debian,and associations stopped working again. Running your script just said that it had already been applied.
So ... I removed the part that checks it it has been applied, and all is well again. The script ran and the chronic failure of XnView to associate with image files was once again fixed.
I just wish the author would address the problem. Not opening the program, or opening a hex editor/music player when you double click an image is just plain silly and not user-friendly. It's been that way since version 0.5something. An image viewer should VIEW images when they are double clicked.

Re: "Open with" function corrected

Posted: Thu Oct 08, 2015 9:53 am
by napfkuchen
Reinstalling my script is not necessary. Just run the following command in a terminal:

Code: Select all

sudo bash -c 'mv "$0" "$0-org"; ln -sr "$0-fm" "$0"' "`which xnview`"
The installation of a new version of XnViewMP rewrites its startup. The code saves this and creates a symlink that points to my installed script. This protects changes that someone undertook at my script.