Files
rdp_client/README_rdp_client.md
root 8d25033ea5 Add Python RDP Client with multi-monitor support and enhanced features
- Complete rewrite of bash RDP script in Python with tkinter GUI
- Multi-monitor support with intelligent monitor selection
- Encrypted credential storage using Fernet encryption
- Connection profiles with advanced configuration options
- Fixed authentication issues (STATUS_ACCOUNT_RESTRICTION)
- Enhanced monitor detection and selection logic
- Professional tabbed interface with General/Advanced/Performance tabs
- Install script and documentation included
2025-09-18 10:36:36 +02:00

221 lines
6.4 KiB
Markdown

# RDP Client - Python Version
A modern, professional RDP client with a user-friendly GUI, developed as a Python replacement for the shell-based `rdp.sh` script.
## Features
### ✨ **Enhanced GUI Interface**
- Modern tkinter-based interface with professional styling
- Tabbed connection dialog for organized settings
- Real-time connection details display
- Responsive design with proper scaling
### 🔐 **Secure Credential Management**
- Encrypted password storage using industry-standard cryptography
- Per-connection credential saving
- Secure key derivation based on user and hostname
- Easy credential management and clearing
### 📊 **Connection History & Recent Connections**
- Automatic tracking of connection usage
- Recent connections list with usage counts
- Quick access to frequently used connections
- Connection history persistence
### 🔄 **Import/Export Functionality**
- Export connections to JSON files for backup
- Import connections from JSON files
- Merge or replace strategies for importing
- Include/exclude credentials in exports
- Timestamped export files
### 🧪 **Connection Testing**
- Test server reachability before connecting
- RDP service availability checking
- Detailed test results with troubleshooting hints
- Network connectivity validation
### ⌨️ **Keyboard Shortcuts**
- **Ctrl+N** - Create new connection
- **Ctrl+O** - Import connections
- **Ctrl+S** - Export connections
- **Ctrl+T** - Test selected connection
- **F5** - Refresh connections list
- **Enter** - Connect to selected connection
- **Delete** - Delete selected connection
- **F2** - Edit selected connection
- **F1** - Show help dialog
- **Tab/Shift+Tab** - Navigate between connection lists
### 🔧 **Advanced RDP Features**
- Full resolution control (including full screen)
- Multiple monitor support (extend/span)
- Audio redirection (local/remote/off)
- Microphone redirection
- Clipboard sharing
- Drive sharing (home directory)
- Printer redirection
- USB device redirection
- COM port redirection
- Performance optimizations (compression, wallpaper, themes, fonts)
### 📝 **Comprehensive Logging**
- Detailed connection logs
- Error tracking and diagnosis
- User action logging
- Automatic log rotation
### 🚨 **Enhanced Error Handling**
- User-friendly error messages
- Detailed troubleshooting information
- Network connectivity validation
- RDP-specific error interpretation
- Connection timeout handling
## Installation
### Prerequisites
- Python 3.8 or higher
- `xfreerdp` (FreeRDP client)
- tkinter (usually included with Python)
### Install FreeRDP
```bash
# Ubuntu/Debian
sudo apt install freerdp2-x11
# Fedora/RHEL
sudo dnf install freerdp
# Arch Linux
sudo pacman -S freerdp
```
### Install Python Dependencies
The script will automatically create a virtual environment and install dependencies:
```bash
# The cryptography package is automatically installed when first run
pip install cryptography # or let the script handle it
```
## Usage
### Quick Start
```bash
# Make executable and run
chmod +x rdp_client.sh
./rdp_client.sh
```
### Direct Python Execution
```bash
# Using the virtual environment
.venv/bin/python rdp_client.py
# Or if you have dependencies installed globally
python3 rdp_client.py
```
### Creating Your First Connection
1. Click "New Connection" or press **Ctrl+N**
2. Fill in the connection details:
- **Connection Name**: A friendly name for this connection
- **Server/IP**: The RDP server address
- **Username**: Your username
- **Password**: Your password (encrypted and stored securely)
- **Domain**: Optional domain name
3. Configure advanced settings in the tabs:
- **Advanced**: Resolution, monitors, audio, clipboard, drive sharing
- **Performance**: Compression, visual effects, hardware redirection
4. Click "Save" to store the connection
### Connecting
- **Double-click** any connection to connect immediately
- **Select** and click "Connect"
- **Select** and press **Enter**
- Use **Recent Connections** for quick access to frequently used servers
### Testing Connections
- Select a connection and click "Test Connection" or press **Ctrl+T**
- The test will verify:
- Network reachability
- RDP service availability
- Port accessibility
- Detailed results help troubleshoot connection issues
## File Locations
All configuration files are stored in `~/.config/rdp-client/`:
- `connections.json` - Saved connection profiles
- `credentials.json` - Encrypted credentials
- `history.json` - Connection history
- `rdp_client.log` - Application logs
## Migration from rdp.sh
The Python version can coexist with the original `rdp.sh` script. While they use different storage formats, you can:
1. Export connections from the old script (if supported)
2. Manually recreate important connections in the new GUI
3. Use the import functionality to bulk-add connections
## Security Notes
- Passwords are encrypted using Fernet (AES 128) with PBKDF2 key derivation
- Encryption key is derived from username@hostname combination
- Credentials are only decryptable by the same user on the same machine
- Log files do not contain passwords (shown as ***)
- Export files can optionally include encrypted credentials
## Troubleshooting
### Common Issues
**"xfreerdp not found"**
- Install FreeRDP: `sudo apt install freerdp2-x11`
**"Connection failed - Authentication error"**
- Verify username, password, and domain
- Check if account is locked or disabled
- Use "Test Connection" to verify server accessibility
**"Server unreachable"**
- Check server address and network connectivity
- Verify firewall settings
- Ensure RDP is enabled on the target server
**"GUI doesn't start"**
- Ensure tkinter is installed: `sudo apt install python3-tk`
- Check Python version: `python3 --version` (3.8+ required)
### Logs and Debugging
Check the log file for detailed error information:
```bash
tail -f ~/.config/rdp-client/rdp_client.log
```
## Contributing
The RDP client is designed to be modular and extensible. Key areas for enhancement:
- Additional RDP client backends (rdesktop, xrdp)
- LDAP/Active Directory integration
- Connection profiles with templates
- Multi-language support
- Plugin system for custom authentication
## License
This project follows the same license as the original rdp.sh script.
## Version History
- **v2.0** - Complete Python rewrite with GUI
- **v1.x** - Original bash/zenity implementation
---
*For more information about the original shell script, see `rdp.sh` in the same directory.*