Separate instances of digikam, different album trees, same machine?

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|

Separate instances of digikam, different album trees, same machine?

John Stumbles
Is it possible to run more than one instance of digikam at the same time
on a machine, operating on different album trees and with different
databases?

I have a tree of work photographs entirely separate from my
'recreational' photos which I'd like to use digikam to organise. I'd
like to be able to mirror the album tree and database file to a laptop I
use for work, which doesn't have enough disk space to take my main,
recreational album tree. And the tags I would want for the work
photographs are different from those I use for my main collection.

I can't see, in digikam's help manual, any way to invoke it with a
command line parameter to specify where to find its config files or
anything like that so I guess the answer is probably that it is not
possible, but I thought I'd ask anyway!

--
John Stumbles                                    http://stumbles.org.uk
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

Jean-François Rabasse

On Tue, 5 Jun 2012, John Stumbles wrote:

> Is it possible to run more than one instance of digikam at the same time on a
> machine, operating on different album trees and with different databases?
> ...
> I can't see, in digikam's help manual, any way to invoke it with a command
> line parameter to specify where to find its config files or anything like
> that so I guess the answer is probably that it is not possible, but I thought
> I'd ask anyway!

Hello John,

It's possible if you're not reluctant to a bit of shell scripting.
(Or copy/paste my example below.)
I do the same thing and have two « DK environments », with different DB
and folders trees.

DK can be run with a command line option specifying the directory which
hosts the database. But DK also uses a configuration file and this one is
unique, so tricking this requires some preconfiguration.

1. I have my standard (main) DK configuration set.

