New Shell Integration SetupΒΆ

If shell integration stops working for you after the next release, run Setup Tasks from the Help menu to fix it.

Here's the backstory: TermySequence bundles a copy of the bash shell integration script from the iTerm2 project. Currently, the bash script is installed into /etc/profile.d, the idea being that it will be sourced automatically without needing to modify anybody's dotfiles.

Unfortunately, experiments with different distributions have shown that this way of doing it is a lost cause. There are simply too many subtle variations between distribution login scripts. One distro sets PROMPT_COMMAND after the script is sourced, breaking it. Another distro sources the script only during desktop login where it has no effect.

So the upcoming 1.1.4 release will switch to writing dotfiles like .bash_profile. To accomplish this, the setup logic has been rewritten from the ground up. Here's a summary of the changes:

  • The bundled shell integration scripts will be installed into /usr/share/termy-server instead of /etc/profile.d. Downstream, subpackages will be removed and the scripts will be included in the main termy-server package.
  • A new setup script termy-setup will replace the current termy-systemd-setup, subsuming its functionality and also providing the logic to append shell integration code to user dotfiles.
  • A new Setup Tasks dialog wrapping termy-setup will be added to qtermy. It will be shown on first launch and will be accessible from the Help menu. The existing setup prompt will be removed.

All of this will hopefully result in a simpler and better setup experience going forward. Of course, it's also possible to skip setup entirely and install shell integration manually using the upstream instructions.