Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 596773 - dogtail-run-headless throws error "OSError: [Errno 2] No such file or directory"
Summary: dogtail-run-headless throws error "OSError: [Errno 2] No such file or directory"
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: distribution
Version: 6.0
Hardware: All
OS: Linux
low
medium
Target Milestone: beta
: ---
Assignee: Zack Cerza
QA Contact: desktop-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-05-27 13:41 UTC by Garik Khachikyan
Modified: 2015-01-04 21:57 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-05-28 15:35:42 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Garik Khachikyan 2010-05-27 13:41:59 UTC
Description of problem:
Having installed dogtail-0.7.0-1.el6.noarch dogtail-run-headless works improperly for me.
Not sure if there is any configuration needs to be tuned in advance, but it throws an exception.

And one more question: is it ok that dogtail-run-headless has no option "-n" (similar one had RHEL5 version)?

I have my script that just needs to be run headless and in the gnome-terminal automate typing of several commands.

Exception is:
---
/usr/bin/xinit /tmp/dogtail/dogtail-headless-xinitrc.rolflS -- /usr/bin/Xorg :2 -ac -noreset


X.Org X Server 1.7.6
Release Date: 2010-03-17
X Protocol Version 11, Revision 0
Build Operating System: x86-012 2.6.18-194.el5 
Current Operating System: Linux dell-pe840-01.rhts.eng.bos.redhat.com 2.6.32-24.el6.i686 #1 SMP Mon May 3 20:23:55 EDT 2010 i686
Kernel command line: ro root=/dev/mapper/vg_dellpe84001-lv_root rd_LVM_LV=vg_dellpe84001/lv_root rd_LVM_LV=vg_dellpe84001/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us console=ttyS0,115200
Build Date: 05 May 2010  12:51:08AM
Build ID: xorg-x11-server 1.7.6-4.el6 
Current version of pixman: 0.16.6
	Before reporting problems, check https://www.redhat.com/apps/support/
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.2.log", Time: Thu May 27 09:12:49 2010
(==) Using default built-in configuration (30 lines)
(II) [KMS] Kernel modesetting enabled.
(EE) Dell DRAC4: failed to initialize for relative axes.
GNOME_KEYRING_SOCKET=/tmp/keyring-rgjsWc/socket
SSH_AUTH_SOCK=/tmp/keyring-rgjsWc/socket.ssh
GNOME_KEYRING_PID=5837
** (<unknown>:5836): DEBUG: Client registered with session manager: /org/gnome/SessionManager/Client2
Traceback (most recent call last):
  File "/usr/bin/dogtail-run-headless", line 68, in <module>
    if __name__ == "__main__": main()
  File "/usr/bin/dogtail-run-headless", line 61, in main
    pid = session.start()
  File "/usr/lib/python2.6/site-packages/dogtail/sessions.py", line 128, in start
    scriptPid = self.script.start()
  File "/usr/lib/python2.6/site-packages/dogtail/sessions.py", line 40, in start
    env = self.environ)#, stdout = subprocess.PIPE, 
  File "/usr/lib/python2.6/subprocess.py", line 595, in __init__
    errread, errwrite)
  File "/usr/lib/python2.6/subprocess.py", line 1092, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
---

Version-Release number of selected component (if applicable):
dogtail-0.7.0-1.el6.noarch

How reproducible:
Always

Steps to Reproduce:
1. get dogtail installed
2. run the script kinda "dogtail-run-headless 'python rhn_register_auto.py --username=admin --password=admin'" where the python file will try to make a dogtail commands there (like: make a gnome-terminal session and send commands by type('<smthng>') and/or keyCombo("<keys>"), etc)
3.
  
Actual results:
throws an exception

Expected results:
should be functioning ok

Additional info:

Comment 3 Zack Cerza 2010-05-27 17:43:57 UTC
It's the quotes that are confusing dogtail-run-headless. If you just drop the quotes, however, it will try and process the flags you are passing. So you need to insert a '--' to let dogtail-run-headless know not to process them:

dogtail-run-headless -- python rhn_register_auto.py --username=admin --password=admin

Does that work?

Comment 4 Garik Khachikyan 2010-05-28 08:45:22 UTC
Did the command you mentioned above, got another error:
---

[root@dell-pe840-01 ~]# dogtail-run-headless -- python rhn_register_auto.py --username=admin --password=admin
/usr/bin/xinit /tmp/dogtail/dogtail-headless-xinitrc.s4fHky -- /usr/bin/Xorg :3 -ac -noreset


