You cannot do that because if you want to run a program in a web browser
that program should not print a graphical interface, but an HTML document,
or at least it should print a proper Content-type, like text/html for
example.

----- Original Message ----- 
From: "steve" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 15, 2003 12:39 AM
Subject: Execute an application


> I have written an perl script to execute another file, which happens to
> be a gui application - gedit.  gedit is a text editor in RedHat 9.
> That's not the real application I want to run, but it serves it's
> purpose for testing - the real application I want to execute is a kylix
> gui application I wrote.
>
> So here's my perl script:
>
> #!/usr/bin/env perl
> print "Content-type: text/html\n\n";
> exec("sudo gedit & > /dev/null 2>/dev/null");
>
> Works great when ran from gnome-terminal with line like:  perl myscript
>
> I need to execute this script from a web page, through a browser.
> When I browse to this page in the cgi-bin directory, gedit does not show
>   up and I get an error in my Apache error log directory:
>
> [Tue Oct 14 13:13:30 2003] [error] [client 127.0.0.1] (gedit:17268):
> Gtk-WARNING **: cannot open display:
>
> How can I get this to work?  Thanks.
>
>
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to