jammesz Posted October 12, 2009 Share Posted October 12, 2009 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. Quote Link to comment Share on other sites More sharing options...
jammesz Posted October 12, 2009 Author Share Posted October 12, 2009 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. Quote Link to comment Share on other sites More sharing options...
jammesz Posted October 12, 2009 Author Share Posted October 12, 2009 I ended up doing: sudo -u james firefox Where apache is set to run as user james and ran the php script while logged into the same account. This solved my problem but not the way i prefered. Ill mark this thread as solved anyway. Quote Link to comment 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.