I've used Nomachine for years to connect my 2 Linux laptops. The client machine A has always connected to an existing X session in the server machine B displaying it in both A and B. However, lately it always creates a new session on B while showing it on A only. To my knowledge, I haven't done (installed, removed, changed, etc.) anything to deserve this.
Upon connecting, I lately also sometimes get warnings either about a keyring or not being allowed to control network, so I suspect a polkit issue. If I open a web browser in the B session displayed only in A, the browser opens only in the existing X session on B (this is the only way I can interact w/ the X session there). So it seems that something's preventing me from accessing the web over Nomachine, creating a new webless X session instead.
What I've done
To get rid of the keyring nag:
mv /home/j/.local/share/keyrings/login.keyring /home/j/.local/share/keyrings/login.keyring.bak
To ensure network control:
- created
/etc/polkit-1/localauthority/50-local.d/50-allow-network-manager.pkla
:
[Network Manager all Users]
Identity=unix-user:*
Action=org.freedesktop.NetworkManager.settings.modify.system;org.freedesktop.NetworkManager.network-control
ResultAny=yes
ResultInactive=yes
ResultActive=yes
(tried also versions w/ ResultAny=no
and ResultInactive=no
)
- commented out the following value of
allow_any
of
<action id="org.freedesktop.NetworkManager.network-control">
<_description>Allow control of network connections</_description>
<_message>System policy prevents control of network connections</_message>
(this is a message I sometimes got) in /usr/share/polkit-1/actions/org.freedesktop.NetworkManager.policy
:
<defaults>
<!-- <allow_any>auth_admin</allow_any>-->
<allow_inactive>yes</allow_inactive>
<allow_active>yes</allow_active>
</defaults>
This has suppressed the "System policy prevents control of network connections" messages and temporarily fixed the keyring nag (login.keyring
gets re-created and sometimes fires the nag again) but hasn't enabled me to connect to an existing X session on B. Needless to say, I've rebooted both machines many times. Any ideas on how to proceed?
xhost +
(didn't help). I didn't do any upgrades before the problem occurred (but one of the systems is Xubuntu, and its shutdown is suspiciously slow, so I suspect it may be doing some surreptitious upgrading)