Xpra: Ticket #116: Xpra doesn't start on CentOS 5

Hello,

Traceback (most recent call last):
  File "/usr/bin/xpra", line 6, in ?
    xpra.scripts.main.main(__file__, sys.argv)
  File "/usr/lib64/python2.4/site-packages/xpra/scripts/main.py", line 263, in main
  File "/usr/lib64/python2.4/site-packages/xpra/scripts/server.py", line 256, in run_server
AttributeError: 'module' object has no attribute 'fchmod'

This is with Python 2.4.3.



Tue, 24 Apr 2012 08:47:26 GMT - Antoine Martin: status changed

If this is enough to fix it, I can re-spin the CentOS 5 packages:

### Eclipse Workspace Patch 1.0
#P Xpra
Index: src/xpra/scripts/server.py
===================================================================
--- src/xpra/scripts/server.py	(revision 764)
+++ src/xpra/scripts/server.py	(working copy)
@@ -253,7 +253,10 @@
     # Unix is a little silly sometimes:
     umask = os.umask(0)
     os.umask(umask)
-    os.fchmod(scriptfile.fileno(), o0700 & ~umask)
+    if hasattr(os, "fchmod"):
+        os.fchmod(scriptfile.fileno(), o0700 & ~umask)
+    else:
+        os.chmod(scriptpath, o0700 & ~umask)
     scriptfile.write(xpra_runner_shell_script(xpra_file, starting_dir))
     scriptfile.close()

Tue, 24 Apr 2012 09:01:24 GMT - ahuillet:

This makes it go further... but it crashes later:

Traceback (most recent call last):
  File "/usr/bin/xpra", line 6, in ?
    xpra.scripts.main.main(__file__, sys.argv)
  File "/usr/lib64/python2.4/site-packages/xpra/scripts/main.py", line 263, in main
  File "/usr/lib/python2.4/site-packages/xpra/scripts/server.py", line 319, in run_server
    from xpra.server import can_run_server, XpraServer
  File "/usr/lib64/python2.4/site-packages/xpra/server.py", line 20, in ?
ImportError: No module named uuid
FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
(xpra:15331): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
Segmentation fault

Tue, 24 Apr 2012 09:07:25 GMT - Antoine Martin:

The python-uuid module was meant to be pulled in as a dependency, see %define requires_extra , python-uuid

If not, we will need to deal with that too, but installing it by hand should fix that. Not sure about the segfault though...


Tue, 24 Apr 2012 09:10:13 GMT - Antoine Martin:

Got it, the static build section was overriding EL5 options, fixed in r768

Re-spinning the packages now.


Tue, 24 Apr 2012 11:17:42 GMT - ahuillet:

Better - but not solved. I think you need to add python-ctypes as a dependency.

Traceback (most recent call last):
  File "/usr/bin/xpra", line 6, in ?
    xpra.scripts.main.main(__file__, sys.argv)
  File "/usr/lib64/python2.4/site-packages/xpra/scripts/main.py", line 263, in main
  File "/usr/lib64/python2.4/site-packages/xpra/scripts/server.py", line 322, in run_server
  File "/usr/lib64/python2.4/site-packages/xpra/server.py", line 27, in ?
ImportError: No module named ctypes
FreeFontPath: FPE "unix/:7100" refcount is 2, should be 1; fixing.
(xpra:20648): Gdk-CRITICAL **: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
Segmentation fault

Tue, 24 Apr 2012 11:36:08 GMT - Antoine Martin:

Yes, I'll add ptthon-ctypes as a dependency for centos 5.x only and re-spin the packages, does this prevent the segfault ? Or is there another issue still?


Tue, 24 Apr 2012 11:52:04 GMT - ahuillet:

It prevents the segfault, however I still get something strange:

glib is missing, cannot set the application name, please install glib's python bindings: No module named glib

And I can't find the name of the package I'm supposed to install!


Tue, 24 Apr 2012 11:55:28 GMT - Antoine Martin:

You can safely ignore this one, centos 5 is so outdated you just can't get the glib bindings for it, afaik.


Wed, 25 Apr 2012 06:59:31 GMT - Antoine Martin: owner, status changed

new CentOS 5.x packages have the fix from r769 - please confirm and close this ticket.


Fri, 04 May 2012 10:09:27 GMT - Antoine Martin: status changed; resolution set

works for me - closing


Fri, 04 May 2012 11:16:15 GMT - ahuillet:

Sorry for not closing earlier. I confirm that it works.


Sat, 23 Jan 2021 04:45:58 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/116