| | |
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 |
alarm ansi anydbm app assignment backend beginner binary bluetooth character cipher cmd coordinates curves customdialog cx-freeze data decimals development directory exe feet file float format function generator getvalue gnu halp handling heads homework http ideas input ip itunes java keycontrol leftmouse line linux list lists loop maintain maze millimeter module mouse number numbers output parsing path pointer prime programming push py2exe pygame pymailer python queue random recursion recursive schedule screensaverloopinactive script slicenotation sqlite ssh statistics string strings sudokusolver text thread time tlapse tooltip tuple type ubuntu unicode url urllib urllib2 variable ventrilo vigenere web webservice wikipedia write wxpython xlib xlwt