X.Org X Server 1.7.6
Release Date: 2010-03-17
X Protocol Version 11, Revision 0
Build Operating System: x86-012 2.6.18-194.el5 
Current Operating System: Linux dell-pe840-01.rhts.eng.bos.redhat.com 2.6.32-24.el6.i686 #1 SMP Mon May 3 20:23:55 EDT 2010 i686
Kernel command line: ro root=/dev/mapper/vg_dellpe84001-lv_root rd_LVM_LV=vg_dellpe84001/lv_root rd_LVM_LV=vg_dellpe84001/lv_swap rd_NO_LUKS rd_NO_MD rd_NO_DM LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=us console=ttyS0,115200
Build Date: 05 May 2010  12:51:08AM
Build ID: xorg-x11-server 1.7.6-4.el6 
Current version of pixman: 0.16.6
	Before reporting problems, check https://www.redhat.com/apps/support/
	to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
	(++) from command line, (!!) notice, (II) informational,
	(WW) warning, (EE) error, (NI) not implemented, (??) unknown.
(==) Log file: "/var/log/Xorg.3.log", Time: Fri May 28 04:42:40 2010
(==) Using default built-in configuration (30 lines)
(II) [KMS] Kernel modesetting enabled.
(EE) Dell DRAC4: failed to initialize for relative axes.
GNOME_KEYRING_SOCKET=/tmp/keyring-20BfpK/socket
SSH_AUTH_SOCK=/tmp/keyring-20BfpK/socket.ssh
GNOME_KEYRING_PID=10120
** (<unknown>:10119): DEBUG: Client registered with session manager: /org/gnome/SessionManager/Client2

** (gnome-panel:10160): CRITICAL **: panel_applet_frame_change_background: assertion `PANEL_IS_WIDGET (GTK_WIDGET (frame)->parent)' failed
  File "rhn_register_auto.py", line 28
SyntaxError: Non-ASCII character '\xe2' in file rhn_register_auto.py on line 28, but no encoding declared; see http://www.python.org/peps/pep-0263.html for details

** (dogtail-logout:10195): WARNING **: Trying to register gtype 'WnckWindowState' as flags when in fact it is of type 'GEnum'

** (dogtail-logout:10195): WARNING **: Trying to register gtype 'WnckWindowActions' as flags when in fact it is of type 'GEnum'

** (dogtail-logout:10195): WARNING **: Trying to register gtype 'WnckWindowMoveResizeMask' as flags when in fact it is of type 'GEnum'
click on [menu | System]
click on [menu item | Log Out root...]

** (gnome-panel:10160): WARNING **: Could not ask session manager to log out: Shutdown interface is only available during the Running phase
Traceback (most recent call last):
  File "/usr/bin/dogtail-logout", line 28, in <module>
    focus.widget(roleName = 'alert')
  File "/usr/lib/python2.6/site-packages/dogtail/procedural.py", line 178, in __call__
    return self.findByPredicate(pred)
  File "/usr/lib/python2.6/site-packages/dogtail/procedural.py", line 162, in findByPredicate
    if config.fatalErrors: raise FocusError, pred.debugName
FocusError: child with roleName='alert'


waiting for X server to shut down gnome-settings-daemon: Fatal IO error 11 (Resource temporarily unavailable) on X server :3.0.
gnome-settings-daemon: Fatal IO error 111 (Connection refused) on X server :3.0.
The application 'gnome-session' lost its connection to the display :3.0;
most likely the X server was shut down or you killed/destroyed
the application.
[root@dell-pe840-01 ~]# gnome-session: Fatal IO error 111 (Connection refused) on X server :3.0.
Window manager error: Unable to open X display :3.0


/usr/bin/xinit:  unexpected signal 15.

Comment 5 Garik Khachikyan 2010-05-28 08:51:24 UTC
Wow, actually it was encoding definition problem:
Doing "# coding: utf-8" did the magic and now it works for me!

And for sure your advice helped much more :)

thanks a lot (and consider the bug as fixed)

Comment 6 Garik Khachikyan 2010-05-28 08:52:43 UTC
mmm, well: my program lunched, but that errors with X server still there.

maybe some combination settings to be put to ignore them?

Comment 7 Zack Cerza 2010-05-28 15:35:42 UTC
Don't worry about the other errors. dogtail-run-headless tries to log you out gracefully, but gnome-session doesn't seem to be making the logout dialog accessible. dogtail-run-headless falls back to just letting the X server die.


Note You need to log in before you can comment on or make changes to this bug.