Open MDabrowski9LD opened 5 years ago
What OS, version, and Node.js version?
Linux mint 18 (cinnamon and sonya i think), node 11.10.1. Wallpaper installed globally, NODE_PATH pointing to node_modules where it is installed.
I use absolute path to image.
Added #! /usr/bin/node
to the script and calling it only by name.
I think I got it. Cron has limited env and in order to set wallpaper some env variables have to be exported. I found this https://askubuntu.com/a/198508 post and adapted to my case. It worked.
Would you be willing to submit a PR to the readme with a tip about the above? I'm thinking a new Tips
section at the bottom.
Sure, how about I put my solution for daily wallpaper changer in examples folder ?
When invoking simple script that should change wallpaper with sudo ie:
sudo /abs/path/script.js
or from cron* * * * * /abs/path/script.js
wallpaper stays the same. When called manually and without sudo/cron it works as intended.Any ideas what might be wrong?