Remote Desktop: Difference between revisions
imported>Kavika13 Mention polkit policies that may fix the blackscreeen on reboot in XRDP |
imported>MichaelCTS Add information about starting desktop sessions |
||
Line 1: | Line 1: | ||
== Clients == | |||
* Tiger VNC | * Tiger VNC | ||
* Guacamole | * Guacamole | ||
Line 5: | Line 5: | ||
* x2go | * x2go | ||
== Servers == | |||
* XRDP | * XRDP | ||
=== Configuration === | |||
Most servers provide a <code>vncserver</code> command. | |||
Various servers provide different configuration options either by CLI or by configuration file. | |||
==== Desktop session ==== | |||
To start a desktop session or window manager, one currently has to do this manually there is a bug where servers still have hard-coded paths to <code>/usr/share/xsessions</code> to look for <code>.desktop</code> files. That means one has to write a script that starts the desktop session, window manager, or any other X application. | |||
Some servers will automatically run <code>$HOME/.vnc/xstartup</code> but the more secure options is to be explicit. | |||
Write an executable script and run <code>vncserver -xstartup $pathToScript</code> | |||
An example script can be | |||
<source lang="bash"> | |||
#!/usr/bin/env bash | |||
# set some env variables | |||
# start window manager | |||
exec icewm | |||
</source> | |||
<code>pathToScript</code> can also be a path to an executable like <code>${pkgs.icewm}/bin/icewm</code> | |||
---- | ---- |
Revision as of 11:18, 9 November 2023
Clients
- Tiger VNC
- Guacamole
- KRDC
- x2go
Servers
- XRDP
Configuration
Most servers provide a vncserver
command.
Various servers provide different configuration options either by CLI or by configuration file.
Desktop session
To start a desktop session or window manager, one currently has to do this manually there is a bug where servers still have hard-coded paths to /usr/share/xsessions
to look for .desktop
files. That means one has to write a script that starts the desktop session, window manager, or any other X application.
Some servers will automatically run $HOME/.vnc/xstartup
but the more secure options is to be explicit.
Write an executable script and run vncserver -xstartup $pathToScript
An example script can be
#!/usr/bin/env bash
# set some env variables
# start window manager
exec icewm
pathToScript
can also be a path to an executable like ${pkgs.icewm}/bin/icewm
Tiger VNC
Nixpkgs has a package but no service.
The server component can be started using the vncserver
command.
To connect use the vncviewer
command.
x2go
X2go client is packaged in nixos as x2goclient
.
The server is installed by putting the following line:
services.x2goserver.enable = true;
to /etc/nixos/configuration.nix.
RDP
NixOS has first class support for XRDP server.
services.xserver.enable = true;
services.xserver.displayManager.sddm.enable = true;
services.xserver.desktopManager.plasma5.enable = true;
services.xrdp.enable = true;
services.xrdp.defaultWindowManager = "startplasma-x11";
services.xrdp.openFirewall = true;
(Source: Discourse Link, nixpkgs code)
Notice: You need to log out the user first on the remote machine, otherwise you'll get a black screen. (Source: Reddit ). It may be particularly true on a multi-user system. You may be able to work around this by enabling and configuring Polkit. The configuration for enabling these permissions is the example code on that page.
freerdp
or remmina
can be used on the client side.
Guacamole
Not yet added to nixpkgs
https://github.com/NixOS/nixpkgs/issues/17879
Meshcentral
Meshcentral is a self-hosted open source administration tool similar to teamviewer. Meshcentral server has been added, and can be used with:
services.meshcentral.enable = true;
(Meshcentral Server)[1]
however the agent is not yet added so you can't deploy clients i nixos. yet. https://github.com/NixOS/nixpkgs/issues/167527