Multiple Shotwell libraries

How does one set up Shotwell for use with multiple photo libraries, e.g.:

  • Shotwell library at ~/Shotwell-1 of pictures in ~/Pictures-1
  • Shotwell library at ~/Shotwell-2 of pictures in ~/Pictures-2

such that:

  • Running “shotwell -d ~/Shotwell-1” will watch ~/Pictures-1 for new photos
  • Running “shotwell -d ~/Shotwell-2” will watch ~/Pictures-2 for new photos

As far as I can tell, the library location in preferences is stored in Gnome settings at /org/yorba/shotwell/preferences/files/import-dir. Is there a way to override the import-dir on a per-library basis, so that Shotwell can watch the correct directory for new photos depending on which library is open?

With the current stable release, this does not work since the library location is in the global configuration - you could do a hack that changes the gsetting before launching that shotwell and pointing it to a different datadir, but that is ugly.

With shotwell unstable, you can just use profiles

  1. From the commandline

    • shotwell -i Shotwell-1 -d ~/Shotwell-1 --create
    • after the first start select Pictures-1 as your library folder in settings
    • shotwell -i Shotwell-2 -d ~/Shotwell-2 --create
    • after the first start select Pictures-2 as your library folder in settings
    • You can then run shotwell -i Shotwell-1 or shotwell -i Shotwell-2 to get the according session
  2. From GUI

    • Run shotwell --profile-browser
    • Chose “Create new Profile” and add the details you need
    • Repeat for the second profile
    • Either start shotwell as above or by selecting it from the profile browser
    • The profile editor is also available in the settings

Thank you for the reply. That looks very promising.

I installed the nightly build as a Flatpak, and I can access the profile browser, but for some reason Shotwell lacks the necessary permissions to access anything other than ~ and ~/Downloads. The terminal reports:

“(shotwell:2): GVFS-WARNING **: 07:19:04.810: The peer-to-peer connection failed: Error when getting information for file “/run/user/1001/gvfsd”: No such file or directory. Falling back to the session bus. Your application is probably missing --filesystem=xdg-run/gvfsd privileges.”

I have tried ~$ sudo flatpak override --filesystem=xdg-run/gvfsd org.gnome.Shotwell followed by ~$ flatpak run org.gnome.Shotwell, as well as ~$ flatpak fun --filesystem=xdg-run/gvfsd org.gnome.Shotwell (as suggested by Google search results for that error message) with no change.

This is literally the first time I have ever used Flatpak, so it is likely just be a product of my total inexperience. But any quick suggestions to get it the necessary permissions would be welcome.

“(shotwell:2): GVFS-WARNING **: 07:19:04.810: The peer-to-peer connection failed: Error when getting information for file “/run/user/1001/gvfsd”: No such file or directory. Falling back to the session bus. Your application is probably missing --filesystem=xdg-run/gvfsd privileges.”

I think this is realated to automatic unmount of devices, not generic access to your folders, but might be a bug

I recommend using flatseatl (Flatseal | Flathub) to configure wider access to your folders.

The very restricted access to your host system is intentional for the nightlies so that it cannot cause too much damage if it does weird things

Thank you! Flatseal was exactly what I needed.

For reference, I used Flatseal to add permissions under Shotwell > Filesystem > Other files to access ~/Pictures-1, ~/Pictures-2, ~/Shotwell-1, and ~/Shotwell-2. Then I created two Shotwell profiles, Test-1 with library directory /home/username/Pictures-1 and data directory /home/username/Shotwell-1, and Test-2 similarly configured. Shotwell stills generate the GVFSD error described above in the terminal, but it does appear to work correctly now.

The profiles feature looks promising. I’m looking forward to experimenting with it.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.