x11 - Launching an X application from a locally running Apache web server using PHP -


i have apache , php running on local linux desktop. php script launches "xcalc", , looks this:

<?php     shell_exec("xcalc"); ?> 

when execute php script using php binary, see xcalc running on desktop. when execute same script through apache, see nothing happening on screen. can't figure out fails.

i changed apache's user , group regular user, make sure x settings correct.

xcalc needs either -display option or display environment variable set know x server display on. when run shell, it's picking $display shell environment, apache web server won't have set.

you may run x authentication issues, if x session isn't being run same user apache web server, since x relies on shared secret (the “magic cookie”) stored in $home/.xauthority file of user logged x session.


Comments

Popular posts from this blog

java - How to specify maven bin in eclipse maven plugin? -

single sign on - Logging into Plone site with credentials passed through HTTP -

php - Why does AJAX not process login form? -