[Erp5-report] r11540 - /erp5/trunk/utils/oood/start.py
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Nov 30 14:12:45 CET 2006
Author: kevin
Date: Thu Nov 30 14:12:43 2006
New Revision: 11540
URL: http://svn.erp5.org?rev=11540&view=rev
Log:
Add logs about Xvfb debugging.
Better detection of Xvfb running process.
Modified:
erp5/trunk/utils/oood/start.py
Modified: erp5/trunk/utils/oood/start.py
URL: http://svn.erp5.org/erp5/trunk/utils/oood/start.py?rev=11540&r1=11539&r2=11540&view=diff
==============================================================================
--- erp5/trunk/utils/oood/start.py (original)
+++ erp5/trunk/utils/oood/start.py Thu Nov 30 14:12:43 2006
@@ -148,27 +148,26 @@
lib.log("Pool - Flushed: all instances killed", 0)
-
-### Generate Xvfb command
-virtual_display_cmd = "Xvfb -ac :%s -screen 0 800x600x16 -fbdir %s" % ( config.virtual_display_id
- , config.run_dir
- )
-
def startVirtualFrameBuffer():
"""
This method start a virtual frame buffer (Xvfb)
"""
killVirtualFrameBuffer()
- os.system("%s &" % virtual_display_cmd)
+ VIRTUAL_SCREEN = 0
+ os.system("Xvfb -ac :%s -screen %s 800x600x16 -fbdir %s &" % ( config.virtual_display_id
+ , VIRTUAL_SCREEN
+ , config.run_dir
+ ))
lib.log("Pool - Virtual frame buffer started", 0)
+ lib.log("Pool - To see the virtual display, run 'xwud -in %sXvfb_screen%s'" % (config.run_dir, VIRTUAL_SCREEN))
def killVirtualFrameBuffer():
"""
This method kill the virtual frame buffer (Xvfb)
"""
- # Do the shell command
- result = getstatusoutput("ps ax | grep '%s'" % (virtual_display_cmd))
+ # Search all Xvfb process running on display ID given in the config file
+ result = getstatusoutput("ps ax | grep 'Xvfb' | grep ':%s'" % config.virtual_display_id)
# Search the running process
killed = False
for process in result[1].splitlines():
More information about the Erp5-report
mailing list