How to connect windows remote desktop with xrdp

Here, I will introduce the installation and configuration of xrdp. We can easily use windows remote desktop Linux.

How to install and configure xrdp

Open terminal: install in turn

sudo apt-get install xrdp

sudo apt-get install vnc4server tightvncserver

set xrdp

echo “gnome-session –session=gnome-classic” &> ~/.xsession

The function of this command is due to the installation of GNOME desktop. In Ubuntu 12.04, there are multiple desktop managers such as unity and gnome at the same time. When you need to start up, you need to specify one, otherwise

Even after the remote login verification is successful, it is only the background.

The configuration document of xrdp is in/etc/xrdp directory xrdp.ini and sesman.in Generally, the default is selected.

Restart xrdp

sudo /etc/init.d/xrdp restart

Mstsc running Windows

That is windows remote desktop, open input remote IP, connect, input user password to remote Linux

Errors encountered

1. When xrdp visits Ubuntu, it only sees the background, but not the menu bar

Methods: install Gnome panel
sudo apt get install Gnome panel

2. Error occurred: connection error

connecting to sesman ip 127.0.0.1 port 3350
sesman connect ok
sending login info to sesman
login successful for display 14
started connecting
connecting to 127.0.0.1 5914
error – problem connecting

xrdp- sesman.log The following error is:

[info] starting xvnc session…
[error] X server for display 10 startup timeout [info] starting xrdp sessvc – xpid = 2924 – wmpid = 2923
[error] X server for display 10 startup timeout
[error] another xserver is already active on display 10
[debug] about connection…
if your log has a similar X server for display 10 startup timeout and another xserver is already active on display 10

the root of the problem lies in tightvnc. The version of the problem conflicts with X font, resulting in an error connecting to xserver .

Solution:

apt-get purge tightvnc xrdp
apt-get install tightvncserver xrdp

Finally:

Start the xrdp service, sudo/etc/init.d/xrdp restart. At this time, the corresponding port will be enabled, and the configuration can be done by default.

Through the command: netstat – TNL

Check that the three ports of 3350, 3389 and 5910 are in listen. Generally, there is no problem.

3. After running for a period of time, xrdp appears_ mm_ process_ login_ response: login failed

Cause of the problem: the remote desktop is not shut down correctly. Although the remote desktop connection is shut down in Windows system, the process on Linux is still running, which leads to the maximum number of connections and problems.

Solution: by setting sesman.in The parameters in the file are solved.

root@lab403-1F :~# cat /etc/xrdp/ sesman.ini
[Globals]
ListenAddress=127.0.0.1
ListenPort=3350
EnableUserWindowManager=1
UserWindowManager= startwm.sh
DefaultWindowManager= startwm.sh

[Security]
AllowRootLogin=1
MaxLoginRetry=4
TerminalServerUsers=tsusers
TerminalServerAdmins=tsadmins

[Sessions]
X11DisplayOffset=10
MaxSessions=50
KillDisconnected=1
IdleTimeLimit=0
DisconnectedTimeLimit=0

[Logging]
LogFile=/var/log/xrdp- sesman.log
LogLevel=DEBUG
EnableSyslog=0
SyslogLevel=DEBUG

[X11rdp]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp

[Xvnc]
param1=-bs
param2=-ac
param3=-nolisten
param4=tcp
param5=-localhost
param6=-dpi
param7=96

You can modify the session settings: limit the maximum session to maxsessions = 50
and killdisconnected = 1; Linux will shut down the session process every time you disconnect.

Then restart/etc/init.d/xrdp restart to solve the problem

Similar Posts: