rdesktop

Contents

  1. Overview
  2. Announcements
  3. Screenshots
  4. Installation
  5. Usage
  6. Feedback


Overview

Fontis has been working on a patch to SeamlessRDP by Cendio which it is hoped will eventually be accepted into the official rdesktop distribution. The patch currently adds the following features:

  • Connection sharing - allows a single rdesktop connection to launch multiple applications. When run in seamless mode, rdesktop creates and
    listens on a control socket. A new option allows rdesktop to be run in
    slave mode, which notifies the master rdesktop instance of a new command
    to be run and then exits. The master instance sends a client-to-server
    message to the SeamlessRDP server component, which runs the new command.
  • Icon support - SeamlessRDP X windows have the same icon as their Windows counterparts, instead of the default X icon. When a new window is created on the server, the server component sends a 16x16 icon back to the client via a server-to-client message. This feature has since been implemented in the current CVS version of rdesktop. The new implementation is preferred, and so our previous icon support has been removed. -- 10/9/2007
  • Always-on-top windows - previously, if a window was always-on-top on
    the server, it wouldn't be on the client. It was possible to get into a
    situation where the client and server didn't agree on what window was
    topmost, which led to some unusual effects (ie a window appearing to
    slide 'under' the side of another window). Windows that are
    always-on-top on the server (WS_EX_TOPMOST flag set) now have the
    _NET_WM_STATE_ABOVE hint set, which should keep them on top on the
    client side as well.
    Our patch for this issue has been accepted into rdesktop CVS. -- 7/3/2008
  • Tooltips - some applications had issues with tooltips, such as
    causing their parent window to lose focus while they were displayed. The
    server component now attempts to tell when a window is a tooltip
    so that the client can treat the window correctly.
    This issue has since been fixed in the latest rdesktop CVS version, so it's been removed from this patch. -- 7/3/2008
  • Closing windows - instead of ending the whole rdesktop process when
    one client-side window is closed, a client-to-server message is sent to
    tell the server to close the corresponding server-side window.
    Our patch for this issue has been accepted into rdesktop CVS. -- 11/3/2008


Announcements

Announcements regarding the patch are made on the rdesktop-devel mailing list:


Screenshots

KDEKDE
IceWMIceWM


Installation

  1. Download source for the latest version of rdesktop from CVS (press enter when prompted for a password):
    $ cvs -d:pserver:anonymous@rdesktop.cvs.sourceforge.net:/cvsroot/rdesktop login
    $ cvs -z3 -d:pserver:anonymous@rdesktop.cvs.sourceforge.net:/cvsroot/rdesktop co -P rdesktop

    Alternatively, download the rdesktop CVS snapshot which has been tested with the patch.

  2. Download the rdesktop patch to the checked out directory:
    $ cd rdesktop
    $ wget http://www.fontis.com.au/system/files/rdesktop.patch
  3. Apply the patch and compile:
    $ patch -p1 < rdesktop.patch
    $ ./bootstrap
    $ ./configure
    $ make
  4. Download updated server component and unpack. Alternatively, obtain the seamlessrdp CVS snapshot or download direct from CVS, apply the seamlessrdp patch and then compile:
    $ cvs -z3 -d:pserver:anonymous@rdesktop.cvs.sourceforge.net:/cvsroot/rdesktop co -P seamlessrdp
    $ patch -p1 < seamlessrdp.patch


Usage

The following examples assume the SeamlessRDP server component files (seamlessrdpshell.exe, seamlessrdp.dll and vchannel.dll) have been unpacked to C:\seamlessrdp\.

  • To start a SeamlessRDP session, invoke rdesktop in the same way as before applying the patch:
    ./rdesktop -A -s "C:\seamlessrdp\seamlessrdpshell.exe notepad" server
  • To run a new command inside the existing SeamlessRDP session:
    ./rdesktop -l "calc"
  • New command-line options:
    • -M: Specify the path for the control socket that the rdesktop process listens on. By default, this is $HOME/.rdesktop/seamless.socket
    • -l: Instead of starting a new rdesktop process, connect to an existing process' control socket and tell it to run a command on the server. Can be combined with the -M option to use a non-standard socket.

Running multiple applications from shortcuts can be difficult at present, since there may be no way of knowing which should be invoked first as master and which as slave commands. A possible workaround is to call rdesktop through a wrapper script which tests whether it should run as master or slave. The following perl script is an example:

#!/usr/bin/perl

my $bin = '/usr/local/bin/rdesktop';
my $host = 'w.x.y.z';
my $socket = "$ENV{'HOME'}/.rdesktop/seamless.socket";
my $shell = 'C:\seamlessrdp\seamlessrdpshell.exe';

if (@ARGV != 1) {
    print "usage: rdesktop-wrapper \n";
    exit;
}

# if socket and master session exist,
# launch command in slave mode
$numprocs = `pgrep -U $ENV{'USER'} -x rdesktop | wc -l`;
if (-e $socket and ($numprocs == 1)) {
    exec($bin, '-M', $socket, '-l', $ARGV[0]);
# otherwise, start new master mode
# only if no other sessions running
} elsif ($numprocs == 0) {
    exec ($bin, '-A', '-s', $shell . " $ARGV[0]", $host);
}


Feedback

Please direct any feedback through our contact page or through the rdesktop-devel mailing list which we are subscribed to.

AttachmentSize
rdesktop.patch11.78 KB
seamlessrdp.patch1.22 KB
seamlessrdp_server.zip183.6 KB
rdesktop_src.tar.gz316.35 KB
seamlessrdp_src.tar.gz67.46 KB