
gabrielmonnerat at gmail
Jul 10, 2009, 9:48 AM
Post #2 of 3
(519 views)
Permalink
|
gabrielmonnerat wrote: > Hi all, > > I need start a openoffice in Xvfb, but when I call with the DISPLAY > occurs this error: > > [root [at] localhos oood]# Xvfb :99 -screen 0 1024x768x24 & > > In [9]: subprocess.call('/opt/ooo-dev3/program/soffice.bin') > Out[9]: 0 > > In [10]: subprocess.call('DISPLAY=:99 /opt/ooo-dev3/program/soffice.bin') > --------------------------------------------------------------------------- > > OSError Traceback (most recent call > last) > > /home/gabriel/<ipython console> in <module>() > > /usr/lib/python2.6/subprocess.pyc in call(*popenargs, **kwargs) > 442 retcode = call(["ls", "-l"]) > 443 """ > --> 444 return Popen(*popenargs, **kwargs).wait() > 445 > 446 > > /usr/lib/python2.6/subprocess.pyc in __init__(self, args, bufsize, > executable, stdin, stdout, stderr, preexec_fn, close_fds, shell, cwd, > env, universal_newlines, startupinfo, creationflags) > 593 p2cread, p2cwrite, > 594 c2pread, c2pwrite, > --> 595 errread, errwrite) > 596 > 597 # On Windows, you cannot just redirect one or two > handles: You > > > /usr/lib/python2.6/subprocess.pyc in _execute_child(self, args, > executable, preexec_fn, close_fds, cwd, env, universal_newlines, > startupinfo, creationflags, shell, p2cread, p2cwrite, c2pread, > c2pwrite, errread, errwrite) > 1104 os.waitpid(self.pid, 0) > 1105 child_exception = pickle.loads(data) > -> 1106 raise child_exception > 1107 > 1108 > > OSError: [Errno 2] No such file or directory > > I am using subprocess because I need store the pid. Any suggestions? Sorry, I was forgot the parameter shell=True. i.e In [20]: subprocess.call('DISPLAY=:99 /opt/ooo-dev3/program/soffice.bin',shell=True) lack of attention mine > > thanks in advance, > > Gabriel M. Monnerat > > Gabriel M. Monnerat -- http://mail.python.org/mailman/listinfo/python-list
|