How can we change the background of the desktop via filing?

I wish to change the background of my computer by doing filing in C language but I dont have any idea how to proceed in this regard.Please guide me to the files i must open and what changes must i do to them


That is highly OS specific and so not worth the effort to do it in C because for each environment you support you will have to do a lot of code but of course, it's up to you to choose.

In linux you have several tools available and you can look at their source-code. I believe it even depends on the type of graphic environment you're in. For gnome there is gconftool-2, for KDE you have to look yourself but it's easy to find. For linux it would be wiser to do a system call like:

char str[] = "gconftool-2 -t str --set /desktop/gnome/background/picture_filename /path_to_your/pic.png"; // adapt it

instead of writing code from scratch.

For windows there is a very short batch script here that should be easy to convert: batch - change background. To do it in C you write the strings to a text file with the extension .reg then do a system call to apply it.

For Mac OS it's different too, so you have to be more specific

Need Your Help

How to do a redirect to another route with react-router?

javascript reactjs

I am trying to do A SIMPLE using react-router ( version ^1.0.3 ) to redirect to another view and I am just getting tired.

.Net Application cannot detect ODP.NET in 64bit windows

.net deployment

We are currently deploying our .net winform application which depends on ODP.NET via xcopy. Installing on 32 bit windows was fine, however, for some reason our applications cannot detect...