LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 06-04-2010, 01:46 AM   #1
sevengraff
LQ Newbie
 
Registered: Dec 2002
Location: California, USA.
Distribution: Mint
Posts: 15

Rep: Reputation: 0
using cron to change my wallpaper


Hello, I am not understanding cron correctly. I wrote a perl script to choose a random image and use feh to set it as my wallpaper. When I run the script from the terminal it runs fine. When I added it to my crontab to run every minute it does not change the wallpaper. However, I had the script print some output and redirect it to a file, so I know cron is running the script every minute like it should.

My crontab: http://pastebin.com/YaDHgBai
My script: http://pastebin.com/baB1ULPY
wallpaper.log: http://pastebin.com/YS0dqNyh

I'm running Mint Linux 8 and using wmii as my window manager. I know it seems silly to worry about the wallpaper with a tiling window manager but that's just how I roll.

I'm having other problems with cron but I'll save that for later.
 
Old 06-04-2010, 01:58 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Servers: Debian Squeeze and Wheezy. Desktop: Slackware64 14.0. Netbook: Slackware 13.37
Posts: 8,528
Blog Entries: 27

Rep: Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176Reputation: 1176
cron jobs run with neither controlling terminal nor an X display so your script will need to tell feh which X display to use. If this is a single user workstation and the cron job is running as the usual user the solution may be as simple as setting environment variable DISPLAY to 'localhost:0.0'
 
  


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
Can't change wallpaper w/ openbox / how to change mousespeed johnnyxxxcakes Linux - Newbie 14 05-24-2009 07:11 PM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U Suse/Novell 11 01-04-2007 01:57 AM
Wallpaper Won't change Rick069 Linux - Newbie 3 04-16-2006 01:03 PM
How to change wallpaper pacranch Amigo 9 06-27-2005 01:30 PM
change wallpaper TravisB Linux - General 4 10-23-2002 05:57 PM


All times are GMT -5. The time now is 08:10 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