#391 closed enhancement (fixed)
osx shadow server improvements: mdns, keyboard support, etc
Reported by: | Antoine Martin | Owned by: | alas |
---|---|---|---|
Priority: | minor | Milestone: | 0.17 |
Component: | server | Version: | |
Keywords: | osx | Cc: |
Description (last modified by )
The OSX shadow server needs similar fixes to the win32 one (#389), namely:
- keyboard
- faster screenscraping
- grab directly to gl? glgrab.c
- damage notifications:
- maybe even export individual windows: Son of Grab / gdk_quartz_window_get_nswindow
Change History (17)
comment:1 Changed 8 years ago by
Description: | modified (diff) |
---|
comment:2 Changed 7 years ago by
Milestone: | future → 0.16 |
---|
comment:4 Changed 5 years ago by
Status: | new → assigned |
---|
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
comment:5 Changed 5 years ago by
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
comment:6 Changed 5 years ago by
Some fixes:
- as of r11712 + r11714, the error from comment:4 looks like this:
cannot grab pixels from the screen, make sure this command is launched from a GUI session
- r11714 also fixes sound forwarding from osx and win32 shadow servers (and therefore microphone forwarding too)
- r11711 removes the full stacktrace from the error in comment:5
- r11713 fixes the underlying error: the default xpra config was including a path specific to the machine it is built on! oops (part of the changes for #963)
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
comment:7 Changed 5 years ago by
comment:8 Changed 5 years ago by
Description: | modified (diff) |
---|
Important fix to backport (keypresses cause a crash!) in r.
The 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 = [0] 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[0] += 1 err = CGRegisterScreenRefreshCallback(callbackRefresh, myInfo) assert err==0 ... CGUnregisterScreenRefreshCallback(callbackRefresh, myInfo)
Also useful:
CGCursorIsVisible()
CGCursorIsDrawnInFramebuffer
CGWaitForScreenRefreshRects
- crashes apparently- pykeycode for converting keycodes to strings
- the
toKeyCode
function from this answer to "Generate keyboard events" - How can I call CGEventKeyboardSetUnicodeString from python? for passing specific characters as key events?
The keymapping is not implemented yet..
comment:9 Changed 5 years ago by
comment:10 Changed 5 years ago by
Note about selecting the audio device on OSX: osxaudiosrc/osaudiosink uses non-unique identifiers as device ID
comment:11 Changed 5 years ago by
A lot of progress in #641 / r12376:
- we have a PKG
- man page is installed
- cups backend (needs testing)
- /usr/bin wrappers
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.
comment:12 Changed 5 years ago by
Owner: | changed from Antoine Martin to alas |
---|---|
Status: | assigned → new |
- r12390 switches to gstreamer 1.6 (see #1069)
- r12394 will make us use the osxaudiosrc ahead of autoaudiosrc
- r12395 + r12393 + r12396 + r12398: add very basic shadow keymap support (hardcoded) - will follow up in #1171
- r12397 disables printer forwarding with shadow servers (fails silently - why was I expecting anything more helpful from apple?) - will follow up in #1170
- r12391 fixes a hard crash in
netifaces.gateways()
- r12392 should workaround
NSCFData
being passed to the network layer (but apparently does not.. will fix once I manage to reproduce reliably) - the ability to start a shadow via ssh is in #1169
- keyboard improvements is now in #1172
- sound in #1205
@afarr: this is a FYI, feel free to close.
comment:13 Changed 5 years ago by
Summary: | osx shadow server improvements → osx shadow server improvements: mdns, keyboard support, etc |
---|
comment:14 Changed 5 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
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.
comment:15 Changed 5 years ago by
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.
comment:17 Changed 6 weeks ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/391
Scheduling for 0.16