How to give apache access to root DISPLAY?

Problems with the Linux version of XAMPP, questions, comments, and anything related.

How to give apache access to root DISPLAY?

Postby zooeycat213 » 19. April 2010 15:52

Hello all,

Prerequisite info:
1) I am running xampp 1.7.1 on 64-bit ubuntu 9.04 with libs-ia32
2) I have run /opt/lampp/lampp security util and all security checkpoints are met

I have written a gedit snippet which essentially parses a debug backtrace and opens the referenced files sequentially (and at the appropriate line numbers) in gedit via shell_exec.

It works fine from the command line. However, as I am primarily using it to debug Joomla! extensions, I need it to run from a web browser, ideally.

The problem is that when I attempt to do so I get the following error: Gtk-WARNING **: cannot open display:0.0. Clearly this is because apache does not have access to the root DISPLAY environment variable.

My question is: how do I give apache access to the display so it gedit can be opened from the browser?

I have tried the following already:

1. I added these lines to my .htaccess and re-started apache:
SetEnv DISPLAY :0.0
SetEnv XAUTHORITY /home/<my_user_name>/.Xauthority

2. I tried modifying my shell_exec call to look like:
shell_exec('xhost + & DISPLAY = :0.0 & gedit test.txt');

Neither solved my problem. So I am turning to the experts. :? Is this even possible? How can I revert the /opt/lampp/lampp security to see if this is interfering somehow?

PS. I suppose I could just generate a bash script and then run it from terminal, but that is not ideal because it involves an extra step, which wastes my time and ruins my workflow...

Kind thanks,

zooeycat213
zooeycat213
 
Posts: 1
Joined: 19. April 2010 15:23

Return to XAMPP for Linux

Who is online

Users browsing this forum: No registered users and 2 guests