On Tuesday 14 October 2003 21:39, steve wrote: > 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.
Your problem has nothing to do with perl. You have to run "xhost + localhost" as the user using X, to allow your apache to display stuff on X. Jason Viloria www.jasonlinux.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]