xubuntu: 'Open with XnView MP'?

Ideas for improvements and requests for new features in XnView MP

Moderators: XnTriq, xnview

User avatar
Akovia
Posts: 46
Joined: Sat Apr 02, 2011 2:10 am
Contact:

xubuntu: 'Open with XnView MP'?

Postby Akovia » Sat Aug 04, 2012 1:00 pm

Hi,
I've searched the forums and tried some of the scripts offered, but none seem to work. I'm trying to use a custom action in thunar to be able to R-Click an image or directory and launch xnview from there with no success. It seems like vnviewmp doesn't accept any type of command line parameters so I'm kinda lost how to make a working script for this.

xubuntu 12.04
xnviewmp Version 0.51 (Jun 26 2012)
Xubuntu 12.04.4-LTS
XnView MP v0.64 - un*x x64

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

Re: 'Open with XnView MP' on xubuntu?

Postby xnview » Tue Aug 07, 2012 12:12 pm

you can start xnview like "xnview file.jpg"
Pierre.

User avatar
Akovia
Posts: 46
Joined: Sat Apr 02, 2011 2:10 am
Contact:

Re: 'Open with XnView MP' on xubuntu?

Postby Akovia » Tue Aug 07, 2012 9:32 pm

Thanks for the reply. Unfortunately that isn't working for me. The window launches but is completely empty with only the title of the window listed.

ex..

Code: Select all

$xnviewmp picture.jpg
XNVIEW restoreGeometry before : 640 480
XNVIEW restoreGeometry after : 1680 1050
QMetaObject::invokeMethod: No such method MyTabBar::layoutTabs()
QSslSocket: cannot resolve SSLv2_client_method
QSslSocket: cannot resolve SSLv2_server_method
w.init
XNVIEW 1 ok
## XNVIEW RESIZE : 1680 1050
## MyTabWidget :: resizeEvent : 1680 1050
XNVIEW 2 ok
w.start
## MyTabWidget :: resizeEvent : 1680 981
## XNVIEW RESIZE : 1680 981


I've tried with both double and single quotes with the same result.
Xubuntu 12.04.4-LTS
XnView MP v0.64 - un*x x64

dvb
Posts: 21
Joined: Mon Jun 18, 2012 9:58 am

Re: 'Open with XnView MP' on xubuntu?

Postby dvb » Wed Aug 08, 2012 4:28 am

Have you installed from a .deb? My XUbuntu opens pictures from thunar quite ok. Thunar lists it in the "open with" programs. The only thing is, that at least x64 0.51 version from .deb can't open pictures with spaces in path.

User avatar
Akovia
Posts: 46
Joined: Sat Apr 02, 2011 2:10 am
Contact:

Re: 'Open with XnView MP' on xubuntu?

Postby Akovia » Wed Aug 08, 2012 11:38 am

Have you installed from a .deb?

yes

My XUbuntu opens pictures from thunar quite ok. Thunar lists it in the "open with" programs.

It's not listed in my thunar as one of the default programs to open with, but I can scroll down and find it under "Open With Other Application". Unfortunately it's the same result.

The only thing is, that at least x64 0.51 version from .deb can't open pictures with spaces in path.

I'm using the x32 flavor. Are you saying that there is a version that can handle spaces?
Xubuntu 12.04.4-LTS
XnView MP v0.64 - un*x x64

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

Re: 'Open with XnView MP' on xubuntu?

Postby xnview » Wed Aug 08, 2012 2:39 pm

could you post the ocntent of xnview (shell script)
Pierre.

User avatar
Akovia
Posts: 46
Joined: Sat Apr 02, 2011 2:10 am
Contact:

Re: 'Open with XnView MP' on xubuntu?

Postby Akovia » Wed Aug 08, 2012 9:48 pm

Hi,
I used the script from this thread. http://newsgroup.xnview.com/viewtopic.php?f=62&t=18560

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 $@


I don't really understand it so it's hard for me to troubleshoot. So when it didn't work, I stopped trying.

You are correct that it will work on files without spaces, but that doesn't really help me as most of my pictures to have spaces in the filename. Quoting seems to be no help at all either.
Xubuntu 12.04.4-LTS
XnView MP v0.64 - un*x x64

dvb
Posts: 21
Joined: Mon Jun 18, 2012 9:58 am

Re: 'Open with XnView MP' on xubuntu?

Postby dvb » Fri Aug 10, 2012 5:03 am

Akovia wrote:It's not listed in my thunar as one of the default programs to open with, but I can scroll down and find it under "Open With Other Application". Unfortunately it's the same result.

Well, you can select it once there and make sure, that the "Use s default for this kind of file" checkbox at the bottom is checked. I did the same. And I didn't use any scripts, it was under "Open With Other Application" out of the box.

Akovia wrote:I'm using the x32 flavor. Are you saying that there is a version that can handle spaces?

