There seems to have been confusion with regards to which exit code and
message was returned by rdesktop for the following cases:
* disconnected by admin
* logged out by admin
* disconnect by user
* logoff by user
Looking at Microsoft's official documentation as well as testing using
Windows Server 2008 R2, 2012 R2 and 2016 reveals that this commit fixes
this issue. They do now match the reasons sent by the server.
rdesktop is an open source client for Microsoft's RDP protocol. It is
known to work with Windows versions ranging from NT 4 Terminal Server
to Windows 2012r2 RDS. rdesktop currently has implemented the RDP version 4
and 5 protocols.
Installation
rdesktop uses a GNU-style build procedure. Typically all that is necessary
to install rdesktop is the following:
% ./configure
% make
% make install
The default is to install under /usr/local. This can be changed by adding
--prefix=<directory> to the configure line.
The smart-card support module uses PCSC-lite. You should use PCSC-lite 1.2.9 or
later. To enable smart-card support in the rdesktop add --enable-smartcard to
the configure line.
Note for users building from source
If you have retreived a snapshot of the rdesktop source, you will first
need to run ./bootstrap in order to generate the build infrastructure.
This is not necessary for release versions of rdesktop.
Usage
Connect to an RDP server with:
% rdesktop server
where server is the name of the Terminal Services machine. (If you receive
"Connection refused", this probably means that the server does not have
Terminal Services enabled, or there is a firewall blocking access.)
You can also specify a number of options on the command line. These are listed
in the rdesktop manual page (run "man rdesktop").