RDP

Intro

Remote desktop protocol (RDP) is a secure network communications protocol designed for remote management, as well as for remote access to virtual desktops, applications and an RDP terminal server.
RDP allows network administrators to remotely diagnose and resolve problems individual subscribers encounter. RDP is available for most versions of the Windows, MacOS or as an open source.
Noteworthy properties of RDP include encryption, smart card authentication, bandwidth reduction, resource sharing, the ability to use multiple displays and the ability to disconnect temporarily without logging off. RDP also allows for the redirection of functions such as audio and printing.
RDP can support up to 64,000 independent channels for data transmission. Data can be encrypted using 128-bit keys, and the bandwidth reduction feature optimizes the data transfer rate in low-speed connections.
The RDP protocol is designed to provide remote access through port 3389. An RDP-enabled application or service packages the data that is to be transmitted, and the Microsoft Communications Service directs the data to an RDP channel. From there, the operating system encrypts the RDP data and adds it to a frame so that it can be transmitted.
The Terminal Server Device Redirector Driver handles all RDP protocol activity. This driver is made up of subcomponents such as the RDP driver (Wdtshare.sys), which handles user interfaces, transfers, encryption, compression and framing. The transport driver (Tdtcp.sys) is responsible for packaging the protocol in such a way that allows it to be sent across a TCP/IP network.

See latest versions in use at https://en.wikipedia.org/wiki/Remote_Desktop_Protocol

The Remote Window Isn’t the Correct Size

Incorrect window size is another common Remote Desktop Connection issue. When you create the remote desktop connection, the window is too large, too small, or doesn’t correlate to the settings you input.
You have two potential fixes here.
First, you can force the Remote Desktop connection to use a specific size via the Run function. Hit Windows key + R, then input:

mstsc.exe /h:X /w:X

Where “X” is the height and width of the Remote Desktop viewing window you desire. Remote Desktop will remember your settings for future remote viewing settings.
The Remote Desktop Connection client has a handy screen resolution slider that scrolls from 640×480 up to Full Screen for your screen. Make sure to set the slider to Full Screen if you want a full-screen remote connection for each connection.

How to Save Your Remote Desktop Connection Custom Settings

If you regularly connect to several different servers or clients, saving a custom configuration for each Remote Desktop will save time in the future. You can set the optimum width, height, and color settings for each server or terminal.
Open the Remote Desktop Connection dialog, then select Show Options. You will now see the Connection settings options. Select Save As, specify your save location, then select Save to create a custom Remote Desktop Connection file (.RDP).
Now, browse to the Remote Desktop Connection configuration file. You can edit the configuration file using a text editor, such as Notepad or Notepad++. Right-click the configuration file and select Open with…, then select your text editor.
The first four lines show your remote connection screen size options (plus whether multi-monitor mode is available). You can edit the screen mode to set whether the remote window session appears full screen. For instance, “id:i:2” sets full screen, whereas “id:i:1” sets the remote connection to appear in a window.
If you set the screen mode to “2” for full screen, the desktopwidth and desktopheight automatically match the screen size of the host client. However, if you are using screen mode “1,” you can use the desktopwidth and desktopheight settings to set a specific window size.
After you confirm your settings, add the following string to the end of the file:

smart sizing:i:1

Smart sizing allows you to dynamically alter your screen settings without messing around with configuration files while the Remote Desktop connection is active. However, you must add the string for each custom configuration you create.

Handy Remote Desktop Connection Shortcuts

You can boost your Remote Desktop Connection productivity using a handful of keyboard shortcuts. These shortcuts are designed to work when you access Remote Desktop using the Run dialog.

  • Start Remote Desktop in full-screen mode: mstsc /f
  • Start Remote Desktop in Admin Mode: mstsc /admin
  • Matches your Remote Desktop session with the local virtual desktop: mstsc /span
  • Matches your Remote Desktop session to the Client Layout: mstsc /multimon
  • Open the .RDP file for editing—change “connection file” to your file name before running the command: mstsc /edit “connection file”

You can use the following Remote Desktop shortcuts once your Remote Desktop connection is live:

  • Switches your Remote Desktop client between full-screen and windowed mode: Ctrl + Alt + Pause
  • Force the Remote Desktop into full-screen mode: Ctrl + Alt + Break
  • Takes a screenshot of the active Remote Desktop window: Ctrl + Alt + Minus
  • Takes a screenshot of the entire Remote Desktop: Ctrl + Alt + Plus
  • Reboots the remote computer: Ctrl + Alt + End

Ubuntu server RDP – option 1 – xrdp

Access via SSH and install XRDP

sudo apt install xrdp

Follow this with

sudo systemctl enable xrdp

Ubuntu server RDP – option 2 – vnc

Another option with full remote desktop functionality is VNC. This requires a client application on the Windows PC and a server on Ubuntu.
On the remote PC, install the TightVNC Server component after checking for updates:

sudo apt update

Then install the server utility:

sudo apt install tightvncserver

You’ll then need to run it:

sudo tightvncserver

At this point you’ll be prompted to set a password for the connection. You’ll also be given a desktop number, usually :1. Keep a note of this.

Now that TightVNC Server is set up on Ubuntu, you’ll need to install the client on Windows. This can be downloaded from www.tightvnc.com/download.php—make sure you choose the right version, as it is available in 32-bit and 64-bit flavors.

TightVNC tools are only available as a bundle, so once installed, look for TightVNC Viewer in Windows search.

Once you’ve launched the viewer, input the IP address of the Ubuntu box in Remote Host, followed by the desktop number. So, it might look like this:

192.168.0.99:1

Input the password when prompted and commence your remote desktop activity!

TightVNC can be set More Secure – By default, TightVNC will encrypt your password, but nothing else. This makes it insecure for connections over the internet. Fortunately, it can be made more secure, thanks to SSH and Xming.
To use this, download and install the Xming tool for Windows from Sourceforge. Once this is done, look for the desktop shortcut, right-click, and choose Properties.
Click Apply to save the change, then OK. Double-click the icon to run Xming, then open PuTTY. Here, expand the menu on the left to Connection > SSH > X11.
Check Enable X11 Forwarding, then return to Session at the top of the menu.

It will be most secure of RDP over SSH or VNC over SSH (Mixing VNC with SSH) is used