# Multi-Desktop Setup Guide
This guide explains how to use the robotics webapp with multiple Windows desktops and monitors for optimal workflow.
## ⚠️ Hardware Requirements
**RECOMMENDED: Multiple Monitors Required for Optimal Work Environment**
For the best experience with the robotics webapp, **multiple monitors are strongly recommended**:
- **Minimum**: 2 monitors (webapp + one environment app)
- **Recommended**: 3-4 monitors (webapp + Unity3D + Resonite + VRChat/VRoid)
- **Optimal**: 4+ monitors for full multi-app workflow
**Why Multiple Monitors?**
- **Simultaneous Visibility**: View webapp controls while monitoring Unity3D, Resonite, etc.
- **Efficient Workflow**: No need to alt-tab between applications
- **Real-time Monitoring**: See all environments and sensors simultaneously
- **Professional Setup**: Industry-standard multi-monitor robotics control station
## Desktop Usage Pattern
The robotics webapp supports flexible multi-desktop/multi-monitor setups:
### Recommended Setup (Multi-Monitor)
**For optimal workflow, use multiple monitors on Desktop 1:**
- **Monitor 1**: Robotics Webapp (control interface) - **REQUIRED**
- **Monitor 2**: Unity3D Editor - **RECOMMENDED**
- **Monitor 3**: Resonite - **RECOMMENDED**
- **Monitor 4**: VRChat or VRoid Studio - **OPTIONAL**
**Alternative: Multi-Desktop Setup**
If you have fewer monitors, distribute across virtual desktos:
- **Desktop 1 (Monitor 1)**: Robotics Webapp (control interface)
- **Desktop 2 (Monitor 1)**: Unity3D Editor
- **Desktop 3 (Monitor 1)**: Resonite
- **Desktop 4 (Monitor 1)**: VRChat or VRoid Studio
**Note**: Multi-desktop setup requires switching between desktos, which is less efficient than multi-monitor.
### No Enforced Pattern
**There is NO enforced desktop pattern.** You can:
- ✅ Run all apps on Desktop 1 across multiple monitors
- ✅ Distribute apps across multiple virtual desktops
- ✅ Mix virtual desktops and physical monitors
- ✅ Use any combination that works for your workflow
## Using Launch Controls
Each environment page has a **"Launch Configuration"** panel with:
1. **Desktop Selection**: Choose which virtual desktop (1-4) to launch the app on
2. **Monitor Selection**: Choose which physical monitor (1-4) to display the app on
3. **Start Button**: Launches the application with selected settings
4. **Stop Button**: Stops the running application
### Example: Launching Unity3D
1. Navigate to **Unity3D** page (`/unity3d`)
2. In the **Launch Configuration** panel:
- Select **Desktop 2** (or your preferred desktop)
- Select **Monitor 2** (or your preferred monitor)
- Optionally enter a **Project Path**
- Click **"Start Unity Editor"**
3. Unity Editor will launch on the specified desktop/monitor
4. The status will show: **"✅ Unity Editor Running (Desktop 2, Monitor 2)"**
### Example: Launching Resonite
1. Navigate to **Resonite** page (`/resonite`)
2. Select **Desktop 3** and **Monitor 3**
3. Click **"Start Resonite"**
4. Resonite will launch on Desktop 3, Monitor 3
## Windows Virtual Desktops
### Creating Virtual Desktops
**Windows 10/11:**
- Press `Win + Tab` to open Task View
- Click **"New Desktop"** in the top-left
- Create as many desktops as needed (typically 2-4)
### Switching Between Desktos
- `Win + Ctrl + Left/Right Arrow`: Switch between desktops
- `Win + Tab`: View all desktops and switch
### Moving Windows Between Desktos
1. Open Task View (`Win + Tab`)
2. Right-click on a window
3. Select **"Move to"** → Choose desktop
**Note:** The app launcher attempts to move windows automatically, but manual movement may be needed in some cases.
## Multi-Monitor Setup
### Windows Display Settings
1. Right-click desktop → **Display settings**
2. Arrange monitors as needed
3. Set primary monitor
4. Configure resolution and orientation
### Monitor Numbering
Monitors are numbered left-to-right based on Windows display arrangement:
- **Monitor 1**: Leftmost monitor (or primary)
- **Monitor 2**: Second monitor
- **Monitor 3**: Third monitor
- **Monitor 4**: Fourth monitor
## Application-Specific Notes
### Unity3D
- **Project Path**: Optional. If provided, Unity opens that project
- **Desktop/Monitor**: Unity window will be positioned on selected desktop/monitor
- **Fullscreen**: Not enforced - Unity can be windowed or maximized
### Resonite
- **Desktop/Monitor**: Resonite window positioned on selection
- **Fullscreen**: Not enforced - can run windowed
### VRChat
- **Desktop/Monitor**: VRChat window positioned on selection
- **Fullscreen**: VRChat typically runs fullscreen, but respects monitor selection
### VRoid Studio
- **Desktop/Monitor**: VRoid Studio window positioned on selection
- **Fullscreen**: Not enforced
## Troubleshooting
### App Doesn't Launch
1. **Check Application Path**: Ensure the app is installed and path is correct
2. **Environment Variables**: Set required env vars (see [MCP_SETUP.md](./MCP_SETUP.md))
3. **Backend Logs**: Check backend console for launch errors
4. **Permissions**: Ensure backend has permission to launch applications
### App Launches on Wrong Desktop/Monitor
1. **Manual Movement**: Use Task View to move window manually
2. **Check Settings**: Verify desktop/monitor numbers are correct
3. **Windows Limitation**: Some apps may ignore desktop/monitor hints
4. **Restart App**: Stop and restart with different settings
### Desktop/Monitor Selection Not Working
- **Windows Version**: Virtual desktop features require Windows 10+ (1809+)
- **Multiple Monitors**: Ensure monitors are properly configured in Windows
- **Fallback**: Apps will still launch, just may not be on exact desktop/monitor
## Best Practices
1. **Consistent Setup**: Use the same desktop/monitor assignments each session
2. **Monitor Layout**: Arrange monitors logically (left-to-right)
3. **Desktop Organization**: Group related apps on same desktop
4. **Start Order**: Start apps in order (Unity → Resonite → VRChat)
5. **Status Check**: Verify app status indicators show "Running"
## Advanced Configuration
### Environment Variables
Set application paths in `backend/.env`:
```env
UNITY_EDITOR_PATH=C:\Program Files\Unity\Hub\Editor\2022.3.15f1\Editor\Unity.exe
RESONITE_PATH=C:\Program Files\Resonite\Resonite.exe
VRCHAT_PATH=C:\Program Files (x86)\Steam\steamapps\common\VRChat\VRChat.exe
VROIDSTUDIO_PATH=C:\Program Files\VRoidStudio\VRoidStudio.exe
```
### Backend Configuration
The backend automatically detects applications in common install locations, but explicit paths are recommended for reliability.
## Status Indicators
- **✅ Green**: App is running on specified desktop/monitor
- **▶️ Start Button**: App is not running, click to launch
- **⏹️ Stop Button**: App is running, click to stop
- **🔄 Launching**: App is starting up
## Limitations
- **Windows Only**: Multi-desktop features are Windows-specific
- **App Cooperation**: Some apps may not respect desktop/monitor hints
- **Manual Override**: Users can always move windows manually via Task View
- **No Fullscreen Enforcement**: Apps can be windowed or fullscreen based on their own settings