
Wallpaper Changer
Source (link to git-repo or to original if based on someone elses unmodified work):
--------------------
This program changes your wallpaper in a configurable interval of time.
I tried to integrated the features like the sniffer for the screensaver and the day/night wallpaper, but i noticed that my code was too fragmented, so i completely rewrote it. when you start the program a small frame containing a preview of the wallpaper appears. short before changing the background the preview will change. the configuration file (containing the image paths) and the delay must be given as command line arguante by the user.
How to Install:
---------------
* extract the Source Archive
* open a terminal and cd to the Directory
* type ./configure
* type make
* log in as root (with su or sudo) and type make install
If an error occurs while the configure script is running please make sure you have all needed programs or libs installed (see below). if this does not solute the problem please contact me.
now you can start the program by entering the following:
wpc ConfigFile delay -v
the -v option makes the little window visible, if you use -i instead the window will be invisible
i wrote a starter too so you needn't start the program from the command line anymore. just go to the applications menu, select utilities and then select 'Fish95's WallpaperChanger'.
To close the WallpaperChanger click on the image and then click the close button
the configuration file contains the images paths. a sample config file would look like this:
/home/user/imgs/img1.jpg
/home/user/imgs/img2.png
/home/user/imgs/img3.jpg
Depends on:
-----------
gnome
g++
standard c++ libary
gtkmm 2.4 development and runtime files
please vote and maybe leave a comment. i would like to hear what you think about it.
version 0.2:
now the wallpaper changing delay is configurable in a file called 'wpdc'
version 0.3:
a small modification in the code. wallpaperchange will now exit after creating 'wpcconf'
version 0.4
the picture options are controllable by the user. they are saved in 'wpoc'
version 0.41
configuration- and install scripts
version 0.5
A Gui comes!!
version 0.6
completely rewritten
version 0.65
fixed a bug in the Makefile
version 0.7
click the image to get more options...
version 0.8
new Makefile
thanks to oscartheduck
version 0.9
changed build system to gnu make
fixed a bug in the makefile
Ratings & Comments
11 Comments
Great stuff... but how to uninstall it, if I won't like it anymore?
oscartheduck wrote a new makefile so just download the source again, cd to the directory and type make uninstall
Many thanks for your reply :)
I noticed that the makefile is broken in the current release, and that there's no uninstall target. So I fixed those things. Replace the current Makefile's contents with this stuff, and you'll be able to actually install this program. And then to uninstall, just use sudo make uninstall ---- all: g++ src/main.cpp src/window.cpp -o wpc `pkg-config --cflags --libs gtkmm-2.4` install: mkdir -p /usr/share/wallpaperchanger cp wpc /usr/bin/wpc chmod +x src/wpc-starter cp src/wpc-starter /usr/bin/wpc-starter chmod +r /usr/bin/wpc-starter cp src/starter.py /usr/share/wallpaperchanger/starter.py chmod +r /usr/share/wallpaperchanger/starter.py cp logo.png /usr/share/wallpaperchanger/logo.png chmod +r /usr/share/wallpaperchanger/logo.png cp WPC.desktop /usr/share/applications/WPC.desktop chmod +r /usr/share/applications/WPC.desktop uninstall: rm /usr/bin/wpc rm /usr/bin/wpc-starter rm -rf /usr/share/wallpaperchanger rm /usr/share/applications/WPC.desktop
Thank you very much. i will include your makefile in the next release
I just tried to build on my testing branch Ubuntu 8.10---errors follow: dean@linux:~/Desktop/wpc-0.5-daemon$ make make all-recursive make[1]: Entering directory `/home/dean/Desktop/wpc-0.5-daemon' Making all in src make[2]: Entering directory `/home/dean/Desktop/wpc-0.5-daemon/src' if g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT wallpaperchange.o -MD -MP -MF ".deps/wallpaperchange.Tpo" -c -o wallpaperchange.o wallpaperchange.cpp; \ then mv -f ".deps/wallpaperchange.Tpo" ".deps/wallpaperchange.Po"; else rm -f ".deps/wallpaperchange.Tpo"; exit 1; fi wallpaperchange.cpp: In function ‘int main(int, char**)’: wallpaperchange.cpp:45: warning: ignoring return value of ‘int daemon(int, int)’, declared with attribute warn_unused_result if g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT CheckContent.o -MD -MP -MF ".deps/CheckContent.Tpo" -c -o CheckContent.o CheckContent.cpp; \ then mv -f ".deps/CheckContent.Tpo" ".deps/CheckContent.Po"; else rm -f ".deps/CheckContent.Tpo"; exit 1; fi if g++ -DHAVE_CONFIG_H -I. -I. -I.. -g -O2 -MT PicChangeLoop.o -MD -MP -MF ".deps/PicChangeLoop.Tpo" -c -o PicChangeLoop.o PicChangeLoop.cpp; \ then mv -f ".deps/PicChangeLoop.Tpo" ".deps/PicChangeLoop.Po"; else rm -f ".deps/PicChangeLoop.Tpo"; exit 1; fi PicChangeLoop.cpp: In function ‘int PicChangeLoop()’: PicChangeLoop.cpp:35: error: ‘strcpy’ was not declared in this scope PicChangeLoop.cpp:48: error: ‘strcat’ was not declared in this scope PicChangeLoop.cpp:53: error: ‘strcat’ was not declared in this scope PicChangeLoop.cpp:59: error: ‘strcat’ was not declared in this scope PicChangeLoop.cpp:63: error: ‘strcat’ was not declared in this scope PicChangeLoop.cpp:73: error: ‘strcat’ was not declared in this scope PicChangeLoop.cpp:74: error: ‘system’ was not declared in this scope PicChangeLoop.cpp:77: error: ‘system’ was not declared in this scope make[2]: *** [PicChangeLoop.o] Error 1 make[2]: Leaving directory `/home/dean/Desktop/wpc-0.5-daemon/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/dean/Desktop/wpc-0.5-daemon' make: *** [all] Error 2
Hi, Please make sure that you have the stable version of libc6-dev (GNU C Libary) and libstdc++6-dev (GNU C++ Libary) packages installed correctly. As ubuntu 8.10 is still in development phase these packages may contain bugs
Can you add a "sniffer" to tell if the system is on screen-saver (xscreensaver or gnome-screensaver) or power-save/sleeping & not change wallpaper at those times? I use Wallpaper Tray .0.5.5 & find that my system will crash sometimes under those conditions--as soon as I disable wallpaper changing--my system is stable. I would think that a simple pid check could enough......
Thank you for the comment. The "sniffer" is a really good idea... i will try to add this
I currently do not have access to my Linux Desktop so I have to ask: do the wallpapers fade into another or do they just switch in milliseconds? Can you set the time in which they change? Can you set specific times when to change, like use one for daytime and one for night?
Thank you for the comment. The wallpapers don't fade, but you can set the time in wich they change but you can't set any specific time like day or night, but i will try to add this feature