Skip to content

"Open project" button fails silently on headless / remote Linux hosts (zenity failure swallowed as cancellation) #328

Description

Description

When running ThinkRail on a remote / headless Linux host (e.g., accessed via SSH port forwarding), clicking the "Open project" button in the Web UI does nothing and fails completely silently.

Root Cause

In packages/server/src/dialog/dialog.ts:

  1. pickersFor("linux") lists zenity and kdialog with nonZeroExit: "cancel".
  2. On a headless Linux server (or SSH session without $DISPLAY / X11), zenity --file-selection --directory exits with code 1 (Gtk-WARNING **: Failed to open display).
  3. selectDirectory() catches the non-zero exit code and interprets it as user cancellation because picker.nonZeroExit === "cancel", returning { path: null }.
  4. As a result, the failure to open the display is masked as a user cancellation, causing the "Open project" button in the web UI to fail silently without any error notification or fallback input.

Steps to reproduce

  1. Run thinkrail on a headless Linux host (e.g., via SSH with DISPLAY unset).
  2. Connect to the web UI from a browser (e.g., via SSH port forwarding to http://localhost:24242).
  3. Click "Open project" in the web UI.

Expected behavior

  • If desktop pickers fail (or in a remote/headless setup), provide a fallback in-browser path input modal.
  • At minimum, distinguish actual user cancellation from picker execution failure (e.g., missing $DISPLAY) and report an error to the frontend so the user knows what happened.

Actual behavior

zenity crashes with Failed to open display, which is swallowed as null, causing the button click to do nothing.

Environment

  • OS: Ubuntu 24.04 (Linux x86_64)
  • ThinkRail version: 0.0.19
  • Node version: v26.6.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions