Remote Desktop: Difference between revisions
Dangerflask (talk | contribs) Add suggestion for x11vnc instead of TigerVNC as remote/server |
→XRDP: document enhanced session mode under Hyper-V |
||
| Line 265: | Line 265: | ||
networking.firewall.allowedTCPPorts = [ 3389 ]; | networking.firewall.allowedTCPPorts = [ 3389 ]; | ||
</syntaxhighlight> | </syntaxhighlight> | ||
==== XRDP under Hyper-V with enhanced session mode ==== | |||
If you want to use enhanced session mode in VMConnect while using Hyper-V for a NixOS VM, you need to specify some additional options: | |||
<syntaxhighlight lang="nix"> | |||
services = { | |||
xrdp = { | |||
defaultWindowManager = "${pkgs.i3}/bin/i3"; | |||
enable = true; | |||
extraConfDirCommands = '' | |||
substituteInPlace $out/xrdp.ini \ | |||
--replace-fail 'port=3389' 'port=vsock://-1:3389' \ | |||
--replace-fail '#vmconnect=true' 'vmconnect=true' \ | |||
--replace-fail 'security_layer=negotiate' 'security_layer=rdp' \ | |||
--replace-fail 'crypt_level=high' 'crypt_level=none' \ | |||
--replace-fail 'bitmap_compression=true' 'bitmap_compression=false' | |||
''; | |||
}; | |||
}; | |||
systemd.services.xrdp.serviceConfig.ExecStart = lib.mkForce "${pkgs.xrdp}/bin/xrdp --nodaemon --config /etc/xrdp/xrdp.ini"; | |||
virtualisation.hypervGuest.enable = true; | |||
</syntaxhighlight> | |||
As documented in [https://github.com/nixos/nixpkgs/issues/304855 this issue], the current behavior of the XRDP module in NixOS is to provide the --port parameter on the CLI in the systemD unit file. It does print a message indicating it's ignoring anything provided in the configuration saying <code>--port parameter found, ini override</code> in journalctl. | |||
If in doubt, you can always run <code>ss --vsock -l</code>. If nothing shows up, then XRDP isn't listening where it should be and something about the above has changed. | |||
=== GNOME RDP === | === GNOME RDP === | ||