Subject: Re: Switching wm background using cron?
To: None <netbsd-users@NetBSD.org>
From: Michael Parson <email@example.com>
Date: 08/26/2005 14:33:56
On Fri, Aug 26, 2005 at 09:26:59PM +0200, Jan Danielsson wrote:
> Hello all,
> I have written a small script which changes WindowMaker's background
> to an image chosen randomly from a directory. The script calls
> "wmsetbg". So, I thought I'd set up a cron job to change picture at a
> certain interval. This worked good, until I quit X (obviously) since
> wmsetbg no longer could communicate with WindowMaker.
> The script is written in Python.
> How do I find out if WindowMaker is running from my script?
> Or is there some other solution? (Like modifying cron when
> WindowMaker starts/stops - seems highly unstable, though)?
Modify your cron job to check for a file that only exists when you're
Modify how your WindowMaker is started/stopped to touch this file and
remove it when you log off.
Cron job will run, if that file exists, it will change your bg image, if
not, it will exit and wait for it's next run.