Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-EYOU-ORIGINAL-IP: 202.106.86.73 X-EYOU-ENVELOPE-MAILFROM: lucifer AT tsinghua DOT org DOT cn Date: Wed, 20 Aug 2003 14:12:52 +0800 From: Lucifer To: cygwin AT cygwin DOT com Subject: change wallpaper periodly by cron? Message-Id: <20030820140025.325F.LUCIFER@tsinghua.org.cn> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I wrote a simple program to change my desktop wallpaper: /* setwall.c */ #include void usage() { printf("Usage:\n\tsetwall \n\n"); } int main(int argc, char **argv) { int err; if (argc != 2) { usage(); return 1; } if (SystemParametersInfo(SPI_SETDESKWALLPAPER, 0, argv[1], SPIF_UPDATEINIFILE | SPIF_SENDWININICHANGE)) { printf("Wallpaper has been changed to: %s\n", argv[1]); return 0; } else { err = GetLastError(); printf("Error: %lu\n", err); return err; } } It works well when I run it under cygwin console: the wallpaper changes successfully. However, when I put it in my crontab (I want to change my desktop apperance periodly :p), the wallpaper doesn't change. The log read: "Error: 1459", which means "This operation requires an interactive window station." Is this a limitation of cron? How can I resolve it? Thanks in advance. -- Lucifer -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/