Error: 'RDPClient' object has no attribute '_get_best_monitor_selection' Root cause: Method was accidentally removed during previous code refactoring when adding _get_monitors_combined_resolution method. Fix: - Restored complete _get_best_monitor_selection method with all functionality - Cleaned up duplicate/corrupted code fragments - Removed duplicate _setup_gui method definitions - Added test script to verify method accessibility Verified: - _get_best_monitor_selection(2) returns '1,2' ✅ - _get_monitors_combined_resolution('1,2') returns '3840x1080' ✅ - Both methods properly integrated in RDPClient class ✅ The '2 Monitors' selection should now work without AttributeError.
Professional RDP Client
A modern Python-based RDP client with GUI interface that replaces the zenity-based bash script with enhanced functionality and better user experience.
Features
- Professional GUI Interface: Modern tkinter-based interface with Microsoft RDP Client-like design
- Connection Management: Save, load, and manage multiple RDP connections
- Credential Storage: Encrypted password storage with automatic credential management
- Connection History: Track and quickly access recently used connections
- Full Feature Support:
- Multiple monitor support
- Sound and microphone redirection
- Clipboard sharing
- Drive sharing
- Custom resolutions and color depths
- Various display options (wallpaper, themes, fonts)
Requirements
- Python 3.6+
- xfreerdp (FreeRDP client)
- Required Python packages:
- tkinter (usually included with Python)
- cryptography
- threading
- subprocess
Installation
Quick Installation (Recommended)
One-line installation that handles everything automatically:
Option 1: SSH access (full-featured installer)
curl -fsSL https://gitea.egonetix.de/root/rdp_client/raw/branch/main/install_rdp_client_complete.sh | bash
Option 2: HTTPS access (simple installer)
curl -fsSL https://gitea.egonetix.de/root/rdp_client/raw/branch/main/install_rdp_client_https.sh | bash
The installer will:
- Auto-detect your Linux distribution (Ubuntu, Fedora, Arch, openSUSE, etc.)
- Install all system dependencies (freerdp, python3, git, etc.)
- Clone the repository to
~/rdp-client - Set up Python virtual environment with dependencies
- Create desktop entry and launcher script
- Make the client available as
rdp-clientcommand
Manual Installation
- Clone this repository:
git clone git@gitea.egonetix.de:root/rdp_client.git
cd rdp_client
- Install dependencies:
# Install FreeRDP
sudo apt-get install freerdp2-x11 # Ubuntu/Debian
# or
sudo dnf install freerdp # Fedora/RHEL
# Install Python dependencies
pip install cryptography
- Make the script executable:
chmod +x rdp_client.py
Uninstall
If you used the quick installer, you can uninstall with:
~/rdp-client/install_rdp_client_complete.sh --uninstall
Usage
After Installation
Once installed, you can run the RDP client in several ways:
- From command line:
rdp-client - From applications menu: Search for "RDP Client"
- Direct execution:
~/rdp-client/.venv/bin/python ~/rdp-client/rdp_client.py
Configuration files are automatically created in ~/.config/rdp-client/.
Running the Application
./rdp_client.py
Or with Python directly:
python3 rdp_client.py
Virtual Environment Support
The script automatically detects and uses a virtual environment if available in the same directory:
python3 -m venv .venv
source .venv/bin/activate
pip install cryptography
./rdp_client.py
Creating Connections
- Click "New Connection" or press Ctrl+N
- Fill in the connection details:
- Server/IP address
- Username and password
- Domain (optional)
- Display settings
- Feature options
- Save the connection for future use
Managing Connections
- Connect: Double-click a saved connection or select and click "Connect"
- Edit: Right-click a connection and select "Edit"
- Delete: Right-click a connection and select "Delete"
- Recent Connections: Access recently used connections from the history list
Configuration
Configuration files are stored in ~/.config/rdp-client/:
connections.json: Saved connection profilescredentials.json: Encrypted passwordshistory.json: Connection historyrdp_client.log: Application logs
Security
- Passwords are encrypted using Fernet (symmetric encryption)
- Encryption key is derived from username@hostname
- Credential files have restricted permissions (600)
Keyboard Shortcuts
- F1: Show help and shortcuts
- Ctrl+N: New connection
- Ctrl+Q: Quit application
- Delete: Delete selected connection
- Enter: Connect to selected connection
Troubleshooting
Connection Issues
- Verify FreeRDP is installed:
which xfreerdp - Test manual connection with generated command (shown in logs)
- Check server accessibility:
ping your-server - Verify credentials and domain settings
Common Error Solutions
- STATUS_ACCOUNT_RESTRICTION: Usually resolved by the built-in security parameter handling
- Connection timeout: Check network connectivity and server availability
- Authentication failure: Verify username, password, and domain
Logs
Check the log file for detailed error information:
tail -f ~/.config/rdp-client/rdp_client.log
Migration from Bash Script
If migrating from the old zenity-based bash script:
- Connection profiles are compatible and will be automatically detected
- Encrypted credentials from the Python version will be used
- The bash script's .cred files (if any) need to be recreated in the new interface
Development
File Structure
rdp_client.py: Main application fileREADME.md: Documentation.venv/: Virtual environment (if used)
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Author
Enhanced RDP Client with Professional GUI
- Replaces zenity-based bash script with modern Python interface
- Maintains compatibility with existing connection profiles
- Adds encrypted credential storage and connection management
Version History
- v2.0: Complete Python rewrite with GUI interface
- v1.0: Original bash script with zenity interface
Note: This client provides the same reliable RDP connectivity as the original bash script but with enhanced user experience and modern interface design.