After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 323966 - Multi-user access to the same database
Multi-user access to the same database
Status: RESOLVED FIXED
Product: f-spot
Classification: Other
Component: General
0.1.x
Other Linux
: Normal enhancement
: ---
Assigned To: F-spot maintainers
F-spot maintainers
Depends on:
Blocks:
 
 
Reported: 2005-12-13 11:59 UTC by Guillaume Savaton
Modified: 2007-02-19 19:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Guillaume Savaton 2005-12-13 11:59:14 UTC
Distribution/Version: Debian

Currently, F-Spot stores its database in the current user's home folder.

In a desktop environment shared by several users (e.g. me, my wife and my
children), it may be useful to allow all users to access the same photo album.

Currently, I have resolved the problem by replacing the file
.gnome2/f-spot/photos.db in each user's home folder by a symbolic link to a a
photos.db file in a shared folder.

A cleaner solution would be appreciated.
Comment 1 Gabriel Burt 2005-12-14 23:18:59 UTC
I've thought about this feature before too.  Since many other apps (Kodak's
album software on Windows at least) work like this, it is possible we're not
doing what users expect.

How to do this in a way that makes it easy to meet users' expectations but
allowing people to keep their photos private or world-read-only is important too.
Comment 2 Brian J. Murrell 2005-12-19 14:48:18 UTC
How about a simple "checkbox" kinda of widget that says "Share this photo import with others" and then storing the database in the root of the photo storage.  When another user goes to import the same photos, f-spot will find the db there and use it's information instead of generating a new database.
Comment 3 Bengt Thuree 2006-05-14 11:05:16 UTC
Similar but not quite bug in #331953
Comment 4 Bengt Thuree 2006-06-13 05:34:29 UTC
I agree with comment #2, about keeping the photos.db under the root of the photos directory. Makes it a lot easier to backup your photos, as well as arrange for multiuser access
Comment 5 Ruben Vermeersch 2006-06-14 14:49:08 UTC
We need some way of making sure people don't delete the strange unreadable "photos.db" file then though.

I can see it happen, don't tell me I didn't warn everybody! :-)
Comment 6 Brian J. Murrell 2006-06-14 15:01:48 UTC
(In reply to comment #5)
> We need some way of making sure people don't delete the strange unreadable
> "photos.db" file then though.
> 
> I can see it happen, don't tell me I didn't warn everybody! :-)

People can also delete /sbin/init or a myriad of things in ~.  We can't really stop people from being stupid.

If f-spot is successful though, it will prevent most people from even wanting to grub through the photos directory in the first place, so they won't even see the file.  I'm not sure, does f-spot provide an "open with..." context menu (with the standard gnome entries for images) for photos to satisfy a user's requirement to grub through the photos directory with nautilus to manipulate photos?

F-spot should be _the_ "photo tool" allowing you do do what you can in f-spot or open in another viewer, or with the gimp, or whatever else has registered itself with gnome to handle impage/*.

To stop the truely curious and ignorant (what a combination) the DB could be a dot-file (.photos.db).
Comment 7 Thomas Szukala 2006-06-21 12:28:47 UTC
Another way would also be to store the images directly into a mysql database. With that you would be able to provide a limited (only read, only store, dont delete, dont change, etc.) image access to a specific user group. You can also enable the users to access their images from whatever place they are (thumbnails should also be stored seperatley). It wouldnt be limited to your LAN. 
And you can hide the photos.db completley in a database. Therefore you wouldnt be able to delete this in error.

Another advantage would also be that you can use your fileserver in the cellar to store your images. Redundant images would be prevented, as multiple user do all access the same image for viewing.

You could also think of providing a php/perl/etc module providing access to this database if you want to be able to access the images through a website. No need to export the images to your webserver.
Comment 8 Brian J. Murrell 2006-06-21 12:36:18 UTC
(In reply to comment #7)
> Another way would also be to store the images directly into a mysql database.

OMG!  Please, let's not contribute to mysql abuse.

I don't want my images tied up in a database that I have to use a stupid database client to get access to them thank-you very much.

> And you can hide the photos.db completley in a database.

So put a database into a mysql database.  ~sigh~

Sorry come off sounding so strongly about this, but this would be a complete disater, IMHO.
Comment 9 Andrew Ruthven 2006-08-02 06:58:58 UTC
In the short term I'm going to use the symlink method that the original requestor used to allow my wife and I to share tags.

Is there likely to issues we both use f-spot at the same time?

It is worth considering that the ability to share tags might help the adoption of f-spot in work environments that need to share photos (and photo information).
Comment 10 Yuval Drori 2006-09-12 14:01:19 UTC
I second the motion for a "family" option.
It even rhymes...
Comment 11 Stephane Delcroix 2007-02-13 13:10:12 UTC
This is fixed for months now ! use the -b commandline option
Comment 12 Brian J. Murrell 2007-02-19 18:51:24 UTC
(In reply to comment #11)
> This is fixed for months now ! use the -b commandline option
> 

Uhm.  Not quite.  Simply having a command line option to point to a database is hardly the solution.  A more complete solution would:

a) allow the specification of (multiple) databases as a GUI preference
b) resolve symlinks before storing information in the database
c) allow (maybe sqlite3 does this already) multiple people to have the database open and perform fine grained locking when needed.

as for (b) the situation is this: a common directory where photos are stored by everyone (with permissions according), say /data/photos and each user (or the system administrator) points their ~/Pictures to /data/photos.  The problem that arises from this is that when user "brian" imports, all of the pathnames in the database are ~brian/Pictures/<photos> and then when user "alice" wants to access the common database it tells her the path to pictures is ~brian/Pictures/ which will give her access problems.  If however the path in the database where /data/photos/<photos> (as would be result if the symlink were resolved) then all would be peachy.
Comment 13 Brian J. Murrell 2007-02-19 19:07:22 UTC
An alternative to the problem posed in (b) is to make the directory field in the database relevant to the path that the photos are in.

In fact, it is my opinion that the photos.db files belong in the dir that the photos are in (in the root of a tree -- allowing subdirs for a single database if desired) and that f-spot should be configurable to look in multiple dirs for photos and their associated databases.

This would have the side benefit of allowing a user to share their entire database of photos complete with tags and so on simply by allowing access to the dir to another user and informing them of the dir.