server side scripts + local display
am 21.10.2009 01:31:07 von aurfalien
Hi all,
Unsure of this is the right place for this but let me try.
So I have various scripts that run server side like so;
http://internal-http/script
The contents of those scripts runs fine.
So I run a command in my script which requires an xterm, say xeyes for
example.
While I can run xeyes from a remote login shell, when I try to run
xeyes from a script like so;
http://internal-http/xeyes-script
in the Apache error logs, I get;
Can't open display.
I'm only using xeyes as am example because it requires an xterm. Its
on my Centos distro.
Hope some one can point me in the right direction.
Thanks in advance.
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: server side scripts + local display
am 21.10.2009 03:23:26 von Eric Covener
On Tue, Oct 20, 2009 at 7:31 PM, wrote:
> So I run a command in my script which requires an xterm, say xeyes for
> example.
X11 applications look at the DISPLAY environment variable to figure
out where to well, display.. Your Xserver has access control that is
automagically sorted out for you by your desktop session or ssh
client. It will be a little complicated having your Apache user be
able to securely access your X server.
"DISPLAY environment variable", "xauth", and "x11 forwarding" might
be some good background.
--
Eric Covener
covener@gmail.com
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org
Re: server side scripts + local display
am 22.10.2009 03:18:41 von aurfalien
Thanks Eric.
U provided a good clue.
I got it running and heres what I did incase any one needs to know.
My Xen server runs Apache and I have VNC server enabled on it as a no
priv user.
This user has, in there ,bashrc;
xhost +
In my Python script running server side via http://xen-dom-U-apache-
server/python-script.py, I have
print os.putenv('DISPLAY',':3')
print.os.system('some program that needs display to run')
Its 3 because I have VNC running on port 3 to avoid any Xen console
conflicts with dom0.
This allowed the program needing a display to work on the Apache server.
On Oct 20, 2009, at 6:23 PM, Eric Covener wrote:
> On Tue, Oct 20, 2009 at 7:31 PM, wrote:
>> So I run a command in my script which requires an xterm, say xeyes
>> for
>> example.
>
> X11 applications look at the DISPLAY environment variable to figure
> out where to well, display.. Your Xserver has access control that is
> automagically sorted out for you by your desktop session or ssh
> client. It will be a little complicated having your Apache user be
> able to securely access your X server.
>
> "DISPLAY environment variable", "xauth", and "x11 forwarding" might
> be some good background.
>
> --
> Eric Covener
> covener@gmail.com
>
> ------------------------------------------------------------ ---------
> The official User-To-User support forum of the Apache HTTP Server
> Project.
> See for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
>
------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org