what I need to do is from a PHP script, spawn a GUI program (not in PHP). exec does not seem to work for that and I'm not sure how to aproach this. It's probably very simple. Could someone please help?
this should work add & at the end of the command not to get the output sent back to the script
Hassan El Forkani
Founder And Maintainer of : http://www.WarmAfrica.com EveryOne's Africa
Freelance IT Consultant / Web Applications Developer.
Tel : 0021671880014
Your X server probably isn't allowing the script to display because its run by your web server user.. This is to prevent random people from loading programs into your X. Look at the 'xhost' command or xauth (?? not sure if thats right or not) to allow this..
You can test it by logging in as a different user and try running an graphical program.. It'll probably say something like this:
Xlib: connection to ":0.0" refused by server
Xlib: Client is not authorized to connect to Server
Error: Can't open display: :0.0
Also, I don't usually run scripts from php, but have you tried the back-tick for run a command? back-tick meaning ` (not an apostrophe, a `). For example: