LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 04-03-2006, 04:50 PM   #1
mago
Member
 
Registered: Apr 2004
Location: Costa Rica
Distribution: slack current with 2.6.16.18 (still off the hook)
Posts: 284

Rep: Reputation: 33
Crontab not working for user


Hi,

I want something quite simple, is just to configure the fbsetbg to change randomly the background of my desktop so I just used this:

Code:
*/5 * * * * /usr/X11/bin/fbsetbg -r path_to_the_wallpapers
The folder containing the images are owend by the user and has proper rights, as a mater of fact if I run the command through a console I have no problem but the crontab seems to be ignored, no error mail no nothing.

There is a crontab.# inside /var/spool/crontab and there is a specific one on /var/spool/crontab/crontabs/Xuser

Any ideas?

Running slack 10.2 by the way.
 
Old 04-03-2006, 05:56 PM   #2
fotoguy
Senior Member
 
Registered: Mar 2003
Location: Brisbane Queensland Australia
Distribution: KirraMail Live Email Server
Posts: 1,279

Rep: Reputation: 61
Cron is run by root so you probably nned to specify the user you want to run the cron job as maybe try:

*/5 * * * * username /usr/X11/bin/fbsetbg -r path_to_the_wallpapers

Just replace username with the user you are trying to run as, I think by default if you don't specify a user it runs as root.

Also you might have a /etc/crontab.deny file, if you have this file make sure the name of the user you a trying to run as is not in this.
 
Old 04-03-2006, 05:59 PM   #3
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 292Reputation: 292Reputation: 292
No that shouldn't be necesary. Each user has his/her own cron. But I don't understand the */5 - is that for every 1/2 hour? Maybe try 0,30 if so

You could also try redircting messages to a log and seeing what errors are occuring

Last edited by dive; 04-03-2006 at 06:03 PM.
 
Old 04-03-2006, 06:26 PM   #4
mago
Member
 
Registered: Apr 2004
Location: Costa Rica
Distribution: slack current with 2.6.16.18 (still off the hook)
Posts: 284

Original Poster
Rep: Reputation: 33
Actually */5 is so it will change every 5 minutes.


I'll try adding the user, thanks for the suggestion.
 
Old 04-03-2006, 06:26 PM   #5
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 292Reputation: 292Reputation: 292
I just tried this (rather neat idea imo) and this is output of the log:

/usr/X11/bin/fbsetbg: line 169: xmessage: command not found

Why xmessage is being called up I've no idea. Perhaps another background setting app would work?
 
Old 04-03-2006, 09:48 PM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,211

Rep: Reputation: 292Reputation: 292Reputation: 292
I got it to work by making a small script randbg:

#!/bin/bash
export DISPLAY=:0.0
/usr/X11/bin/fbsetbg -r ~/.fluxbox/backgrounds/

then with crontab -e:

0,30 * * * * /home/dave/scripts/randbg 1>/dev/null 2>&1

Obviously edit this to your paths, time interval etc.

Last edited by dive; 04-03-2006 at 09:49 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
crontab not working durgap Linux - General 6 09-01-2005 02:38 PM
problems setting the user in crontab p.gaic Linux - Software 1 07-14-2005 11:07 PM
crontab nor working navaladi Mandriva 11 01-17-2005 06:58 AM
crontab not working subaruwrx Linux - Newbie 8 08-17-2004 09:12 PM
Crontab not working Neorio *BSD 1 12-02-2003 07:34 PM


All times are GMT -5. The time now is 11:59 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration