Sharing Shotwell in CentOS 7

Sharing Shotwell in CentOS 7

In CentOS 7, the database for shotwell is kept under the users home directory in the 
~/.local/share/shotwell/data directory along with a backup.  The thumbnails are stored the users home directory in the in the ~/.cache/shotwell/thumbs directory.

To share these directories between multiple users on my system, I created a group called "shotwell":
groupadd -r shotwell

I added each user to the group:
useradd -aG shotwell keith
useradd -aG shotwell wright

After importing all the multimedia possible into Shotwell, I backed up the data to make it easy to extract to the destination location:

cd ~/.local/share/shotwell/
tar cvzf shotwell-database.tar.gz  data/
cd  ~/.cache/shotwell/
tar cvzf shotwell-thumbs.tar.gz thumbs/

Next, the data was extracted to the destination location:

cd /usr/local/shotwell
tar xf shotwell-database.tar.gz
tar xf shotwell-thumbs.tar.gz

Make sure the permissions on the new directories will allow members of the group to write to the directories and files, and with setgid (g+s) make sure that they will own any new files created:

cd /usr/share/shotwell/
chgrp shotwell data
find data -type d -exec chmod 775 {} \;
find data -type f -exec chmod 664 {} \;
chgrp shotwell thumbs

find thumbs -type d -exec chmod 775 {} \;

find thumbs -type f -exec chmod 664 {} \;
chmod g+s data thumbs

For each user, you need to either remove their previous database and cache or rename these directories. Then, you can create a symbolic link to the shared directory for the database (data) and the thumbnails (thumbs).

For the first user:

cd ~keith/.local/share/shotwell/
mv data data-orig # or rm data
ln -s /usr/share/shotwell/data data

cd ~keith/.cache/shotwell/
mv thumbs thumbs-orig
ln -s /usr/share/shotwell/thumbs thumbs

For the second user:

cd ~wright/.local/share/shotwell/
mv data data-orig # or rm data
ln -s /usr/share/shotwell/data data

cd ~wright/.cache/shotwell/
mv thumbs thumbs-orig
ln -s /usr/share/shotwell/thumbs thumbs

Etc... for each user

Shotwell Sumary

The first time you have set up the directories, make sure you logout and log back in before trying to use shotwell again.  Also, shotwell is not designed for multiuser use, so do not allow multiple users to run the program at the same time.

It can take a long time to import your multimedia with shotwell. It may crash, but if you restart it, it will continue.  If you don't try and import too much, it seems to help, for example, going by month of the year you are importing instead of trying to import the whole year.  

No comments:

About Me - WrightRocket

My photo

I've worked with computers for over 30 years, programming, administering, using and building them from scratch.

I'm an instructor for technical computer courses, an editor and developer of training manuals, and an Android developer.