Files
ClaudeProjectManager/activity_server_cmd_fix.md
Claude Project Manager 4dab418f2f Initial commit
2025-07-09 22:10:42 +02:00

51 Zeilen
2.0 KiB
Markdown

# Activity Server CMD Connection Fix
## Problem
Users had to manually navigate to `/home/claude-dev/cpm-activity-server` after connecting via SSH when using the Activity Server CMD button.
## Solution Implemented
### 1. Enhanced VPS Connection Module
Modified `vps_connection.py` to create a more robust `create_activity_server_script()` method that:
- Detects available tools (PowerShell, plink, WSL, ssh)
- Attempts automatic directory change using multiple methods
- Provides clear fallback instructions when automation isn't possible
### 2. Project Tile Updates
Modified `gui/project_tile.py` to:
- Enable CMD button for both VPS Server and Activity Server tiles
- Use the VPS connection module for generating connection scripts
- Properly handle different project types
### 3. Connection Methods (in order of preference)
#### PowerShell + plink
- Uses PowerShell to better control plink execution
- Attempts to run commands after authentication
- Falls back to interactive mode with instructions
#### plink with batch commands
- Tries to execute `cd /home/claude-dev/cpm-activity-server && exec bash -l`
- If that fails, provides interactive session with clear instructions
#### WSL + sshpass
- Most reliable method when available
- Automatically changes directory and starts claude
- Uses inline bash commands for better control
#### Standard SSH fallback
- Clear instructions displayed for manual navigation
- Password shown for easy copy/paste
## Usage
1. Click the "CMD" button on the Activity Server tile
2. The script will attempt to connect and automatically navigate to the correct directory
3. If automatic navigation fails, clear instructions are displayed
## Files Modified
- `/vps_connection.py` - Enhanced `create_activity_server_script()` method
- `/gui/project_tile.py` - Updated CMD button logic and connection handling
## Additional Files Created
- `/activity_server_connect.ps1` - PowerShell script for enhanced connection (optional)
- `/setup_activity_server_profile.sh` - Server-side profile setup script (optional)