GNOME Bugzilla – Bug 354518
Dogtail headless does not work
Last modified: 2006-09-18 21:07:49 UTC
Steps to reproduce: 1. dogtail-run-headless -n /usr/share/doc/dogtail-0.5.2/examples/gedit-test-utf8-procedural-api.py Stack trace: [pmuldoon@dhcp-199 examples]$ dogtail-run-headless -n /usr/share/doc/dogtail-0.5.2/examples/gedit-test-utf8-procedural-api.py xinit /tmp/dogtail-headless-xinitrc.4384 -- /usr/bin/Xvfb :1 -screen 0 1024x768x16 -ac -noreset -shmem screen 0 shmid 2916378 GTK Accessibility Module initialized sh: /usr/share/doc/dogtail-0.5.2/examples/gedit-test-utf8-procedural-api.py: Permission denied [pmuldoon@dhcp-199 examples]$ su Password: [root@dhcp-199 examples]# dogtail-run-headless -n /usr/share/doc/dogtail-0.5.2/examples/gedit-test-utf8-procedural-api.py Temporarily enabling accessibility support for GNOME xinit /tmp/dogtail-headless-xinitrc.4439 -- /usr/bin/Xvfb :1 -screen 0 1024x768x16 -ac -noreset -shmem screen 0 shmid 2949149 GTK Accessibility Module initialized sh: /usr/share/doc/dogtail-0.5.2/examples/gedit-test-utf8-procedural-api.py: Permission denied with -g I get: [root@dhcp-199 ~]# dogtail-run-headless -g /usr/share/doc/dogtail-0.5.2/examples/gedit-test-utf8-procedural-api.py Traceback (most recent call last):
+ Trace 71673
try: exitCode = main(sys.argv)
xinitrc.write('cd %s && dogtail-detect-session && sh -c "%s"; echo -n \$? > %s\n') % (os.getcwdu(), script, exitCodeFile)
Traceback (most recent call last): File "/usr/bin/dogtail-run-headless", line 193, in ? cleanup() File "/usr/bin/dogtail-run-headless", line 180, in cleanup os.remove(exitCodeFile) OSError: [Errno 2] No such file or directory: '/tmp/dogtail-headless-exitcode.4485' Other information: In addition there are several other issues covered in Stepan Kasal's email to dogtail list that need to be addressed in a build host environment (ie where is not available at all). http://mail.gnome.org/archives/dogtail-devel-list/2006-August/msg00016.html Should I open another bug for above mail?
dogtail-run-headless calls /bin/sh to execute the script argument you pass to it. That could theoretically be a shell snippet, e.g. 'rm -rf /tmp/foo; ~/bar.py'. /bin/sh is refusing to execute files that do not have the executable bit set, which is its correct behavior. The actual bug is that the packages you're using have the executable bit unset on the example scripts. I would love to set the bit in the Fedora packages, but if you look in the package changelog you'll see that I had to unset it because of packaging policy. As for the issues in the mail, I believe they're all fixed. I'm not sure about the XFS problem; you'd probably want to ask an X person.
Zack, thanks for the reply. I'll take your last reply first ;) "As for the issues in the mail, I believe they're all fixed. I'm not sure about the XFS problem; you'd probably want to ask an X person." Arguably as this is all contained within the dogtail-run-headless script, it is more our issue, the users and the developers of dogtail. Fact is, on a true headless system, dogtail-run-headless does not work at all. It requires more setup. Right now dogtail-run-headless works on a system with X + Display, but it does not draw to the display. Stepan had a theory that might work on a true headless system, and I have CC'd him to the bug. The second issues: You are right, setting the +x bit works in the -n mode, like so dogtail-run-headless -n ./gedit-test-utf8-procedural-api.py however, using -g still spawns: [root@localhost examples]# dogtail-run-headless -g gedit-test-utf8-procedural-api.py Traceback (most recent call last):
+ Trace 71735
Traceback (most recent call last): File "/usr/bin/dogtail-run-headless", line 193, in ? cleanup() File "/usr/bin/dogtail-run-headless", line 180, in cleanup os.remove(exitCodeFile) OSError: [Errno 2] No such file or directory: '/tmp/dogtail-headless-exitcode.21949'
I would also respectfully petition this bug be reopend, until we have fully explored all the issues.
Which issue prevents dogtail-run-headless to work on a true headless system? I wasn't able to get that out of the original mail. I'll look into the -g problem now. And yes, you were right to reopen :)
OK, I can't reproduce that at all. What distro are you using?
"OK, I can't reproduce that at all. What distro are you using?" FC6 - Test 2, basically tracking rawhide. rpm -q dogtail dogtail-0.5.2-3.fc6 rpm -q pyspi pyspi-0.5.5-1.fc6
XFS: From what I understand, X needs to be able to talk to the font server. For the TypeError, I was in fact able to reproduce that on rawhide. It appears to be a python bug: this: xinitrc.write('cd %s && dogtail-detect-session && sh -c "%s"; echo -n $? > %s\n') % (os.getcwdu(), script, exitCodeFile) no longer works, but this: s = 'cd %s && dogtail-detect-session && sh -c "%s"; echo -n $? > %s\n' % (os.getcwdu(), script, exitCodeFile) xinitrc.write(s) does.
I just committed a fix that should take care of everything but the XFS problem, which is really just an X problem that needs to be fixed per distribution.
The bug was fixed in 0.6.0.