Just checked x32 v0.51 .deb under Xubuntu 12.04 and Ubuntu 11.04 and it opens files with spaces in path.

User avatar
Akovia
Posts: 46
Joined: Sat Apr 02, 2011 2:10 am
Contact:

Re: 'Open with XnView MP' on xubuntu?

Postby Akovia » Fri Aug 10, 2012 12:04 pm

Well I installed the deb from this site which is stated to be the same version. "Version 0.51 (Jun 26 2012)"
I thought it would state that the newest version was already installed, but it installed without protest. The only difference I could find between them is the command to launch them.

xnviewmp from repositories = xnviewmp
xnviewmp from deb on site = xnview

Launching $xnviewmp picture with spaces.jpg (fails)
Launching $xnview picture with spaces.jpg (works)

So it's working now but I have two of the exact same versions installed from different sources. Maybe that will help determine where the problem is. Either way I'm tickled now that I can use my custom action.

Well, you can select it once there and make sure, that the "Use s default for this kind of file" checkbox at the bottom is checked. I did the same. And I didn't use any scripts, it was under "Open With Other Application" out of the box.


I get that you can do this but I prefer to use feh or gthumb as my quickie viewer, which is why I keep a custom action for xnview and don't have to navigate any sub-menus to launch it.

Thank you for verifying it worked for you which led me to try the deb from the site. Much appreciated!

p.s. BTW, when you asked if I installed from .deb before I said yes as opposed to installing from source. I now realize that this software has no source offering. Sorry if my answer was misleading.
Xubuntu 12.04.4-LTS
XnView MP v0.64 - un*x x64

User avatar
Akovia
Posts: 46
Joined: Sat Apr 02, 2011 2:10 am
Contact:

Re: 'Open with XnView MP' on xubuntu?

Postby Akovia » Fri Aug 10, 2012 12:33 pm

I looked in the ubuntu software center and checked the version there instead of from inside the program.

It's listed as.. "xnviewmp 0.51-1~getdeb1"

I had added the getdeb ppa for some other software a while back and didn't realize this is where xnviewmp was coming from in the software center. When I saw it in the software center with a few great reviews, I thought it was an official release. Maybe this info will help someone out in the future and be a warning to stick to the releases here until/if there is an official deb in the repositories.

Consider this thread Solved/Closed
Xubuntu 12.04.4-LTS
XnView MP v0.64 - un*x x64

fixitmanarizona
Posts: 1
Joined: Thu Aug 31, 2017 2:05 pm

Re: xubuntu: 'Open with XnView MP'?

Postby fixitmanarizona » Thu Aug 31, 2017 2:46 pm

I realize this is an old thread but searching for what I needed found it even though I'm on Xubuntu 16.04.
It may be helpful for other users on Xubuntu 16.04 (and above.)
YES you may create a custom action to open folders and/or files with XNview in Thunar!
My installed version of Xnview is 0.84 X32 (January 2017)
My installed version of Xubuntu is 16.04.3, Thunar version 1.6.11
It's quite simple using the graphic interface rather than a script/terminal.

Edit>configure custom actions
click the + (add)
popup will open
in basic view tab, type "open with XNview" (or whatever you prefer to see in your right click dialog)
Optionally type in a description.
in the line labeled "command" click the folder icon on the right. this should open usr/bin, and you can select the xnviewmp (in my case) executable. The line will now read: /usr/bin/xnviewmp %f
Do not check the use startup notification box.
Click the icon and search for Xnview, choose an icon (or choose any icon you prefer!)
In appearance conditions tab:
check only "directories" and "image files" .... you probably do not want folders with only text files, or files of only .txt or .doc or whatever, opening in Xnview...
click OK.

You may need to restart Thunar.
To remove, or edit the custom action, simply select Edit>configure custom actions again, and you can edit or remove it from there. A common mistake in Thunar is NOT selecting the proper appearance conditions (folders=directories, image files) in that tab, and editing makes it easy to change that without starting all over.

Now, when you right click on a folder, or on an image such as a .jpg, in Thunar, you can select your custom action.
Folders will open with XNview in the last folder view you selected.
Files will open in full screen (at least that's the way mine works) but you can just hit the escape button (or F11) on your keyboard, which will remove that full screen view and show Xnview opened to the folder the image is in. You can also right click and select full screen, which does the same thing.
This is probably configurable, however, I like the feature as-is and haven't tried to modify this behavior to open a picture in a tab, or in folder view.
Attachments
Thunarcustomaction0.png
Creating the Thunar custom Action
Xnview7.png
XnView opened to a file in file browser mode.
XnviewFullscreen1.png
XnView fullscreen (with transparency)
ThunarXnview1.png
Thunar Custom Action open with XnView


Return to “MP - Suggestions”

Who is online

Users browsing this forum: No registered users and 4 guests