I need to set the display variables in a C program, using setenv or putenv. which is a better function to set environment display variables? Please suggest the code.
This is meant for a program, that has to display pop-ups using xmessge. If the program is executed manually it works fine, and pop ups come up correctly. But if the program is executed at start up from startup scripts, the popups don't appear. ie: graphics part do not work. This, I was advised, was because I did not set the environment display variables inside the c program.
The code should work in Suse, Ubuntu, Redhat etc. Please guide.
Start Free Trial