Page 1 of 1
Shell Starter
Posted: Wed Nov 04, 2009 10:33 am
by Flashbaer
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
Re: Shell Starter
Posted: Wed Nov 04, 2009 11:07 am
by oops66
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
Re: Shell Starter
Posted: Wed Dec 09, 2009 2:48 pm
by xnview
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?
Re: Shell Starter
Posted: Wed Dec 09, 2009 4:16 pm
by oops66
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
Re: Shell Starter
Posted: Wed Mar 17, 2010 6:13 pm
by oops66
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`