Note: FreeRDP shares the active desktop.


For ubuntu, please explain how to install FreeRDP and how to run the server part

ChatGPT said:

To install FreeRDP and run the server part on Ubuntu, follow these steps:

Installing FreeRDP

  1. Update your package list:

bash

sudo apt update

  1. Install FreeRDP: FreeRDP includes both the client (xfreerdp) and the server (freerdp-shadow-cli).

bash

sudo apt install freerdp2-x11 freerdp2-shadow-x11

Running the FreeRDP Server (freerdp-shadow-cli)

The FreeRDP server component allows you to share your desktop over RDP using freerdp-shadow-cli.

  1. Start the FreeRDP Shadow Server: Run the following command to start the server, which will share your current session:

bash

freerdp-shadow-cli

By default, freerdp-shadow-cli will start sharing your current desktop session and listen on the default RDP port (3389).

  1. Options and Flags: You can customize the server with various options. Some useful flags include:
  • +auth: Require authentication.
  • /port:<port_number>: Specify a custom port.
  • +clipboard: Enable clipboard sharing.
  • +sound: Enable sound redirection.

Example with options:

bash

freerdp-shadow-cli +auth /port:3390 +clipboard +sound

  1. Accessing the RDP Server: Use an RDP client (such as xfreerdp, Microsoft’s Remote Desktop Client, or any other RDP client) to connect to the server. For example, from another system, you can connect using:

bash

xfreerdp /v:<server_ip_or_hostname> /u:<username>

Stopping the Server

To stop the FreeRDP server, simply interrupt the process by pressing Ctrl+C in the terminal where it’s running.

This setup allows for quick sharing of your desktop session over RDP using FreeRDP.