feh icon indicating copy to clipboard operation
feh copied to clipboard

Get always the same picture set at startup with `randomize`

Open ChoppinBlockParty opened this issue 1 year ago • 3 comments

I have a feh command run on startup by my window manager:

feh --no-fehbg -Z --recursive --bg-fill --randomize ${SCRIPT_DIR}/wallpapers

I wonder why it always set the same picture. I have 4 pictures in this directory. When I run the same command manually multiple times it does produce random results.

Thank you.

ChoppinBlockParty avatar Oct 17 '23 20:10 ChoppinBlockParty

There's an srandom call at the start of main.c, which incorporates the process' PID and current time. Very unlikely that that one always gets the same input. Is there a chance that feh isn't actually being invoked on startup and it's still using the previously set wallpaper?

Ferada avatar Oct 18 '23 05:10 Ferada

I saw that as well. Still getting the same wallpaper over and over again, more than 20 times already.

ChoppinBlockParty avatar Oct 18 '23 10:10 ChoppinBlockParty

Hi, can you confirm if this occurs only with --bg-fill? because for me, just viewing the images with the flags --no-fehbg -Z --recursive --randomize always produces a random image.

wwsmiff avatar Jul 20 '24 04:07 wwsmiff