2. I wrote a shell script to run my auxiliary DK configuration
    (It's named dkaux and is somewhere in my PATH, e.g. $HOME/bin)

This script does the following :
--
#!/bin/bash
#

# Define aux base directory
DBASE=/somewhere/on/disk

# Save current RC configuration file
DCONF=${HOME}/.kde4/share/config/digikamrc
test -f ${DCONF} && mv ${DCONF} ${DCONF}.bak

# Install aux RC file if exists
test -f ${DCONF}.aux && mv ${DCONF}.aux ${DCONF}

# Start DK on aux directory (and wait, no trailing &)
digikam --database-directory ${DBASE} 2> /dev/null

# When done, restore RC configuration to standard
mv ${DCONF} ${DCONF}.aux
test -f ${DCONF}.bak && mv ${DCONF}.bak ${DCONF}

# That's all !
--

Well, it works well (at least for me:-), and it's possible to extend the
idea and write 2, 3 or more starting scripts, dkaux1, dkaux2, etc., with
different base directories and RC files.

The major problem is that you can't start at the same time two DK instances,
and get two DK main windows, the main tree and the aux tree.
No magic, as DK uses a single fixed RC configuration file the above can't
be reentrant.

Hope this could help,
Jean-François


PS: wish list: a great idea would be that future versions of DK could also
accept the RC file on command line. That would allow starting with:
  digikam --database-directory /... --configuration-file /....digikamrc
and managing different systems with shell aliases.
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

carl33914
Hmm, I had never thought of this until I read this thread, but would assume it would work:
Can two users (e.g. userA and userB) be simultaneously running their own, unique, instances of digikam?

On 06/05/2012 06:29 PM, Jean-François Rabasse wrote:

On Tue, 5 Jun 2012, John Stumbles wrote:

Is it possible to run more than one instance of digikam at the same time on a machine, operating on different album trees and with different databases?
...
I can't see, in digikam's help manual, any way to invoke it with a command line parameter to specify where to find its config files or anything like that so I guess the answer is probably that it is not possible, but I thought I'd ask anyway!

Hello John,

It's possible if you're not reluctant to a bit of shell scripting.
(Or copy/paste my example below.)
I do the same thing and have two « DK environments », with different DB
and folders trees.

DK can be run with a command line option specifying the directory which hosts the database. But DK also uses a configuration file and this one is
unique, so tricking this requires some preconfiguration.

1. I have my standard (main) DK configuration set.

2. I wrote a shell script to run my auxiliary DK configuration
   (It's named dkaux and is somewhere in my PATH, e.g. $HOME/bin)

This script does the following :
--
#!/bin/bash
#

# Define aux base directory
DBASE=/somewhere/on/disk

# Save current RC configuration file
DCONF=${HOME}/.kde4/share/config/digikamrc
test -f ${DCONF} && mv ${DCONF} ${DCONF}.bak

# Install aux RC file if exists
test -f ${DCONF}.aux && mv ${DCONF}.aux ${DCONF}

# Start DK on aux directory (and wait, no trailing &)
digikam --database-directory ${DBASE} 2> /dev/null

# When done, restore RC configuration to standard
mv ${DCONF} ${DCONF}.aux
test -f ${DCONF}.bak && mv ${DCONF}.bak ${DCONF}

# That's all !
--

Well, it works well (at least for me:-), and it's possible to extend the
idea and write 2, 3 or more starting scripts, dkaux1, dkaux2, etc., with
different base directories and RC files.

The major problem is that you can't start at the same time two DK instances,
and get two DK main windows, the main tree and the aux tree.
No magic, as DK uses a single fixed RC configuration file the above can't
be reentrant.

Hope this could help,
Jean-François


PS: wish list: a great idea would be that future versions of DK could also
accept the RC file on command line. That would allow starting with:
 digikam --database-directory /... --configuration-file /....digikamrc
and managing different systems with shell aliases.


_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

John Stumbles
In reply to this post by Jean-François Rabasse
On 05/06/12 23:29, Jean-François Rabasse wrote:

> Hello John,
>
> It's possible if you're not reluctant to a bit of shell scripting.
...
> The major problem is that you can't start at the same time two DK
> instances,
> and get two DK main windows, the main tree and the aux tree.

Thanks. Yes, I guessed one could do some smoke and mirrors like that,
but then you have to keep stopping one instance and starting the other
to swap between them (and digikam's pretty slow starting up with a large
collection) so that would be pretty painful!

Another way would be to run one within a virtual machine or as another
user on the system but that's fairly horrible too!

--
John Stumbles                                    http://stumbles.org.uk
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

Claude Gélinas
In reply to this post by carl33914
What I would like to see is to be able to open two differents albums at
the same time in the same DK. Is it possible ? It would allow me to
compare photo in the two album to see if they are the same or if some
are missing etc.

> Hmm, I had never thought of this until I read this thread, but would
> assume it would work:
> Can two users (e.g. userA and userB) be simultaneously running their
> own, unique, instances of digikam?
>
> On 06/05/2012 06:29 PM, Jean-François Rabasse wrote:
> >
> > On Tue, 5 Jun 2012, John Stumbles wrote:
> >
> >> Is it possible to run more than one instance of digikam at the
> >> same time on a machine, operating on different album trees and
> >> with different databases?
> >> ...
> >> I can't see, in digikam's help manual, any way to invoke it with a
> >> command line parameter to specify where to find its config files
> >> or anything like that so I guess the answer is probably that it is
> >> not possible, but I thought I'd ask anyway!
> >
> > Hello John,
> >
> > It's possible if you're not reluctant to a bit of shell scripting.
> > (Or copy/paste my example below.)
> > I do the same thing and have two « DK environments », with
> > different DB and folders trees.
> >
> > DK can be run with a command line option specifying the directory
> > which hosts the database. But DK also uses a configuration file and
> > this one is
> > unique, so tricking this requires some preconfiguration.
> >
> > 1. I have my standard (main) DK configuration set.
> >
> > 2. I wrote a shell script to run my auxiliary DK configuration
> >    (It's named dkaux and is somewhere in my PATH, e.g. $HOME/bin)
> >
> > This script does the following :
> > --
> > #!/bin/bash
> > #
> >
> > # Define aux base directory
> > DBASE=/somewhere/on/disk
> >
> > # Save current RC configuration file
> > DCONF=${HOME}/.kde4/share/config/digikamrc
> > test -f ${DCONF} && mv ${DCONF} ${DCONF}.bak
> >
> > # Install aux RC file if exists
> > test -f ${DCONF}.aux && mv ${DCONF}.aux ${DCONF}
> >
> > # Start DK on aux directory (and wait, no trailing &)
> > digikam --database-directory ${DBASE} 2> /dev/null
> >
> > # When done, restore RC configuration to standard
> > mv ${DCONF} ${DCONF}.aux
> > test -f ${DCONF}.bak && mv ${DCONF}.bak ${DCONF}
> >
> > # That's all !
> > --
> >
> > Well, it works well (at least for me:-), and it's possible to
> > extend the idea and write 2, 3 or more starting scripts, dkaux1,
> > dkaux2, etc., with different base directories and RC files.
> >
> > The major problem is that you can't start at the same time two DK
> > instances,
> > and get two DK main windows, the main tree and the aux tree.
> > No magic, as DK uses a single fixed RC configuration file the above
> > can't be reentrant.
> >
> > Hope this could help,
> > Jean-François
> >
> >
> > PS: wish list: a great idea would be that future versions of DK
> > could also
> > accept the RC file on command line. That would allow starting with:
> >  digikam --database-directory /...
> > --configuration-file /....digikamrc and managing different systems
> > with shell aliases.
> >
> >
> > _______________________________________________
> > Digikam-users mailing list
> > [hidden email]
> > https://mail.kde.org/mailman/listinfo/digikam-users

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

Simon Cropper-3
Why would you do this manually? To great a chance to miss something.

Albums are just directory trees. Use a directory comparison tool like
FreeFileSync (Linux) or AllwaySync (Windows) to identify missing photos
or photos that do not match in size. Then look at them in Digikam.

http://sourceforge.net/projects/freefilesync/

http://allwaysync.com/

On 06/06/12 10:48, Claude Gélinas wrote:

> What I would like to see is to be able to open two differents albums at
> the same time in the same DK. Is it possible ? It would allow me to
> compare photo in the two album to see if they are the same or if some
> are missing etc.
>
>> Hmm, I had never thought of this until I read this thread, but would
>> assume it would work:
>> Can two users (e.g. userA and userB) be simultaneously running their
>> own, unique, instances of digikam?
>>
>> On 06/05/2012 06:29 PM, Jean-François Rabasse wrote:
>>>
>>> On Tue, 5 Jun 2012, John Stumbles wrote:
>>>
>>>> Is it possible to run more than one instance of digikam at the
>>>> same time on a machine, operating on different album trees and
>>>> with different databases?
>>>> ...
>>>> I can't see, in digikam's help manual, any way to invoke it with a
>>>> command line parameter to specify where to find its config files
>>>> or anything like that so I guess the answer is probably that it is
>>>> not possible, but I thought I'd ask anyway!
>>>
>>> Hello John,
>>>
>>> It's possible if you're not reluctant to a bit of shell scripting.
>>> (Or copy/paste my example below.)
>>> I do the same thing and have two « DK environments », with
>>> different DB and folders trees.
>>>
>>> DK can be run with a command line option specifying the directory
>>> which hosts the database. But DK also uses a configuration file and
>>> this one is
>>> unique, so tricking this requires some preconfiguration.
>>>
>>> 1. I have my standard (main) DK configuration set.
>>>
>>> 2. I wrote a shell script to run my auxiliary DK configuration
>>>     (It's named dkaux and is somewhere in my PATH, e.g. $HOME/bin)
>>>
>>> This script does the following :
>>> --
>>> #!/bin/bash
>>> #
>>>
>>> # Define aux base directory
>>> DBASE=/somewhere/on/disk
>>>
>>> # Save current RC configuration file
>>> DCONF=${HOME}/.kde4/share/config/digikamrc
>>> test -f ${DCONF}&&  mv ${DCONF} ${DCONF}.bak
>>>
>>> # Install aux RC file if exists
>>> test -f ${DCONF}.aux&&  mv ${DCONF}.aux ${DCONF}
>>>
>>> # Start DK on aux directory (and wait, no trailing&)
>>> digikam --database-directory ${DBASE} 2>  /dev/null
>>>
>>> # When done, restore RC configuration to standard
>>> mv ${DCONF} ${DCONF}.aux
>>> test -f ${DCONF}.bak&&  mv ${DCONF}.bak ${DCONF}
>>>
>>> # That's all !
>>> --
>>>
>>> Well, it works well (at least for me:-), and it's possible to
>>> extend the idea and write 2, 3 or more starting scripts, dkaux1,
>>> dkaux2, etc., with different base directories and RC files.
>>>
>>> The major problem is that you can't start at the same time two DK
>>> instances,
>>> and get two DK main windows, the main tree and the aux tree.
>>> No magic, as DK uses a single fixed RC configuration file the above
>>> can't be reentrant.
>>>
>>> Hope this could help,
>>> Jean-François
>>>
>>>
>>> PS: wish list: a great idea would be that future versions of DK
>>> could also
>>> accept the RC file on command line. That would allow starting with:
>>>   digikam --database-directory /...
>>> --configuration-file /....digikamrc and managing different systems
>>> with shell aliases.
>>>
>>>
>>> _______________________________________________
>>> Digikam-users mailing list
>>> [hidden email]
>>> https://mail.kde.org/mailman/listinfo/digikam-users
>
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users


--
Cheers Simon

    Simon Cropper - Open Content Creator / Website Administrator

    Free and Open Source Software Workflow Guides
    ------------------------------------------------------------
    Introduction               http://www.fossworkflowguides.com
    GIS Packages           http://www.fossworkflowguides.com/gis
    bash / Python    http://www.fossworkflowguides.com/scripting
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

jdd@dodin.org
In reply to this post by John Stumbles
Le 06/06/2012 02:38, John Stumbles a écrit :

> Another way would be to run one within a virtual machine or as another
> user on the system but that's fairly horrible too!
>

any solution by chrooting digikam?

jdd
--
http://www.dodin.net
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

Jean-François Rabasse
In reply to this post by carl33914


On Tue, 5 Jun 2012, Carl McGrath wrote:

> Hmm, I had never thought of this until I read this thread, but would assume
> it would work:

It does work, I'm beeing using that since almost one year.

> Can two users (e.g. userA and userB) be simultaneously running their own,
> unique, instances of digikam?

Never tried it but it seems to me it should.
The possible « collision » problem is the unique RC configuration file,
but it's unique only on a per user basis.
On a Unix system with two users, each one will have one RC file,
   /home/userA/.kde4/share/config/digikamrc
and
   /home/userB/...



On Wed, 6 Jun 2012, jdd wrote:

> any solution by chrooting digikam?

I don't think so. Chrooting won't solve the configuration file uniqueness
issue, except if you rebuild different home directories in different
chroot jails. And also have your collections directories accessible from
inside the chroot-ed subdir. A bit complicated...



On Wed, 6 Jun 2012, John Stumbles wrote:

> Thanks. Yes, I guessed one could do some smoke and mirrors like that, but
> then you have to keep stopping one instance and starting the other to swap
> between them (and digikam's pretty slow starting up with a large collection)
> so that would be pretty painful!

Right, you can't swap, you have to choose to work with either one setup
or the other, but not at the same time.

> Another way would be to run one within a virtual machine or as another
> user on the system but that's fairly horrible too!

:-) Horrible, yes.

Well, I really think the good way is to expect a future version of DK
with *ALL* configuration (database directory, RC parameters file, ...)
settable from command line options.
This would make the software independant of any user environment, and
creating shell aliases with different command lines could be trivial.
But as for today, I don't known what can be done around this issue
except some « bidouille » (in French:-)


Jean-François

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

Sveinn í Felli
In reply to this post by carl33914
Þann mið  6.jún 2012 08:14, skrifaði Jean-François Rabasse:

>
>
> On Tue, 5 Jun 2012, Carl McGrath wrote:
>
>> Hmm, I had never thought of this until I read this thread,
>> but would assume it would work:
>
> It does work, I'm beeing using that since almost one year.
>
>> Can two users (e.g. userA and userB) be simultaneously
>> running their own, unique, instances of digikam?
>
> Never tried it but it seems to me it should.
> The possible « collision » problem is the unique RC
> configuration file,
> but it's unique only on a per user basis.
> On a Unix system with two users, each one will have one RC
> file,
>   /home/userA/.kde4/share/config/digikamrc
> and
>   /home/userB/...

Has anyone tested running several Digikam instances
(separate users with different databases)?
--> kdesu -u username digikam
Reluctant to modify my setup (all users using the same DB).

Sveinn í Felli

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

John Stumbles
In reply to this post by carl33914
On 06/06/12 09:52, Sveinn í Felli wrote:

> Has anyone tested running several Digikam instances
> (separate users with different databases)?
> -->  kdesu -u username digikam
> Reluctant to modify my setup (all users using the same DB).

Just tried it on my Ubuntu 11.10 system where I have kdesudo:

        kdesudo -u otheruser digikam

works.

I guess I could set up another user account and set permissions to share
files as necessary. Still pretty fugly though! ;-)

--
John Stumbles                                    http://stumbles.org.uk
:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:-:
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

Jean-François Rabasse

On Wed, 6 Jun 2012, John Stumbles wrote:

> Just tried it on my Ubuntu 11.10 system where I have kdesudo:
>
> kdesudo -u otheruser digikam
>
> works.
>
> I guess I could set up another user account and set permissions to share
> files as necessary. Still pretty fugly though! ;-)

Having different users means different homes and configuration files,
and it becomes possible to run different instances at the same time.
(Something I can't do with my unique config file moves.)

But right, you'll have to face access rights problems to your images,
when owned/updated from different accounts.


I've just tried the following trick :
Concurrent config files, for the same account, can be replaced by
concurrent KDE config subdirectory.

Shell script 1 (named dk1)
#!/bin/bash
export KDEHOME=${HOME}/.K1
digikam

Shell script 2 (named dk2)
#!/bin/bash
export KDEHOME=${HOME}/.K2
digikam

etc.
Upon first launch of any of the above commands, creation is done for
~/.K1/share/config/digikamrc or ~/.K2/...
then configure DK, base folder for DB, collections, etc.
(The --database-directory option is useless for a default value can
be set at configuration level.)

Works. Still ugly, yes, but you remain the unique owner for all files,
and you can run several concurrent instances.

Jean-François

NB: must be shell script, not shell aliases, not to pollute the regular
environment for other KDE applications.
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

guenter
In reply to this post by John Stumbles
Am 06.06.2012 11:17, schrieb John Stumbles:

> On 06/06/12 09:52, Sveinn í Felli wrote:
>
>> Has anyone tested running several Digikam instances
>> (separate users with different databases)?
>> -->  kdesu -u username digikam
>> Reluctant to modify my setup (all users using the same DB).
>
> Just tried it on my Ubuntu 11.10 system where I have kdesudo:
>
>     kdesudo -u otheruser digikam

Well, [kde]su[do] is normally used to get Super User privileges.
In KDE it's possible to "switch user", so that you have running
concorrent sessions for each user. To switch between sessions, use
ctrl+alt+F7, ctrl+alt+F8...).


> works.
>
> I guess I could set up another user account and set permissions to share
> files as necessary. Still pretty fugly though! ;-)

I have always a "tester" account. With this I test dk also. A new user
account here (openSuSE) is created with group "users" where all new
users are in.
So I did now the following:
* I gave rw rights for group(users) for tester's dk directory
(/home/tester/Bilder):
sudo chmod -R g+w /home/tester/Bilder/*

* Now with
digikam --database-directory /home/tester/Bilder/
I could start a second instance of dk using the database of "tester".

HTH

_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users
Reply | Threaded
Open this post in threaded view
|

Re: Separate instances of digikam, different album trees, same machine?

carl33914
You could also create a unique new group, call it, e.g. digikam_users.
Add your logins to that group.

The edit permissions on your Archive directories to be in (owned by)
that group as well, rwx permissions for the group
I believe x permission on the directory makes it searchable by the group

On 06/06/2012 12:39 PM, guenter wrote:

> Am 06.06.2012 11:17, schrieb John Stumbles:
>> On 06/06/12 09:52, Sveinn í Felli wrote:
>> ins to that group
>>> Has anyone tested running several Digikam instances
>>> (separate users with different databases)?
>>> -->   kdesu -u username digikam
>>> Reluctant to modify my setup (all users using the same DB).
>> Just tried it on my Ubuntu 11.10 system where I have kdesudo:
>>
>>      kdesudo -u otheruser digikam
> Well, [kde]su[do] is normally used to get Super User privileges.
> In KDE it's possible to "switch user", so that you have running
> concorrent sessions for each user. To switch between sessions, use
> ctrl+alt+F7, ctrl+alt+F8...).
>
>
>> works.
>>
>> I guess I could set up another user account and set permissions to share
>> files as necessary. Still pretty fugly though! ;-)
> I have always a "tester" account. With this I test dk also. A new user
> account here (openSuSE) is created with group "users" where all new
> users are in.
> So I did now the following:
> * I gave rw rights for group(users) for tester's dk directory
> (/home/tester/Bilder):
> sudo chmod -R g+w /home/tester/Bilder/*
>
> * Now with
> digikam --database-directory /home/tester/Bilder/
> I could start a second instance of dk using the database of "tester".
>
> HTH
>
> _______________________________________________
> Digikam-users mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-users
_______________________________________________
Digikam-users mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-users