Using two different databases

Ask for help and post your question on how to use XnView MP.

Moderators: XnTriq, helmut, xnview

Post Reply
olivine
Posts: 6
Joined: Tue Feb 11, 2014 5:16 pm

Using two different databases

Post by olivine »

I would like to use XnViewMP with two different image databases. Is this possible, with, say, a command-line argument when starting xnview? I've seen it mentioned on the forum, but I haven't been able to figure it out. Thanks in advance for any help.
User avatar
xnview
Author of XnView
Posts: 43597
Joined: Mon Oct 13, 2003 7:31 am
Location: France
Contact:

Re: Using two different databases

Post by xnview »

The database is configured in xnview.ini, so you can use 2 differents .ini
Pierre.
olivine
Posts: 6
Joined: Tue Feb 11, 2014 5:16 pm

Re: Using two different databases

Post by olivine »

How do I access a different xnview.ini? Starting "xnviewmp -i xnview2.ini" still loads up xnview.ini. I'm using linux, if that makes any difference.
User avatar
oops66
XnThusiast
Posts: 2005
Joined: Tue Jul 17, 2007 1:17 am
Location: France

Re: Using two different databases

Post by oops66 »

Hello, ... today, only xnview classic can do that with a parameter ... ;-) ... see here:
http://newsgroup.xnview.com/viewtopic.p ... 21#p117321
XnViewMP Linux X64 - Debian - X64
olivine
Posts: 6
Joined: Tue Feb 11, 2014 5:16 pm

Re: Using two different databases

Post by olivine »

Thanks for your answer. That's too bad. For now, I'm using this work-around: I have 2 settings folders (.xnviewmp-proj1, .xnviewmp-proj2), and each time I want to use one of the databases, a bash script copies the correct setting folder to .xnviewmp, then starts xnviewmp. Probably a bit risky, but should work as long as I'm not running both at the same time. Any other suggestions welcome.
User avatar
m.Th.
XnThusiast
Posts: 1664
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Using two different databases

Post by m.Th. »

1. Why do you want to use two different databases? :)

2. Yes, a command line argument would be nice.

3. Till then, perhaps you can use two instances of XnView MP in two separate directories? The program isn't that big to make any difference WRT storage available today.
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
olivine
Posts: 6
Joined: Tue Feb 11, 2014 5:16 pm

Re: Using two different databases

Post by olivine »

m.Th. wrote:1. Why do you want to use two different databases? :)
I have two different types of projects and I don't need to access both at the same time. It seems to me that things work noticeably faster with less files (maybe it is because one has a lot of folders/subfolders). Also, one is on my home server, and the other on my laptop. Xnview doesn't seem terribly happy whenever it's missing half of the files, and I'm afraid it'll screw things up.
2. Yes, a command line argument would be nice.

3. Till then, perhaps you can use two instances of XnView MP in two separate directories? The program isn't that big to make any difference WRT storage available today.
I don't know how I would start two instances in linux that would use a different .ini file. Maybe it would be possible to recompile it under a different name, but it sounds a bit of a pain. All it would need, really, is to let it use a different .ini startup file and/or a different settings directory.
User avatar
m.Th.
XnThusiast
Posts: 1664
Joined: Wed Aug 16, 2006 6:31 am
Contact:

Re: Using two different databases

Post by m.Th. »

I don't know how I would start two instances in linux that would use a different .ini file. Maybe it would be possible to recompile it under a different name, but it sounds a bit of a pain. All it would need, really, is to let it use a different .ini startup file and/or a different settings directory.
Yes, sure. This is it. Go to Tools | Settings | Integration | Paths

and in XnView settings change the "Use .ini file in folder" from 'User' to 'Program'
m. Th.

- Dark Themed XnViewMP 1.6 64bit on Win11 x64 -
olivine
Posts: 6
Joined: Tue Feb 11, 2014 5:16 pm

Re: Using two different databases

Post by olivine »

I've tried that. If I leave it as "use .ini file in folder User", but change the path for the databases, .ini appears in my home folder in .xnviewmp, as expected. The databases are where I wanted them.

If I also change the "use .ini file in folder" to "program", then .ini still appears in my home folder in .xnviewmp, and so do the databases (even though I've changed them to a custom folder).

Not sure if this is a bug or an issue with my (standard) set-up.
vommie
Posts: 113
Joined: Sat Apr 14, 2007 2:36 am
Location: Berlin

Re: Using two different databases

Post by vommie »

Did you copied XnView to a place where it has the right to write the ini to? For "C:\Program Files\..." it would need admin rights I think.

So you should do something like this:
- Excract XnViewMP to a place with user rights like "C:\test\XnViewMP_01" or the desktop etc.
- Start the xnview.exe from there and set all integration\path-settings to "Program (XnView)". Close it. There should be now the xnview.ini in the root dir.
- Copy the XnViewMP_01 folder and rename it for example to XnViewMP_02.

Now you should have two complete independent instances of XnView with their own settings and database, you even can start both at the same time.

Edit: Oh, I saw in antoher thread you're using linux - I don't know how it's handled there.
Post Reply