The OSX shadow server needs similar fixes to the win32 one (#389), namely:
Scheduling for 0.16
Running from a non GUI terminal bails out with this ugly message, which should be turned into a more friendly init check:
xpra main error: Traceback (most recent call last): File "/Users/osx/Desktop/Xpra.app/Contents/Resources/lib/python/xpra/scripts/main.py", line 124, in main return run_mode(script_file, err, options, args, mode, defaults) File "/Users/osx/Desktop/Xpra.app/Contents/Resources/lib/python/xpra/scripts/main.py", line 919, in run_mode return run_server(error_cb, options, mode, script_file, args) File "/Users/osx/Desktop/Xpra.app/Contents/Resources/lib/python/xpra/scripts/server.py", line 927, in run_server app = ShadowServer() File "/Users/osx/Desktop/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/shadow_server.py", line 48, in __init__ raise Exception("cannot grab test screenshot - maybe you need to run this command whilst logged in via the UI") Exception: cannot grab test screenshot - maybe you need to run this command whilst logged in via the UI
Not sure if this is specific to OSX, but we should skip the stacktrace:
failed to create socket /var/tmp/502-Xpra/osx-2.local-0 Traceback (most recent call last): File "/Users/osx/Desktop/Xpra.app/Contents/Resources/lib/python/xpra/scripts/server.py", line 357, in setup_local_sockets sock, cleanup_socket = create_unix_domain_socket(sockpath, mmap_group, socket_permissions) File "/Users/osx/Desktop/Xpra.app/Contents/Resources/lib/python/xpra/scripts/server.py", line 231, in create_unix_domain_socket listener.bind(sockpath) File "socket.pyc", line 228, in meth error: [Errno 13] Permission denied xpra initialization error: failed to create socket /var/tmp/502-Xpra/osx-2.local-0 closing tcp socket 0.0.0.0:10000
cannot grab pixels from the screen, make sure this command is launched from a GUI session
New TODO: we should either ship the pybonjour mdns wrapper (as done with winswitch), or not bother trying avahi to avoid this message:
Warning: failed to load the mdns avahi publisher: No module named avahi either fix your installation or use the 'mdns=no' option
Important fix to backport (keypresses cause a crash!) in r.
CGRegisterScreenRefreshCallback is deprecated in 10.8, instead we're supposed to use the Streaming the Contents of a Display API, which can send us frames in BGRA, YUV420, ..
Using Quartz API,
CGRegisterScreenRefreshCallback should be able to replace the timer, and look like this (adapted from the pyobjc tests):
from Quartz.CoreGraphics import CGRegisterScreenRefreshCallback, CGRect myInfo = object() callcount =  def callbackRefresh(count, rects, info): assert info is myInfo assert isinstance(rects, tuple) assert isinstance(count, (int, long)) for i in rects: assert isinstance(i, CGRect) callcount += 1 err = CGRegisterScreenRefreshCallback(callbackRefresh, myInfo) assert err==0 ... CGUnregisterScreenRefreshCallback(callbackRefresh, myInfo)
CGWaitForScreenRefreshRects- crashes apparently
toKeyCodefunction from this answer to "Generate keyboard events"
The keymapping is not implemented yet..
The printing stuff is blocked by #641: we need the installer to add the cups backend script to the system.
Note about selecting the audio device on OSX: osxaudiosrc/osaudiosink uses non-unique identifiers as device ID
A lot of progress in #641 / r12376:
In order to support launching a remote shadow server via ssh (ie:
xpra shadow ssh:OSXIP), we would need to run as an agent:
Maybe the agent can just sit there, listening for events and we just tell it what to run (ie:
xpra shadow "$@"?) - which will then run from the correct context and be able to access the display server (avoiding the dreaded
_RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL.): see #1169.
NSCFDatabeing passed to the network layer (but apparently does not.. will fix once I manage to reproduce reliably)
@afarr: this is a FYI, feel free to close.
Ok, thanks for info.
I actually gave it a shot, some luck with tcp, not so much with ssh... details of that failure in #1169.
This one looks like it's time it got closed.
You must be doing something wrong. I've just re-tested against 10.6.x, 10.9.x and 10.10.x and it shadowed the existing display in all cases.
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/391