python+apache+gnome-open

Reply

Join Date: Nov 2008
Posts: 1
Reputation: serious123 is an unknown quantity at this point 
Solved Threads: 0
serious123 serious123 is offline Offline
Newbie Poster

python+apache+gnome-open

 
0
  #1
Nov 9th, 2008
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:
  1. import subprocess
  2.  
  3. def launchExplorer():
  4. path = '/home/robot/Music'
  5. command = ["/usr/bin/gnome-open",path]
  6. subprocess.call(command)
  7.  
  8. if __name__ == "__main__":
  9. print_header()
  10. 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.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the Python Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC