[winswitch] OS X Mojave’s XPRS server

Stuart Hodges schodge at gmail.com
Sun Apr 7 02:20:44 BST 2019


Thanks,

The results are quite intersting.

When run as you sugest I got :

Xpra shadow --bind-tcp=0.0.0.0:14500 --no-daemon
2019-04-05 20:50:47,908 closing tcp socket 0.0.0.0:14500
xpra initialization error:

   File 
"/Applications/Xpra.app/Contents/Resources/lib/python/xpra/scripts/main.py", 
line 93, in main
     return run_mode(script_file, err, options, args, mode, defaults)
   File 
"/Applications/Xpra.app/Contents/Resources/lib/python/xpra/scripts/main.py", 
line 421, in run_mode
     return run_server(error_cb, options, mode, script_file, args, 
current_display)
   File 
"/Applications/Xpra.app/Contents/Resources/lib/python/xpra/scripts/server.py", 
line 617, in run_server
     return do_run_server(error_cb, opts, mode, xpra_file, extra_args, 
desktop_display)
   File 
"/Applications/Xpra.app/Contents/Resources/lib/python/xpra/scripts/server.py", 
line 1054, in do_run_server
     no_gtk()
   File 
"/Applications/Xpra.app/Contents/Resources/lib/python/xpra/scripts/main.py", 
line 1730, in no_gtk
     assert gtk.ver is None


So I played around for a bit with options to work around that and could 
not make it go away so I just temporarily modified the 
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/scripts/main.py 
putting a return in as below to see what would happen :

def no_gtk():
     gtk = sys.modules.get("gtk") or sys.modules.get("gi.repository.Gtk")
     return

It now works when run from the command line :

macserver:tmp schodge$ PYTHONPATH=/Applications/Xpra.app/Contents Xpra 
shadow --bind-tcp=0.0.0.0:14500 --no-daemon
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/gui.py:104: 
Warning: invalid cast from 'GtkMenuBar' to 'GtkWindow'
   osxapp.set_menu_bar(mh.rebuild())
/Applications/Xpra.app/Contents/Resources/lib/python/xpra/platform/darwin/gui.py:104: 
GtkWarning: gtk_window_add_accel_group: assertion 'GTK_IS_WINDOW 
(window)' failed
   osxapp.set_menu_bar(mh.rebuild())
2019-04-05 20:42:17,004 created unix domain socket: 
/Volumes/external/home/schodge/.xpra/macserver.lan-0
2019-04-05 20:42:17,085 serving html content from: 
/Applications/Xpra.app/Contents/Resources/www
2019-04-05 20:42:17,109 Error setting up system tray
Traceback (most recent call last):
   File 
"/Applications/Xpra.app/Contents/Resources/lib/python/xpra/server/shadow/gtk_shadow_server_base.py", 
line 218, in setup_tray
     self.tray_menu.append(self.traymenuitem("About Xpra", 
"information.png", None, about))
AttributeError: 'NoneType' object has no attribute 'append'
2019-04-05 20:42:17,637 GStreamer version 1.14.4 for Python 2.7.16 64-bit
2019-04-05 20:42:17,692 printer forwarding enabled using postscript
2019-04-05 20:42:17,706 xpra GTK2 shadow version 2.5-r22144 64-bit
2019-04-05 20:42:17,707  uid=501 (schodge), gid=20 (staff)
2019-04-05 20:42:17,707  running with pid 1608 on Mac OS X 10.14.3
2019-04-05 20:42:17,707  on display ':0' of size 1920x1080
2019-04-05 20:42:17,749 8.0GB of system memory
2019-04-05 20:42:17,750 xpra is ready.
2019-04-05 20:42:41,359 Handshake complete; enabling connection
2019-04-05 20:42:41,401  automatic picture encoding enabled, also available:
2019-04-05 20:42:41,401   jpeg, png, rgb32, h264
2019-04-05 20:42:41,431 HTML5 Mac OSX Firefox client version 2.5
2019-04-05 20:42:41,864 shadow server: setting default keymap translation
2019-04-05 20:42:41,864  client root window size is 1280x656
2019-04-05 20:42:42,070 client got hello: server version 2.5 accepted 
our connection
2019-04-05 20:42:42,139 Error: cannot add printer 'HTML5 client':
2019-04-05 20:42:42,139  the printing system does not support 
application/pdf
2019-04-05 20:42:42,139 client connection_progress( Session started ,   
,  100 )
2019-04-05 20:42:42,140 client window does not fit in canvas, offsets:  
-320 -212
2019-04-05 20:42:42,141 client startup complete
2019-04-05 20:42:42,141 client connection-established

The performance is not amazing but that could be to do with the old 
server I have running the firefox.

It also looks like the MAC version was built without server support:

Xpra start --bind-tcp=0.0.0.0:14500 --no-daemon
xpra initialization error:
  invalid mode 'start'

So I'm not realy sure wheat the next step is.

I realy want to display back individual windows as opposed to shadowing 
the whole desktop. Was there a reason for the OSX build the start was 
not enabled or should I just build it myself on the Mac ?

Also my hack of putting the return in is hardly a long term solution :)

Any advice,

Thanks



On 04/05/2019 01:29 AM, Antoine Martin via shifter-users wrote:
> On 05/04/2019 08:23, Stuart Hodges via shifter-users wrote:
>> Hi,
>>
>> I’m trying to use a XPRA server on OS X Mojave. I was unsure if it would  work at all with OS X not being native X11 but I have XQuartz running and the documentation seems to suggest it would.
> Xpra on MacOS does not use X11 at all, so XQuartz is not needed.
>
>> I installed the dmg but  the server button is not enabled, the shadow button is but if I select it I can’t connect although an additional XPRA process is started.
> The shadow server should start, but it hasn't been tested on Mojave and
> I have heard that some new "security" mechanisms may be getting in the way.
>
>> I use XPRA on Linux so have some experience.
>>
>> Should it work. If so how do I start a server ?
> The best way would be to install the PKG, if possible, then run the
> server by hand:
> Xpra shadow --bind-tcp=0.0.0.0:14500 --no-daemon
> Keep an eye on that server log output and try to connect with a browser
> on that port.
>
> Cheers,
> Antoine
>
>
>> Thanks
>> _______________________________________________
>> shifter-users mailing list
>> shifter-users at lists.devloop.org.uk
>> https://lists.devloop.org.uk/mailman/listinfo/shifter-users
>>
> _______________________________________________
> shifter-users mailing list
> shifter-users at lists.devloop.org.uk
> https://lists.devloop.org.uk/mailman/listinfo/shifter-users





More information about the shifter-users mailing list