Usage Guide
Learn how to use SessionCast effectively.
Getting Started
Basic Workflow
Create tmux Session
Create a tmux session on your local machine.
tmux new -s workspace
Verify Agent
If the Agent is running, sessions are detected automatically.
# Check Agent logs
tail -f ~/sessioncast-agent.log
# Verify session registration message
# Look for "Session 'workspace' registered" output
Access via Web
Open SessionCast in your browser and sign in with your Google account.
Select and Use Session
Click on a session from the list to view the terminal.
tmux Sessions
Creating Sessions
# Create new session
tmux new -s session-name
# Create session in background
tmux new -d -s session-name
# Add window to session
tmux new-window -t session-name
# List sessions
tmux ls
Session Naming Convention
In SessionCast, sessions are identified using the machineId/tmuxSession format:
my-workstation/dev- dev session on my-workstation machineserver-01/monitoring- monitoring session on server-01 machine
Auto-Discovery Mode
Setting autoDiscovery: true allows the Agent to automatically detect all tmux sessions:
# ~/.tmux-remote.yml
machineId: my-workstation
relay: wss://your-server.com/ws
token: agt_your_token
autoDiscovery: true
Excluding from Auto-Discovery
To exclude specific sessions, prefix the session name with _ (underscore):
tmux new -s _private-session
Web Interface
Login
SessionCast uses Google OAuth 2.0:
- Click the "Sign in with Google" button on the web page
- Select and authenticate your Google account
- You'll be automatically redirected to the session list
Domain Restriction
If the administrator has set ALLOWED_DOMAINS, only emails from those domains can access.
Session List
After login, only sessions registered with your Agent Token are displayed:
- Session Label: Configured label or tmux session name
- Machine ID: The machine where the session is running
- Status: Connected/Disconnected
Terminal View
Clicking a session displays the terminal screen:
- Real-time Display: Current state of the tmux session
- Auto-resizing: Terminal adjusts to browser window size
- Color Support: Color output via ANSI escape codes
Keyboard Input
Basic Input
Click the terminal area to enable keyboard input:
- Regular text input
- Execute commands with Enter key
- Arrow keys, Backspace, Delete and other special keys
Control Key Combinations
| Key | Function |
|---|---|
| Ctrl + C | Interrupt current process (SIGINT) |
| Ctrl + D | Send EOF / Exit shell |
| Ctrl + Z | Suspend process (SIGTSTP) |
| Ctrl + L | Clear screen |
| Ctrl + A | Move to beginning of line |
| Ctrl + E | Move to end of line |
tmux Prefix Key
The default tmux prefix key is Ctrl + B:
| Key Sequence | Function |
|---|---|
| Ctrl+B → c | Create new window |
| Ctrl+B → n | Next window |
| Ctrl+B → p | Previous window |
| Ctrl+B → % | Split vertically |
| Ctrl+B → " | Split horizontally |
| Ctrl+B → d | Detach from session |
Note
Some browser shortcuts may conflict. For example, Ctrl+W closes the browser tab. These keys may not be passed to the terminal.
Session Management
Creating Sessions from Web
You can create new tmux sessions from the Web UI:
- Click "New Session" button on the session list screen
- Select a machine
- Enter session name
- Click "Create" button
The Agent receives the request and creates the tmux session locally.
Terminating Sessions
Ways to terminate a session:
- Web UI: Click delete button in session list
- Terminal:
exitcommand or Ctrl+D - tmux command:
tmux kill-session -t session-name
Refreshing Session List
The session list updates automatically, but to refresh manually:
- Click refresh button on the session list screen
- Browser refresh (F5)
Troubleshooting
Session Not Showing in List
Checklist:
- Check if Agent is running
ps aux | grep sessioncast-agent - Check Agent logs
tail -f ~/sessioncast-agent.log - Verify tmux session exists
tmux ls - Verify Agent Token is correct
- Verify logged-in email matches Token owner
Empty Screen
Cause:
Newly created tmux sessions may show an empty screen if no commands have been executed yet.
Solution:
- Attach to the session directly from terminal and run a command
tmux attach -t session-name - Or press any key in the web interface to trigger a screen refresh
Keyboard Input Not Working
Checklist:
- Click the terminal area to ensure it has focus
- Check WebSocket connection status in browser developer tools
- Check Agent logs for key input messages
Frequent Disconnections
Possible Causes:
- Unstable network connection
- Proxy/firewall blocking WebSocket
- Server resource shortage
Solution:
- Check network connection status
- Verify WebSocket is allowed in proxy settings
- Check server logs:
journalctl -u sessioncast -f
Restarting the Agent
launchctl unload ~/Library/LaunchAgents/com.sessioncast.agent.plist
launchctl load ~/Library/LaunchAgents/com.sessioncast.agent.plist
sudo systemctl restart sessioncast-agent
# Kill existing process
pkill -f sessioncast-agent
# Restart
nohup java -jar ~/sessioncast-agent.jar > ~/sessioncast-agent.log 2>&1 &