Understanding Console Access
The console feature provides:- Output Monitoring: View the last lines of server console output
- Command Execution: Send commands to the running server
- Screen Integration: Uses GNU Screen for process management
- Real-time Updates: Refresh output on demand
Console access requires your server to be running with GNU Screen. GamePanelX automatically manages Screen sessions for all servers.
Accessing the Console
To open the console for a server:Console Output Display
When you open the console, two new sections appear:Output Box
Command Input
- Text input field for entering commands
- Send button to execute the command
- Press Enter key as alternative to clicking Send
Viewing Server Output
What You’ll See
The console displays:- Server startup messages
- Player connection/disconnection events
- Map changes
- Plugin/mod loading information
- Error messages and warnings
- Game events (kills, objectives, etc.)
- Admin command results
Output Details
Refreshing Output
To see updated console output:Console output is not live-streamed. You must manually refresh by sending commands or reopening the console to see new output.
Sending Commands
The command input allows you to send commands directly to the running server through GNU Screen.How to Send Commands
Command Examples
Depending on your game server, you can send various commands:Source Engine Games (CS:S, TF2, etc.)
Minecraft
Generic Commands
GNU Screen Integration
GamePanelX uses GNU Screen to manage game server processes.How Screen Works
Screen Benefits
Persistent Sessions
Servers keep running if SSH disconnects
Output Capture
Screen logs all console output automatically
Command Injection
Send commands to running processes
Process Management
Easy server restart and monitoring
Screen Sessions
When a server starts:- GamePanelX creates a new Screen session
- The game server runs inside the Screen session
- Screen logs output to a file
- Commands are “stuffed” into the Screen input
- Output is read from the Screen log file
Console Output Retrieval
Local Servers
For local servers, output is read directly:Remote Servers
For remote servers via SSH:Output retrieval uses the network class’s
runcmd() method for remote servers, ensuring proper authentication and SSO user context.Command Security
Command Validation
All commands are validated before execution:Prevented Actions
Safe Command Execution
Commands are safely injected into the Screen session:Console Workflow Example
Changing Server Map
Here’s a complete workflow for changing the map:JavaScript Console Integration
Auto-Focus and Enter Key
The console includes JavaScript enhancements:AJAX Command Sending
Commands are sent via AJAX:Limitations and Considerations
Output Is Not Live
The console does not provide real-time streaming:- Output must be manually refreshed
- Send a command to trigger refresh
- No automatic polling or updates
- Limited to last ~100 lines
Screen Log Size
Screen logs can grow large over time:- Logs are not automatically rotated by GamePanelX
- Consider manual log cleanup for long-running servers
- Screen log location:
~/.screen/GPX_{ID}.log
Command Limitations
- Only game console commands work (no shell commands)
- No interactive commands supported
- No output confirmation for silent commands
- Some games buffer output (delayed display)
Troubleshooting
Console Output Is Empty
Possible Causes:- Server is not running
- Screen session is not active
- Screen logging is disabled
- Server just started (no output yet)
- Verify server status shows “Online”
- Try restarting the server
- Check Screen session exists via SSH:
screen -ls
Commands Don’t Work
Possible Causes:- Wrong command syntax for your game
- Server not responding to input
- Screen session disconnected
- Command blocked by validation
- Verify command syntax in game documentation
- Check for special characters or shell operators
- Try a simple command like
statusorhelp - Restart the server if Screen session is broken
Output Not Refreshing
Possible Causes:- Screen log file not updating
- Permissions issue on log file
- Screen session closed
- Send a test command to trigger refresh
- Check server is still running
- Restart server to recreate Screen session
Advanced Usage
Direct Screen Access
For advanced users with SSH access:Monitoring Multiple Servers
To check multiple servers:- Open each server in separate browser tabs
- Open console on each server’s Info tab
- Switch between tabs to monitor output
- Use browser tab titles to identify servers
Next Steps
Managing Servers
Learn about server control and configuration
File Management
Edit configuration files and manage server files
Client Portal Overview
Return to client portal overview