I wrote this code:
void main() { execl("/usr/X11R6/bin/xclock","-display :0",NULL); sleep(10); }
Now I 'xhost +' ! (To disable the access control) Now compile it and then run it! If you run it from a xterm window... The clock runs ... But if I run it from a tty.. ie the text terminal... it says "Error: Can't open Display" What is the problem ??? I want a simple program .. which must be able to exec a xclock on desktop ':0' ... when I run the program from text terminal (tty) logged in as root ! Thanks in advance !!!!