Jump to content

[SOLVED] Aapche DISPLAY access x11 for php exec()


jammesz

Recommended Posts

Hi im running ubuntu jaunty with lamp setup.

 

Basically i want to be able to use php's exec() function to open firefox (so i can get my ubuntu comp to play youtube videos after commanding it to from my mobile connected to the comps intranet).

 

this is what i've done so far:

* tried exec("firefox") and apache logs say no display set.

* tried exec("firefox --display=:0");

    added all my comps ip addresses, localhost and :local to xhost

    and apache logs say Error: cannot open display: :0

* set apache to use my username to run in httpd.conf and apache log says

  (firefox:7390): GnomeUI-WARNING **: While connecting to session manager:

    None of the authentication protocols specified are supported.

 

Btw running xauth list tells me that my display is :0

 

Any ideas on how to fix this? I've searched long and hard to find a solution and only came up with bits and pieces that get me to where i am now with this.

Link to comment
Share on other sites

Just an update....

 

I've edited /ect/gdm/gdm.conf and set disallowTCP=true to false and restarted my comp

and i now get this error in the apache log:

(firefox:11592): GnomeUI-WARNING **: While connecting to session manager:

Could not open network socket.

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.