You are not logged in.
^ if the desktop image is all you're using your Conky for, couldn't you have a cron job call changer.sh?
Be excellent to each other, and...party on, dudes!
BunsenLabs Forum Rules
Tending and defending the Flame since 2009
Offline
if the desktop image is all you're using your Conky for, couldn't you have a cron job call changer.sh?
Will cron require less comp resources than Conky? Also, cron does not like me. I have set-up various configurations, for example, * * * * * /home/me/bin/changer.sh in /var/spool/cron/crontabs/me. But nothing happens. Tried sudo /etc/init.d/cron restart. Got [ ok ] Restarting cron (via systemctl): cron.service. What am I missing?
Last edited by seppalta (2016-04-02 07:07:33)
Offline
Split to it's own thread.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I'm not sure if any of this is necessary, and there's probably a less hacky way to solve this, but my cron job to switch wallpapers needs to export the display being used before running the wallpaper switch script.
This is what I've done:
I put this in my .bashrc
echo "$DISPLAY" > $HOME/.current_display
and this on my crontab (with crontab -e as a normal user):
*/5 * * * * (export DISPLAY=`cat /home/pingu/.current_display`; /home/pingu/scripts/wallpapers.sh)
edit: I didn't read the OP from the other thread, but I assumed it's about changing wallpapers. If it's not the case, sorry...
edit2: Also, you can take a look at your /var/log/cron.log entry to see if the script is being executed, or if there's some error message or something like that.
Last edited by pingu (2016-04-03 11:37:58)
"Chuck Norris can compile syntax errors."
Offline
Thanks, Pingu. Your procedure did the job! It appears that all that is needed is to call up the display:
* * * * * DISPLAY=:0.0 /home/me/bin/changer.sh
Last edited by seppalta (2016-04-03 04:55:05)
Offline
Thanks, Pingu. Your procedure did the job! It appears that all that is needed is to call up the display:
* * * * * DISPLAY=:0.0 /home/me/bin/changer.sh
yes, if you always use DISPLAY=:0.0 that would do it. but if you occasionally startx on display 1 (e.g. I use 0 for openbox and 1 for i3), then the script will fail if you hardcode the display variable.
Last edited by pingu (2016-04-03 09:21:06)
"Chuck Norris can compile syntax errors."
Offline