Task

To refresh Shotwell thumbnails cache.

Description

Shotwell create thumbnail for every picture it display so when you scroll through gallery it will rebuild it. Problem is when storage is slow (SMB over WiFi) it takes some time.

Idea

Force Shotwell to scroll all gallery

Solution

Find id of Shotwell window:

jaqb@linux:~$ xdotool search --onlyvisible --name shotwell
2098671
2099432

As you can see sometimes there are two of them (I don't know why)

Switch to that window an send Page_Down / Next key check.

jaqb@linux:~$ xdotool windowactivate 2099432 --sync  key Next

Repeat many many (1000) times but give some time (22s) to refresh all visible pictures. I've prepared bash script:

jaqb@linux:~$ cat ./shotwell-cache-refresh.bash
#!/bin/bash


xdotool windowactivate --sync $1
for x in `seq 1000`; do
        sleep 22
        xdotool key Next
done
EOF

After confirmation which identifier is good (2099432) you can run:

jaqb@ubuntu-16:~$ ./shotwell-cache-refresh.bash 209943

and do something more interesting than just typing Page_Down key for more than 6h.

Ten kto umie pisze kod, ten kto nie umie pisze książki..., albo blog.

Pon Wt Śr Czw Pt So N
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30            
eZ Publish™ copyright © 1999-2025 eZ Systems AS