pedrosimoes Posted December 13, 2005 Share Posted December 13, 2005 Hello, I want to launch Xwindow application through a PHP script. I use the shell_exec, exec functions. My apache2 runs with user and group www-data. I'm running Debian Linux (testing). I extracted the MIT-MAGIC-COOKIE from the user that launched Xserver to the .Xauthority of www-data user. When I "su" to www-data (su - www-data) and launch a xterm it will start. Doing this in a PHP script it won't start. I tried things like shell_exec("export DISPLAY=:0; xterm &), shell_exec("source ~/.bash_profile; xterm &"), but nothing... This is something related with the apache environment? Any help? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/3037-launching-xwindow-application-problem/ Share on other sites More sharing options...
web.dork Posted September 8, 2008 Share Posted September 8, 2008 I have this same problem and would VERY much appreciate some insight! Quote Link to comment https://forums.phpfreaks.com/topic/3037-launching-xwindow-application-problem/#findComment-636642 Share on other sites More sharing options...
corbin Posted September 8, 2008 Share Posted September 8, 2008 Does the Apache user have execute permissions on those files? Quote Link to comment https://forums.phpfreaks.com/topic/3037-launching-xwindow-application-problem/#findComment-636982 Share on other sites More sharing options...
web.dork Posted September 9, 2008 Share Posted September 9, 2008 Yep Quote Link to comment https://forums.phpfreaks.com/topic/3037-launching-xwindow-application-problem/#findComment-637148 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.