You are not logged in.
I made a nice little script that alters my lock screen and desktop wallpaper from time to time, plus some related configuration in one of my apps to give it a more unified look. I've tested it pretty thoroughly so I know the code's doing what it should do - at least using sudo in the terminal (which defeats the whole point of writing the script in the first place). For reference, I'm using Openbox with nitrogen and have tried these steps already:
- Moved script to /usr/local/bin so it's in $PATH
- Made the thing executable (sudo chmod u+x /usr/local/bin/script.sh)
- Added these lines to Openbox's autostart file
pkexec seasons.sh &
nitrogen --restore &
- Restarted PC
Annoyingly, this isn't working (the desktop wallpaper reverted to the previous one and neither of the other things changed). I tried some troubleshooting steps like running sudo script.sh so I at least know the thing's in $PATH, but most of the information I've found online regarding my current dilemma is contradictory or outdated so I'm not quite sure what to do here.
Offline
Do these modify the user session? If so why does it need to be run with elevated permission?
Would starting it as a systemd service work? (Hence the question about changing the user session)
Can you share your script?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
In the highly unlikely event that changing the lock screen & wallpaper needs root permissions you will need a graphical polkit authentication agent running to ask for the password.
Para todos todo, para nosotros nada
Offline
You'll also have to make sure the proper display and xauth (or wayland, perhaps dbus) environment is imported.
stat /usr/local/bin/seasons.sh # w/ the move/chmod you might have caused root:users/744
cat /usr/local/bin/seasons.sh
Offline