Public bug reported:

Package: ghostty 1.3.0~us1-0ubuntu1
Release: Ubuntu 26.04 LTS (resolute)

The .desktop file and D-Bus activation service shipped by this package
hardcode a shell-integration-features flag on the command line:

  /usr/share/applications/com.mitchellh.ghostty.desktop:
    Exec=/usr/bin/ghostty --gtk-single-instance=true 
--shell-integration-features=ssh-env

  /usr/share/dbus-1/services/com.mitchellh.ghostty.service:
    Exec=/usr/bin/ghostty --gtk-single-instance=true --initial-window=false 
--shell-integration-features=ssh-env

In Ghostty, a CLI flag replaces the config file's value for that option
entirely (values are deltas against built-in defaults, and sources are
not merged). As a result, any shell-integration-features setting in the
user's ~/.config/ghostty/config is silently ignored whenever Ghostty is
launched from the desktop (app grid, dock, GNOME activities) — which is
how virtually all users launch it. The same config works when running
`ghostty` from another terminal, making the behavior confusingly
inconsistent.

Steps to reproduce:
1. echo "shell-integration-features = no-cursor" >> ~/.config/ghostty/config
   (any value reproduces it; no-cursor is just an easily observable one,
   together with e.g. cursor-style = block)
2. Launch Ghostty from GNOME's app grid.
3. In the new window: echo $GHOSTTY_SHELL_FEATURES

Expected: the cursor feature is disabled, e.g.
  GHOSTTY_SHELL_FEATURES=path,title
and the prompt cursor follows cursor-style.

Actual:
  GHOSTTY_SHELL_FEATURES=cursor:blink,path,ssh-env,title
The user's no-cursor was discarded; the shell integration forces a bar
cursor at every prompt, overriding cursor-style = block. Running
`ghostty` manually from another terminal (no flag) honors the config.

`ghostty +show-config` resolves the config correctly (no-cursor,...),
which makes this hard to debug: the config appears valid and loaded,
yet desktop-launched windows ignore it.

Suggested fix: drop the flag from both Exec lines and document ssh-env
as an opt-in setting for users. I verified this build offers no
system-wide config mechanism (neither /etc/ghostty/config nor
XDG_CONFIG_DIRS is read) that could carry a distro default at a
precedence the user's config can override — so any Exec-line flag for
this option unavoidably clobbers user configuration. If a distro
default for ssh-env is genuinely desired, that needs a lower-precedence
mechanism (system config support or merge semantics for this option),
which would be an upstream feature request.

Additional information:

 * The flag is not present in upstream Ghostty's launcher templates at
   the packaged version: dist/linux/app.desktop.in and
   dist/linux/dbus.service.in at the v1.3.0 tag contain only
   --gtk-single-instance=true (plus --initial-window=false for D-Bus).
   The --shell-integration-features=ssh-env argument is therefore part
   of the Ubuntu packaging delta.

 * Users are already affected by this in the wild: upstream discussion
   https://github.com/ghostty-org/ghostty/discussions/12766 reports the
   identical symptom (no-cursor ignored when launched from the GNOME
   activities overview, works from the command line) on Ubuntu 26.04
   with this package. It remains unconfirmed upstream, presumably
   because upstream's own files do not carry the flag.

Workaround for affected users: strip the feature from
GHOSTTY_SHELL_FEATURES in the shell rc file before the integration's
deferred init reads it at the first prompt.

** Affects: ghostty (Ubuntu)
     Importance: Undecided
         Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2160296

Title:
  Desktop launcher passes --shell-integration-features=ssh-env, silently
  discarding the user's shell-integration-features config

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ghostty/+bug/2160296/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to