|
OpenBSD General Other questions regarding OpenBSD which do not fit in any of the categories below. |
|
Thread Tools | Display Modes |
|
|||
crontab
hi ,guys ,i want change my wallpaper in every 2 minutes,so i use simple script named wallpaper.sh
Code:
#!/bin/sh feh --bg-fill --no-fehbg `find /home/zero/picture -type f -exec echo '{}' \; | sed -n "$(($RANDOM%$(ls /home/zero/picture | wc -l)+1))p"` Code:
# change wallpaper every 2 mintutes SHELL=/bin/sh */2 * * * * /home/zero/scripts/wallpaper.sh thanks guys |
|
||||
Why not just use
Code:
feh --bg-fill --nofehbg --randomize ~/picture/* Code:
export DISPLAY=:0 Code:
while true; do feh --bg-fill --nofehbg --randomize ~/picture/*; sleep 120; done &
__________________
Are you infected with Wetiko? Last edited by Head_on_a_Stick; 29th December 2020 at 10:43 AM. Reason: use export instead of env(1) |
|
|||
thank you guys ,it works
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Editor for crontab? | beavers | OpenBSD General | 3 | 14th February 2018 05:10 PM |
reboot FreeBSD box with crontab | mfaridi | FreeBSD General | 1 | 15th October 2011 02:37 AM |
default crontab | fbroce | OpenBSD Installation and Upgrading | 13 | 13th September 2010 09:20 PM |
Crontab won't run script | Petrocelli08 | FreeBSD General | 4 | 7th March 2009 04:19 AM |
Crontab not working | beandip | FreeBSD General | 6 | 6th August 2008 08:33 PM |