SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2012-01-02 00:29:47

2ManyDogs
dv#!
From: elsewhere
Registered: 2011-11-22
Posts: 1,346

[solved]can't set wallpaper with cron in testing

I have a script that selects an image at random from my wallpaper folder and uses Nitrogen to set the desktop background. It runs fine from the command line, it runs from autostart, it even runs from cron on my sid box. But for some reason it will not set the wallpaper on my testing box (same box, different partitions). I know the script is running at the appropriate time, because I log the time it runs to a file. Same script, same crontab entry, different results. What am I missing?

Here is the crontab entry:

*/10 * * * * DISPLAY=:0.0 /home/bsh/.scripts/random-wallpaper

and here is the script

#!/bin/bash

# script to randomly set dekstop background from files in a directory

# directory containing images
DIR="/home/bsh/images/wallpapers"

# select a random jpg from the directory
PIC=$(ls $DIR/*.jp* | shuf -n1)

# use nitrogen to set wallpaper
nitrogen --set-zoom-fill $PIC

# DEBUG log the date/time when this script runs
#date >>/home/bsh/cron.log

Last edited by 2ManyDogs (2012-01-02 01:23:34)


Be eggsalad to each other.

Offline

Be excellent to each other!

#2 2012-01-02 00:44:00

2ManyDogs
dv#!
From: elsewhere
Registered: 2011-11-22
Posts: 1,346

Re: [solved]can't set wallpaper with cron in testing

So the only thing I could think of that was different between the two installs was that the testing install uses GDM and the sid box uses lightdm, so I installed lightdm on the testing box and the wallpaper changes now. But just to make sure I removed lightdm and re-enabled GDM and it works with GDM now too. I have no idea why.


Be eggsalad to each other.

Offline

#3 2012-01-08 13:40:51

SabreWolfy
#! Die Hard
Registered: 2009-03-09
Posts: 1,285

Re: [solved]can't set wallpaper with cron in testing

Thanks, this worked for me too smile


Support #!Waldorf • Debian sid • Xubuntu • siduction • Peppermint • OpenBox • Xfce • LXDE •

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo