Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get always the same picture set at startup with randomize #725

Open
ChoppinBlockParty opened this issue Oct 17, 2023 · 2 comments
Open

Get always the same picture set at startup with randomize #725

ChoppinBlockParty opened this issue Oct 17, 2023 · 2 comments

Comments

@ChoppinBlockParty
Copy link

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.

@Ferada
Copy link
Contributor

Ferada commented Oct 18, 2023

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?

@ChoppinBlockParty
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants