| | |
python+apache+gnome-open
![]() |
•
•
Join Date: Nov 2008
Posts: 1
Reputation:
Solved Threads: 0
Hi,
I am trying to run a python(2.5.1) script on apache2.
Basically, I want that when I run this script in the browser on the web server, a gnome windows pops up. The code is as follows:
When I run this script from the shell, a gnome window pops alright, but when I run it from
the browser, I get the following error in the browser (the apache error log doesn't say anything)
cannot open display: Run 'nautilus --help' to see a full list of available command line options.
What might be going wrong? It cannot be a python problem since it works fine from the console. Is it some apache or browser configuration issue.
I am trying to run a python(2.5.1) script on apache2.
Basically, I want that when I run this script in the browser on the web server, a gnome windows pops up. The code is as follows:
Python Syntax (Toggle Plain Text)
import subprocess def launchExplorer(): path = '/home/robot/Music' command = ["/usr/bin/gnome-open",path] subprocess.call(command) if __name__ == "__main__": print_header() launchExplorer()
When I run this script from the shell, a gnome window pops alright, but when I run it from
the browser, I get the following error in the browser (the apache error log doesn't say anything)
cannot open display: Run 'nautilus --help' to see a full list of available command line options.
What might be going wrong? It cannot be a python problem since it works fine from the console. Is it some apache or browser configuration issue.
![]() |
Other Threads in the Python Forum
- Previous Thread: Ordered Dictionaries?
- Next Thread: wxWidgets - RichTextCtrl - Is ther one?
| Thread Tools | Search this Thread |
abrupt accessdenied ansi anti apache application approximation argv array backend beginner builtin calculator change converter countpasswordentry curved dan08 dictionaries dictionary dynamic edit enter file float format function heads homework import inches input keyboard lapse library line lines linux list lists loop microphone mouse movingimageswithpygame mysqlquery newb number numbers numeric output parameters parsing path phonebook plugin pointer prime programming progressbar py2exe pygame pyopengl python random recursion redirect remote reverse scrolledtext session simple software sprite statictext statistics string strings sum syntax table terminal text textarea thread threading time tlapse trick tuple tutorial twoup ubuntu unicode unit urllib urllib2 variable wordgame write wxpython





