Skip to content

[ryoku] terminal: pass --class=NAME, which both kitty and Ghostty accept - #281

Closed
lothesito wants to merge 1 commit into
Ryoku-dev:mainfrom
lothesito:fix/ghostty-class-flag
Closed

lothesito wants to merge 1 commit into
Ryoku-dev:mainfrom
lothesito:fix/ghostty-class-flag

Conversation

@lothesito

Copy link
Copy Markdown

Opening a remote in ryovm raises the terminal's own config error window when the
configured terminal is Ghostty.

Versions

  • ryoku-desktop 0.75.3.r3968.gcfd8899-3
  • ghostty 1.3.1-2.2
  • Hyprland 0.56.2, CachyOS
  • Ryoku terminal setting: desktop.apps.terminal = ghostty

What appears

Ghostty's "Configuration Errors" window:

cli1:class: value required
cli2:ryoport-ssh: invalid field

Why

ryovm and the lockscreen build the command as
"${TERMINAL:-kitty}" --class NAME -e .... --class NAME with a space is
kitty's flag form. Ghostty wants --class=NAME: given the bare flag it reports
class: value required, then parses the name as another config field and reports
invalid field. Those two lines are the window.

Verification

Window class read back with hyprctl clients, Hyprland 0.56.2, ghostty 1.3.1,
kitty 0.44:

kitty   --class ryoport-ssh     ryoport-ssh
kitty   --class=ryoport-ssh     ryoport-ssh
ghostty --class ryoport-ssh     com.mitchellh.ghostty, config error window
ghostty --class=ryoport-ssh     com.mitchellh.ghostty, no window

kitty accepts both forms, so one form covers both terminals.

Also validated on the real flow: connecting to a host in ryovm spawns
ghostty --class=ryoport-ssh -e ... with no error window, where the same action
raised one before the change.

What this does not fix

Two things left alone, both of which look like your call:

  1. ryoku/apps/ryovm/remote/ryossh.go:936 already has a per-terminal switch
    (kitty, foot, alacritty, wezterm). Ghostty is not in it, so that path falls
    through to default and sets no class at all. The QML sites changed here do
    not go through that helper; they build the command string themselves.

  2. Ghostty validates class as a GTK app id, and those cannot contain hyphens,
    so ryoport-ssh, ryovm-ssh and ryoku-passkey are ignored even with the
    right flag form. The window keeps com.mitchellh.ghostty, which means the
    float-ryoport-ssh style rules in ryoku/hyprland/modules/window_rules.lua
    cannot match on Ghostty. Fixing that needs different class names plus
    matching rules.

Checked with qmllint on the four files, and bin/ryoku-dev-verify-delivery,
bin/ryoku-dev-verify-wm-isolation and bin/ryoku-dev-scan-slop.

ryovm and the lockscreen built the terminal command as `--class NAME`, kitty's
flag form. Ghostty wants `--class=NAME`; given the bare flag it reads `--class`
as a value-less option and then parses the name as a stray config field, so it
opened its "Configuration Errors" window on every connect.

kitty accepts both forms, so one form covers the terminals Ryoku can be pointed
at today.

Note: Fixed: opening a remote in ryovm no longer raises the terminal's config error window
@neur0map

Copy link
Copy Markdown
Collaborator

Thanks for this, the flag form is exactly right and it's merged into what just landed on unstable-dev. We went a bit further on the same line: Ghostty also validates the class as a GTK application id (needs a dot), so the names are now dev.ryoku.* ids and the ryoport window rule matches them, and ryossh's terminal switch gained the missing Ghostty branch. Both of the items your PR listed as not fixed are covered, so closing here rather than merging into main directly; it ships with the next release of main.

@neur0map neur0map closed this Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants