Remote Desktop: Difference between revisions

Johanno (talk | contribs)
mNo edit summary
Nipsy (talk | contribs)
 
(2 intermediate revisions by 2 users not shown)
Line 44: Line 44:
<code>pathToScript</code> can also be a path to an executable like <code>${pkgs.icewm}/bin/icewm</code>
<code>pathToScript</code> can also be a path to an executable like <code>${pkgs.icewm}/bin/icewm</code>


=== Tiger VNC ===
=== TigerVNC ===


Nixpkgs has a package but no service.  
Nixpkgs has a package but no service.  
Line 51: Line 51:


For an automated nixos config see [[TigerVNC]].
For an automated nixos config see [[TigerVNC]].
However, you'll more likely have success running [https://search.nixos.org/packages?channel=unstable&query=x11vnc&show=x11vnc x11vnc] on the remote/far-away server, while only using `vncviewer` from the TigerVNC package from where you're sitting. Quality documentation for x11vnc usage is at its [https://github.com/LibVNC/x11vnc/?tab=readme-ov-file#readme official repository].


=== x2go ===
=== x2go ===
Line 263: 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 <code>--port</code> 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 ===