Rather than only using rdesktop (which does not work properly with newer versions of RDP), use xfreerdp if available and fall back to rdesktop if not.
Rather than only using rdesktop (which does not work properly with newer versions of RDP), use xfreerdp if available and fall back to rdesktop if not.