[winswitch] xpra session to other account on localhost
antoine at nagafix.co.uk
Tue Dec 11 18:36:00 GMT 2018
>> The most important thing for local connections is to enable mmap. (see
>> mmap command line options and use "-d mmap" to enable debug logging)
> My system explicitly says mmap disabled, shouldn't that be detected
> Both accounts are member of the xpra group. I start the server with
> ssh marc at localhost xpra start --mmap=/var/tmp/mh-mmap -d mmap
> --mmap-group --socket-dir=/var/tmp
Why change the socket-dir?
The defaults should include /run/xpra which should be writable by
members of the xpra group.
> --speaker=off --encoding=png/P
Don't change the encoding unless you really know what you are doing.
Especially not for png/P which is very rarely a good option.
> --daemon=no --dpi=96 --webcam=no --mdns=no --pulseaudio=no
> --start=konsole :100
> which makes the socket show up in /var/tmp with marc:xpra 660. When I
> then start the client as
> xpra attach ssh:marc at localhost:100 --mmap=/var/tmp/mh-mmap
> --socket-dir=/var/tmp --mmap-group --dpi=96 --desktop-scaling=off -d
> I see /var/tmp/mh-mmap appear for a short time as mh:mh 775, then I see
> the server complaining:
> 2018-12-11 18:36:48,410 client supplied mmap_file=/var/tmp/mh-mmap
> 2018-12-11 18:36:48,410 mmap supported=True, token=242228041280381797676313904508936308232
> 2018-12-11 18:36:48,410 using global server specified mmap file path: '/var/tmp/mh-mmap'
> 2018-12-11 18:36:48,411 Error: cannot access mmap file '/var/tmp/mh-mmap':
> 2018-12-11 18:36:48,411 [Errno 13] Permission denied: '/var/tmp/mh-mmap'
> 2018-12-11 18:36:48,411 see mmap-group option?
> 2018-12-11 18:36:48,411 found client mmap area: None, 0 bytes - min mmap size=67108864
> and then the mmap file disappears again.
I think you need to make the 'xpra' group the primary group of the user.
> What am I doing wrong?
Not much, cross-user shared memory requires some tweaking.
(the feature has not really been updated much for the last 6 years..)
To make it easier, we should enhance the mmap-group option so users can
specify the group they want to use directly:
>>> I notice that the server complains twice on startup:
>>> 2018-12-08 20:19:08,741 cannot use uinput for virtual devices:
>>> 2018-12-08 20:19:08,741 [Errno 13] Failed to open the uinput device: Permission denied
>> Harmless and completely safe to ignore.
>>> WARNING: no 'numpy' module, HyBi protocol will be slower
>> This one is bogus.
>> Both have been added to the FAQ:
> Did I miss that or was it added just recently?
Both were added yesterday, but they were available elsewhere on the wiki
>>> Here is what the server logs:
>>> marc at fan:~$ xpra start --daemon=no --speaker=off --webcam=no --mdns=no --pulseaudio=no --start=konsole :100
>>> 2018-12-08 20:20:27,121 cannot use uinput for virtual devices:
>>> 2018-12-08 20:20:27,121 [Errno 13] Failed to open the uinput device: Permission denied
>> (..)> 2018-12-08 20:23:57,360 DPI set to 51 x 48 (wanted 54 x 77)
>>> 2018-12-08 20:23:57,361 you may experience scaling problems, such as huge or small fonts, etc
>>> 2018-12-08 20:23:57,361 to fix this issue, try the dpi switch, or use a patched Xorg dummy driver
>> That's odd. Make sure to use the patched dummy driver from the repository.
> I'd rather refrain from having to patch my xorg,
You're not patching xorg, just the dummy driver.
> I can live with giving
> hard-coded dpi values (which I usually do, but didn't do when creating
> these mails to make things simpler).
Note that there is at least one more non-DPI bug you may encounter with
the unpatched driver.
>> (..)> In the panel applet, I have set Picture => Fixed speed to "Lowest
>>> latency". The session information claims that I have 60 ms frame total
>>> latency, but it feels like a multiple of that. Any networked RDP session
>>> to a Windows machine feels much faster.
>> Even remote connections should be as fast as RDP, let alone local ones.
> They're not.
>> Feel free to create a ticket to fix the non-mmap case.
> Like "xrdp very slow" and giving the same information like in the thread
> starting message?
That's a good start, more guidelines can be found here:
Based on recent similar reports, you may want to attach the server's
debug log with "-d bandwidth,stats" added to the command line.
More information about the shifter-users