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".
"Open with" function corrected
Moderators: helmut, XnTriq, xnview
-
- Posts: 4
- Joined: Thu Aug 22, 2013 1:44 pm
"Open with" function corrected
- Attachments
-
- xnview.sh.gz
- corrected starter script of XnViewMP
- (349 Bytes) Downloaded 211 times
Last edited by napfkuchen on Wed Jul 08, 2015 10:15 am, edited 1 time in total.
Re: "Open with" function corrected
Script works good on Lubuntu 13.10
XnViewMP Version 0.61 (Jul 17 2013)
thanx napfkuchen
XnViewMP Version 0.61 (Jul 17 2013)
thanx napfkuchen

-
- Posts: 4
- Joined: Thu Aug 22, 2013 1:44 pm
Re: "Open with" function corrected
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:
The install script saves the original startup script of XnViewMP.
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
- Attachments
-
- install_xnview-fm.gz
- xnview-fm installer
- (1.73 KiB) Downloaded 83 times
-
- Posts: 1
- Joined: Fri Jul 17, 2015 12:07 pm
Re: "Open with" function corrected
Hi napfkuchen,
many thanks for your useful script. It worked immediately.
I especially like the hidden feature in your script. It's a very nice idea.
many thanks for your useful script. It worked immediately.
I especially like the hidden feature
Code: Select all
VDIR=on
Re: "Open with" function corrected
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.

the instalation package, IMHO, saves noobs like me a lot of time. TY.

Re: "Open with" function corrected
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.
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.
-
- Posts: 4
- Joined: Thu Aug 22, 2013 1:44 pm
Re: "Open with" function corrected
Reinstalling my script is not necessary. Just run the following command in a terminal:
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.
Code: Select all
sudo bash -c 'mv "$0" "$0-org"; ln -sr "$0-fm" "$0"' "`which xnview`"