SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I just downloaded a boatload of Tux wallpapers and I was wondering if there was a program that would switch the wallpaper every X minutes.
I was thinking it might be done in with a cron job but as a linux noob I wouldn't know where to start.
My window manager is XFCE 4.2.0 and my distro is Slackware 10.1, thank you.
I started reading the XFCE manual and found out that you open up the "Desktop Settings" and under "Image" you select "New List..." you can make a list of backgrounds. Then you can run "xfdesktop -reload" it will pick a random background from the list.
So now I need to know how I can run that command every X minutes (without having to start a bash script every time I login)
you start editing crontab, basically you'll need to put:
Code:
*/12 * * * * xfdesktop -reload
Or put that line in a file and run: crontab file
PS: Running the script everytime you login is basically the same crontab does (my script sleeps 10 minutes so it changes background every ten minutes).. but well.. you want to use crontab
I've added "*/12 * * * * xfdesktop -reload" in my crontab file using "crontab -e" and cron is running (see above) but nothing is happening.
What Am I missing? Do I need to put my self in the crontabs allow list, if so where is it at?
When I login I can use su to become root and then type crond and it will work, but if crond is already running (above 2 posts) why is it not working?!?
Did you try using xfdesktop with full path, maybe crontab doesn't load all enviroment values when running commands.
I've checked if crontab -e added the command to my running cron daemon within my user and it does.
Add this line to crontab -e: */12 * * * * echo "testing" > /home/youruser/crontest
If you wait 10 minutes and see a file called crontest in your home directory then the problem is xfdesktop, maybe you need to call it differently.
Oh, and when you add that command, take a look as root (others users can't) at /var/spool/cron/crontabs/ there you should see a file that has your user name and if you open it it has the crontab commands (adding the command there won't work).
crond -l10 makes crontab to be more verbose when showing errors, you can see that in it's man page.
PS: Are you saving the file when using crontab -e right? I don't want to offend, sometimes it happens
I added the echo testing thing and it created the file.
yes I can see /var/spool/cron/crontabs/<username> and yes im saving it with "crontab -e"
It's really weird tho, if I put in "/usr/bin/xfdesktop -relaod" or "xfdesktop -reload" it wont work unless I manually start crond, why is that?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.