Urza9814 Posted July 30, 2004 Report Share Posted July 30, 2004 (edited) Is there any program I can use to change my wallpaper based on the time of day? I want to have one thing in the morning, then like, when it gets dark...around then...change it to another, then change back while I'm asleep. Is there any program that will do that? And if for some reason there isn't (though it seems like it'd be really easy...) does anyone know if the C++ 'system()' command works the same way in Linux as in Windoze? Edited July 30, 2004 by Urza9814 Quote Link to comment Share on other sites More sharing options...
devries Posted July 30, 2004 Report Share Posted July 30, 2004 Do you use KDE? Look in the desktop settings--> Background. :) Quote Link to comment Share on other sites More sharing options...
Urza9814 Posted July 30, 2004 Author Report Share Posted July 30, 2004 No, I CAN'T use KDE...way too slow... Currently using Fluxbox, but I'd like somethign that'll work on any of 'em Quote Link to comment Share on other sites More sharing options...
Jet2k5 Posted July 30, 2004 Report Share Posted July 30, 2004 Don't know of any program but that will be a very cool Idea! -Luis Quote Link to comment Share on other sites More sharing options...
Urza9814 Posted July 30, 2004 Author Report Share Posted July 30, 2004 (edited) aight then...I'll hop over to the cpp-home forums for my inquiry about what changes in Linux and let you know when (or if) I finish this. Shouldn't take too long, but a friend's here right now, so I'll have to do it in an hour or 2... ...I was kinda hoping you wouldn't know of a prog to do it actually...I haven't written any code in a few months... :D Edited July 30, 2004 by Urza9814 Quote Link to comment Share on other sites More sharing options...
fissy Posted July 30, 2004 Report Share Posted July 30, 2004 the program fbsetbg appears to set the background, so if you want it to change at a particular time of day, you could set a daily cron job to run fbsetbg with the correct parameters (like the background file). Quote Link to comment Share on other sites More sharing options...
Urza9814 Posted July 30, 2004 Author Report Share Posted July 30, 2004 (edited) ...but that's less fun... :P ...and I don't know how to do it...but... Edited July 30, 2004 by Urza9814 Quote Link to comment Share on other sites More sharing options...
Urza9814 Posted August 1, 2004 Author Report Share Posted August 1, 2004 I think I've got this thing nearly done (Had a lotta problems in the beginng)...but I got one problem... How do you set the background from a console window? Quote Link to comment Share on other sites More sharing options...
Jet2k5 Posted August 1, 2004 Report Share Posted August 1, 2004 Hmm, First open up console and type in fbsetbg -c /path/to/wallpaper.jpg You dont' have to have the ' -c ' but if you read on Iphitus FAQ he explain why you need it. -Luis Quote Link to comment Share on other sites More sharing options...
bvc Posted August 2, 2004 Report Share Posted August 2, 2004 -there's chbg http://gnomesupport.org/forums/viewtopic.p...&highlight=chbg -see what this is? :unsure: http://gnomesupport.org/forums/viewtopic.p...light=wallpaper -you could write a script and use the sleep command -you could modify aru's script http://gnomesupport.org/forums/viewtopic.p...&highlight=chbg function wallpaperRandom () { # Random wallpaper. # on mandrake I use xli on debian, in mdk I use wmsetbg # wallpaper_cmd="${Xdir}/wmsetbg -s " wallpaper_cmd="${Xdir}/xli -onroot" # -fork" images_dir="${HOME}/xresources/backgrounds/" images_filter="*.jpg" error='Problems running ${wallpaper_cmd}' images_list=($(/bin/ls ${images_dir}/${images_filter})) image=${images_list[$((${RANDOM}%${#images_list[@]}))]} ${wallpaper_cmd} ${image} || echo ${error} >&2 } # run the wallpaper function: wallpaperRandom & Quote Link to comment Share on other sites More sharing options...
Urza9814 Posted August 2, 2004 Author Report Share Posted August 2, 2004 well, I got it running...I'll know in a half hour if it works, an hour and a half for full testing... One question though...is there any way to make it hidden, or would I have to do that in the code itself? Quote Link to comment Share on other sites More sharing options...
Gowator Posted August 2, 2004 Report Share Posted August 2, 2004 If you mean run it as a background then you can just make it a service.. Just make a startup script in /etc/init.d (usually just rip off an existing one and modify it) then you symlink it from the runlevels you want it to run at (5) (if I get this the right way round its) ln -s /etc/init.d/wallchange /etc/rc5.d/S99_wallchange (assuming wallchange is the name of the script ) This is a real neat idea... specially for a PC in a bedroom but screensavers by time and/or season/... cool.... imagine in Winter the fire saver comes on ... or in asummer a animation of a big fan :D Quote Link to comment Share on other sites More sharing options...
Andrewski Posted August 2, 2004 Report Share Posted August 2, 2004 A service? Oh man.... What's wrong with a cron job? Quote Link to comment Share on other sites More sharing options...
Urza9814 Posted August 2, 2004 Author Report Share Posted August 2, 2004 man...the prog failed...and I don't know why, as my CPU usage was at 100% while it was running, meaning it's doing SOMETHING (I didn't know how to do any kind of pause or wait command, so it was checking if it was the right time as fast as possible :P)...maybe I could figure it out just by looking at the code...maybe not...I don't know, and I'm too lazy to try...besides, I'll be getting a book on graphics soon :P Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.