binary.rst 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. Install kitty
  2. ========================
  3. Binary install
  4. ----------------
  5. .. highlight:: sh
  6. You can install pre-built binaries of |kitty| if you are on macOS or Linux using
  7. the following simple command:
  8. .. code-block:: sh
  9. _kitty_install_cmd
  10. The binaries will be installed in the standard location for your OS,
  11. :file:`/Applications/kitty.app` on macOS and :file:`~/.local/kitty.app` on
  12. Linux. The installer only touches files in that directory. To update kitty,
  13. simply re-run the command.
  14. .. warning::
  15. **Do not** copy the kitty binary out of the installation folder. If you want
  16. to add it to your :envvar:`PATH`, create a symlink in :file:`~/.local/bin` or
  17. :file:`/usr/bin` or wherever. You should create a symlink for the :file:`kitten`
  18. binary as well. Whichever folder you choose to create the symlink in should
  19. be in the **systemwide** PATH, a folder added to the PATH in your shell rc
  20. files will not work when running kitty from your desktop environment.
  21. Manually installing
  22. ---------------------
  23. If something goes wrong or you simply do not want to run the installer, you can
  24. manually download and install |kitty| from the `GitHub releases page
  25. <https://github.com/kovidgoyal/kitty/releases>`__. If you are on macOS, download
  26. the :file:`.dmg` and install as normal. If you are on Linux, download the
  27. tarball and extract it into a directory. The |kitty| executable will be in the
  28. :file:`bin` sub-directory.
  29. Desktop integration on Linux
  30. --------------------------------
  31. If you want the kitty icon to appear in the taskbar and an entry for it to be
  32. present in the menus, you will need to install the :file:`kitty.desktop` file.
  33. The details of the following procedure may need to be adjusted for your
  34. particular desktop, but it should work for most major desktop environments.
  35. .. code-block:: sh
  36. # Create symbolic links to add kitty and kitten to PATH (assuming ~/.local/bin is in
  37. # your system-wide PATH)
  38. ln -sf ~/.local/kitty.app/bin/kitty ~/.local/kitty.app/bin/kitten ~/.local/bin/
  39. # Place the kitty.desktop file somewhere it can be found by the OS
  40. cp ~/.local/kitty.app/share/applications/kitty.desktop ~/.local/share/applications/
  41. # If you want to open text files and images in kitty via your file manager also add the kitty-open.desktop file
  42. cp ~/.local/kitty.app/share/applications/kitty-open.desktop ~/.local/share/applications/
  43. # Update the paths to the kitty and its icon in the kitty desktop file(s)
  44. sed -i "s|Icon=kitty|Icon=$(readlink -f ~)/.local/kitty.app/share/icons/hicolor/256x256/apps/kitty.png|g" ~/.local/share/applications/kitty*.desktop
  45. sed -i "s|Exec=kitty|Exec=$(readlink -f ~)/.local/kitty.app/bin/kitty|g" ~/.local/share/applications/kitty*.desktop
  46. # Make xdg-terminal-exec (and hence desktop environments that support it use kitty)
  47. echo 'kitty.desktop' > ~/.config/xdg-terminals.list
  48. .. note::
  49. In :file:`kitty-open.desktop`, kitty is registered to handle some supported
  50. MIME types. This will cause kitty to take precedence on some systems where
  51. the default apps are not explicitly set. For example, if you expect to use
  52. other GUI file managers to open dir paths when using commands such as
  53. :program:`xdg-open`, you should configure the default opener for the MIME
  54. type ``inode/directory``::
  55. xdg-mime default org.kde.dolphin.desktop inode/directory
  56. .. note::
  57. If you use the venerable `stow <https://www.gnu.org/software/stow/>`__
  58. command to manage your manual installations, the following takes care of the
  59. above for you (use with :code:`dest=~/.local/stow`)::
  60. cd ~/.local/stow
  61. stow -v kitty.app
  62. Customizing the installation
  63. --------------------------------
  64. .. _nightly:
  65. * You can install the latest nightly kitty build with ``installer``:
  66. .. code-block:: sh
  67. _kitty_install_cmd \
  68. installer=nightly
  69. If you want to install it in parallel to the released kitty specify a
  70. different install locations with ``dest``:
  71. .. code-block:: sh
  72. _kitty_install_cmd \
  73. installer=nightly dest=/some/other/location
  74. * You can specify a specific version to install, with:
  75. .. code-block:: sh
  76. _kitty_install_cmd \
  77. installer=version-0.35.2
  78. * You can tell the installer not to launch |kitty| after installing it with
  79. ``launch=n``:
  80. .. code-block:: sh
  81. _kitty_install_cmd \
  82. launch=n
  83. * You can use a previously downloaded dmg/tarball, with ``installer``:
  84. .. code-block:: sh
  85. _kitty_install_cmd \
  86. installer=/path/to/dmg or tarball
  87. Uninstalling
  88. ----------------
  89. All the installer does is copy the kitty files into the install directory. To
  90. uninstall, simply delete that directory.
  91. Building from source
  92. ------------------------
  93. |kitty| is easy to build from source, follow the :doc:`instructions <build>`.