Skip to content

Bug: Application Crashes When Opening Terminal in Docker Environment #108

Description

@malys

Summary

When attempting to open a terminal, Claude Code Studio throws an uncaught exception because it assumes gnome-terminal is available.

This causes a server-side error and the action fails.

Environment

  • Claude Code Studio: v7.x
  • Docker deployment
  • Linux container
  • No desktop environment installed

Error

uncaughtException

Executable not found in $PATH: "gnome-terminal"


Stack trace:

Error: Executable not found in $PATH: "gnome-terminal"
    at spawn
    at openTerminal (/app/server.js:10865:9)

Current Behavior
User clicks "Open Terminal" (or a feature requiring terminal launch).
CCS attempts to execute:
gnome-terminal

Docker container does not contain a graphical desktop environment.
Exception is thrown:
Executable not found in $PATH: "gnome-terminal"

Operation fails.
Expected Behavior

CCS should detect the execution environment and adapt accordingly.

Possible behavior:

Desktop Linux
gnome-terminal


or

konsole


or

xterm

Docker / Headless Environment

Instead of launching a GUI terminal:

Open an integrated web terminal.
Open a terminal panel in CCS.
Execute commands directly in the existing container session.
Display a helpful message explaining that graphical terminals are unavailable.
Suggested Fix

Implement terminal detection logic:

1. Integrated CCS terminal
2. gnome-terminal
3. konsole
4. xterm
5. fallback error message


Before spawning:

which gnome-terminal


or equivalent.

Docker Compatibility

Since CCS is increasingly deployed in Docker, the application should not assume the presence of:

GNOME
X11
Wayland
Desktop terminal emulators
Additional Improvement

Allow configuration:

{
  "terminalCommand": "custom-command"
}


Examples:

Integrated Terminal (by default)
gnome-terminal
konsole
tmux
screen
custom

Impact
Terminal-related features fail in Docker.
Uncaught exceptions pollute logs.
Headless deployments are affected.
Self-hosted users encounter unnecessary errors.
Priority

Medium-High

Expected User Experience

When running in Docker, opening a terminal should either:

Use an integrated web terminal, or
Gracefully report that graphical terminals are unavailable,

instead of throwing an uncaught exception.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions