Shell Starter

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, xnview

Post Reply
Flashbaer
Posts: 1
Joined: Wed Nov 04, 2009 10:22 am

Shell Starter

Post by Flashbaer » Wed Nov 04, 2009 10:33 am

Hi there,

I just installed XnView MP and just enjoyed running it on Ubuntu 9.04 :-)

I have a small suggestion about the starter-skript xnview.sh: to let it start from every folder I want to, I changed the skript to this:

Code: Select all

#!/bin/sh

XNVIEW_FOLDER=$(echo $0 | sed -e 's/\/[^\/]*$//');

LD_LIBRARY_PATH=$XNVIEW_FOLDER/
export LD_LIBRARY_PATH
QT_PLUGIN_PATH=$XNVIEW_FOLDER/
export QT_PLUGIN_PATH
$XNVIEW_FOLDER/xnview
Best Regards
Flashbaer

User avatar
oops66
XnThusiast
Posts: 1999
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Shell Starter

Post by oops66 » Wed Nov 04, 2009 11:07 am

Flashbaer wrote:Hi there,
I just installed XnView MP and just enjoyed running it on Ubuntu 9.04 :-)
I have a small suggestion about the starter-skript xnview.sh: to let it start from every folder I want to, I changed the skript to this:

Code: Select all

#!/bin/sh
XNVIEW_FOLDER=$(echo $0 | sed -e 's/\/[^\/]*$//');
LD_LIBRARY_PATH=$XNVIEW_FOLDER/
export LD_LIBRARY_PATH
QT_PLUGIN_PATH=$XNVIEW_FOLDER/
export QT_PLUGIN_PATH
$XNVIEW_FOLDER/xnview
Best Regards
Flashbaer
Hello
Thank you for the script, for information you can use this one too:
http://newsgroup.xnview.com/viewtopic.p ... 915#p77915

Code: Select all

#!/bin/sh
dirname=`dirname $0`
LD_LIBRARY_PATH=$dirname
export LD_LIBRARY_PATH
QT_PLUGIN_PATH=$dirname
export QT_PLUGIN_PATH
$dirname/xnview "$@"
But I agree +1, it will be better to have this kind of xnview.sh by default instead the actual one here:

Code: Select all

#!/bin/sh
LD_LIBRARY_PATH=./
export LD_LIBRARY_PATH
QT_PLUGIN_PATH=./
export QT_PLUGIN_PATH
./xnview
Last edited by oops66 on Wed Dec 09, 2009 3:55 pm, edited 1 time in total.
XnViewMP 0.82 Linux X64 - Ubuntu 16.04 LTS - X64

User avatar
xnview
Author of XnView
Posts: 32737
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Shell Starter

Post by xnview » Wed Dec 09, 2009 2:48 pm

Flashbaer wrote:I have a small suggestion about the starter-skript xnview.sh: to let it start from every folder I want to, I changed the skript to this:
Why is it better than the current one?
But I agree +1, it will be better to have this kind of xnview.sh by default instead the actual one here:
Why?
Pierre.

User avatar
oops66
XnThusiast
Posts: 1999
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Shell Starter

Post by oops66 » Wed Dec 09, 2009 4:16 pm

xnview wrote:...
But I agree +1, it will be better to have this kind of xnview.sh by default instead the actual one here:
Why?
Because in this case, it is possible to start from any folder, and it is also possible to use under nautilus explorer ( for example) the contextual menu "Open With" ... image_file.jpg for example to open this image with XnViewMP (do not forgot the quotes in this case here: "$@" instead $@).
... But it is also possible to have 2 or more xnview.sh files samples in your .tgz package ( xnview01.sh, xnview02.sh, and so....) for specifics use.

The suggested new kind of xnview.sh:

Code: Select all

#!/bin/sh
dirname=`dirname $0`
LD_LIBRARY_PATH=$dirname
export LD_LIBRARY_PATH
QT_PLUGIN_PATH=$dirname
export QT_PLUGIN_PATH
$dirname/xnview "$@"
the actual xnview.sh by default:

Code: Select all

#!/bin/sh
LD_LIBRARY_PATH=./
export LD_LIBRARY_PATH
QT_PLUGIN_PATH=./
export QT_PLUGIN_PATH
./xnview
XnViewMP 0.82 Linux X64 - Ubuntu 16.04 LTS - X64

User avatar
oops66
XnThusiast
Posts: 1999
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Shell Starter

Post by oops66 » Wed Mar 17, 2010 6:13 pm

Done into the Linux MP 0.25 version - Thank you Pierre for this improvement.

But this solution is probably much better (in case of symbolic link) ???, see here:
http://newsgroup.xnview.com/viewtopic.p ... 580#p82580
change:
dirname=`dirname $0`

to

pathname=`readlink -f $0`
dirname=`dirname $pathname`
XnViewMP 0.82 Linux X64 - Ubuntu 16.04 LTS - X64

Post Reply