A cross-platform RDP URL handler that processes rdp:// URLs and launches the ThinCast RDP client.
- Supports both MacOS and Ubuntu Linux.
- Parses
rdp://URLs and extracts parameters. - Generates
.rdpfiles based on parameters. - Launches ThinCast RDP client with the generated
.rdpfile. - Runs silently in the background with logging.
- Seamless installation without manual intervention.
- ThinCast RDP Client must be installed on the system.
- For Ubuntu Linux:
xdg-utilspackage (installed automatically).
-
Install Python 3.8 or higher (if not already installed).
-
Install Poetry for dependency management:
curl -sSL https://install.python-poetry.org | python3 - -
Install PyInstaller:
pip install pyinstaller
-
Clone the repository and navigate to the project directory.
-
Install dependencies:
poetry install
-
Build the executable using PyInstaller and the provided spec file:
pyinstaller RDPURLHandler.spec
- This command will generate the application in the
distandbuilddirectories.
- This command will generate the application in the
-
Copy the
postinstallscript into ascriptsdirectory. (Skip this if it's already in thescriptsdirectory). -
Build the installer package:
pkgbuild \ --root dist/RDPURLHandler.app \ --identifier com.yourcompany.rdpurlhandler \ --version 1.0.0 \ --install-location /Applications \ --scripts scripts \ RDPURLHandler.pkg
-
Install the package:
- Users can install
RDPURLHandler.pkgby double-clicking it. - Prerequisites - ThinCast RDP Client must be installed on the system.
- Users can install
-
Install Python 3.8 or higher (if not already installed).
-
Install Poetry:
curl -sSL https://install.python-poetry.org | python3 - -
Install PyInstaller:
pip install pyinstaller
-
Clone the repository and navigate to the project directory.
-
Install dependencies:
poetry install
-
Build the executable using PyInstaller:
pyinstaller --onefile --name rdp_url_handler rdp_handler/main.py
- The executable
rdp_url_handlerwill be in thedistdirectory.
- The executable
-
Create the directory structure:
mkdir -p rdp-url-handler/usr/local/bin mkdir -p rdp-url-handler/DEBIAN
-
Copy the executable:
cp dist/rdp_url_handler rdp-url-handler/usr/local/bin/
-
Create the
controlfile inrdp-url-handler/DEBIAN/:# rdp-url-handler/DEBIAN/control Package: rdp-url-handler Version: 1.0.0 Section: utils Priority: optional Architecture: amd64 Depends: xdg-utils Maintainer: Your Name <you@example.com> Description: RDP URL Handler for Ubuntu A cross-platform RDP URL handler that processes rdp:// URLs and launches the ThinCast RDP client.
-
Copy the
postinstscript tordp-url-handler/DEBIAN/and set permissions:chmod 755 rdp-url-handler/DEBIAN/postinst
-
Build the
.debpackage:dpkg-deb --build rdp-url-handler
- This creates
rdp-url-handler.deb.
- This creates
-
Install the package:
sudo dpkg -i rdp-url-handler.deb
- Prerequisites - ThinCast RDP Client must be installed on the system.
- Dependencies are installed automatically.
- URL scheme registration happens during installation.
-
After installation, clicking on an
rdp://URL will automatically:- Launch the RDP URL Handler.
- Generate an
.rdpfile based on the URL parameters. - Open the ThinCast RDP client with the generated
.rdpfile.
-
Example URLs:
rdp://v=172.105.58.129:3389&username=macrometa&f=true rdp://172.105.58.129:3389?username=macrometa&f=true
- MacOS:
~/Library/Logs/RDPURLHandler/rdp_url_handler.log - Ubuntu Linux:
~/.rdpurlhandler/logs/rdp_url_handler.log
-
Clear URL handler registration (optional):
/System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.framework/Support/lsregister -u /Applications/RDPURLHandler.app
-
Remove the application:
sudo rm -rf /Applications/RDPURLHandler.app
-
Uninstall the package:
sudo dpkg -r rdp-url-handler
-
Clear URL handler registration (handled automatically during removal).