faq.rst 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. Frequently Asked Questions
  2. ==============================
  3. .. highlight:: sh
  4. Some special symbols are rendered small/truncated in kitty?
  5. -----------------------------------------------------------
  6. The number of cells a Unicode character takes up are controlled by the Unicode
  7. standard. All characters are rendered in a single cell unless the Unicode
  8. standard says they should be rendered in two cells. When a symbol does not fit,
  9. it will either be rescaled to be smaller or truncated (depending on how much
  10. extra space it needs). This is often different from other terminals which just
  11. let the character overflow into neighboring cells, which is fine if the
  12. neighboring cell is empty, but looks terrible if it is not.
  13. Some programs, like Powerline, vim with fancy gutter symbols/status-bar, etc.
  14. use Unicode characters from the private use area to represent symbols. Often
  15. these symbols are wide and should be rendered in two cells. However, since
  16. private use area symbols all have their width set to one in the Unicode
  17. standard, |kitty| renders them either smaller or truncated. The exception is if
  18. these characters are followed by a space or en-space (U+2002) in which case
  19. kitty makes use of the extra cell to render them in two cells. This behavior
  20. can be turned off for specific symbols using :opt:`narrow_symbols`.
  21. As of version 0.40 kitty has innovated a :doc:`new protocol
  22. <text-sizing-protocol>` that allows programs running in the terminal to control
  23. how many cells a character is rendered in thereby solving the issue of
  24. character width once and for all.
  25. Using a color theme with a background color does not work well in vim?
  26. -----------------------------------------------------------------------
  27. First, be sure to `use a color scheme in vim <https://github.com/kovidgoyal/kitty/discussions/8196#discussioncomment-11739991>`__
  28. instead of relying on the terminal theme. Otherwise, background and text selection colours
  29. may be difficult to read.
  30. Sadly, vim has very poor out-of-the-box detection for modern terminal features.
  31. Furthermore, it `recently broke detection even more <https://github.com/vim/vim/issues/11729>`__.
  32. It kind of, but not really, supports terminfo, except it overrides it with its own hard-coded
  33. values when it feels like it. Worst of all, it has no ability to detect modern
  34. features not present in terminfo, at all, even security sensitive ones like
  35. bracketed paste.
  36. Thankfully, probably as a consequence of this lack of detection, vim allows users to
  37. configure these low level details. So, to make vim work well with any modern
  38. terminal, including kitty, add the following to your :file:`~/.vimrc`.
  39. .. code-block:: vim
  40. " Mouse support
  41. set mouse=a
  42. set ttymouse=sgr
  43. set balloonevalterm
  44. " Styled and colored underline support
  45. let &t_AU = "\e[58:5:%dm"
  46. let &t_8u = "\e[58:2:%lu:%lu:%lum"
  47. let &t_Us = "\e[4:2m"
  48. let &t_Cs = "\e[4:3m"
  49. let &t_ds = "\e[4:4m"
  50. let &t_Ds = "\e[4:5m"
  51. let &t_Ce = "\e[4:0m"
  52. " Strikethrough
  53. let &t_Ts = "\e[9m"
  54. let &t_Te = "\e[29m"
  55. " Truecolor support
  56. let &t_8f = "\e[38:2:%lu:%lu:%lum"
  57. let &t_8b = "\e[48:2:%lu:%lu:%lum"
  58. let &t_RF = "\e]10;?\e\\"
  59. let &t_RB = "\e]11;?\e\\"
  60. " Bracketed paste
  61. let &t_BE = "\e[?2004h"
  62. let &t_BD = "\e[?2004l"
  63. let &t_PS = "\e[200~"
  64. let &t_PE = "\e[201~"
  65. " Cursor control
  66. let &t_RC = "\e[?12$p"
  67. let &t_SH = "\e[%d q"
  68. let &t_RS = "\eP$q q\e\\"
  69. let &t_SI = "\e[5 q"
  70. let &t_SR = "\e[3 q"
  71. let &t_EI = "\e[1 q"
  72. let &t_VS = "\e[?12l"
  73. " Focus tracking
  74. let &t_fe = "\e[?1004h"
  75. let &t_fd = "\e[?1004l"
  76. execute "set <FocusGained>=\<Esc>[I"
  77. execute "set <FocusLost>=\<Esc>[O"
  78. " Window title
  79. let &t_ST = "\e[22;2t"
  80. let &t_RT = "\e[23;2t"
  81. " vim hardcodes background color erase even if the terminfo file does
  82. " not contain bce. This causes incorrect background rendering when
  83. " using a color theme with a background color in terminals such as
  84. " kitty that do not support background color erase.
  85. let &t_ut=''
  86. These settings must be placed **before** setting the ``colorscheme``. It is
  87. also important that the value of the vim ``term`` variable is not changed
  88. after these settings.
  89. I get errors about the terminal being unknown or opening the terminal failing or functional keys like arrow keys don't work?
  90. -------------------------------------------------------------------------------------------------------------------------------
  91. These issues all have the same root cause: the kitty terminfo files not being
  92. available. The most common way this happens is SSHing into a computer that does
  93. not have the kitty terminfo files. The simplest fix for that is running::
  94. kitten ssh myserver
  95. It will automatically copy over the terminfo files and also magically enable
  96. :doc:`shell integration </shell-integration>` on the remote machine.
  97. This :doc:`ssh kitten <kittens/ssh>` takes all the same command line arguments
  98. as :program:`ssh`, you can alias it to something small in your shell's rc files
  99. to avoid having to type it each time::
  100. alias s="kitten ssh"
  101. If this does not work, see :ref:`manual_terminfo_copy` for alternative ways to
  102. get the kitty terminfo files onto a remote computer.
  103. The next most common reason for this is if you are running commands as root
  104. using :program:`sudo` or :program:`su`. These programs often filter the
  105. :envvar:`TERMINFO` environment variable which is what points to the kitty
  106. terminfo files.
  107. First, make sure the :envvar:`TERM` is set to ``xterm-kitty`` in the sudo
  108. environment. By default, it should be automatically copied over.
  109. If you are using a well maintained Linux distribution, it will have a
  110. ``kitty-terminfo`` package that you can simply install to make the kitty
  111. terminfo files available system-wide. Then the problem will no longer occur.
  112. Alternately, you can configure :program:`sudo` to preserve :envvar:`TERMINFO`
  113. by running ``sudo visudo`` and adding the following line::
  114. Defaults env_keep += "TERM TERMINFO"
  115. If none of these are suitable for you, you can run sudo as ::
  116. sudo TERMINFO="$TERMINFO"
  117. This will make :envvar:`TERMINFO` available
  118. in the sudo environment. Create an alias in your shell rc files to make this
  119. convenient::
  120. alias sudo="sudo TERMINFO=\"$TERMINFO\""
  121. If you have double width characters in your prompt, you may also need to
  122. explicitly set a UTF-8 locale, like::
  123. export LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8
  124. I cannot use the key combination X in program Y?
  125. -------------------------------------------------------
  126. First, run::
  127. kitten show-key -m kitty
  128. Press the key combination X. If the kitten reports the key press
  129. that means kitty is correctly sending the key press to terminal programs.
  130. You need to report the issue to the developer of the terminal program. Most
  131. likely they have not added support for :doc:`/keyboard-protocol`.
  132. If the kitten does not report it, it means that the key is bound to some action
  133. in kitty. You can unbind it in :file:`kitty.conf` with:
  134. .. code-block:: conf
  135. map X no_op
  136. Here X is the keys you press on the keyboard. So for example
  137. :kbd:`ctrl+shift+1`.
  138. How do I change the colors in a running kitty instance?
  139. ------------------------------------------------------------
  140. The easiest way to do it is to use the :doc:`themes kitten </kittens/themes>`,
  141. to choose a new color theme. Simply run::
  142. kitten themes
  143. And choose your theme from the list.
  144. You can also define keyboard shortcuts to set colors, for example::
  145. map f1 set_colors --configured /path/to/some/config/file/colors.conf
  146. Or you can enable :doc:`remote control <remote-control>` for |kitty| and use
  147. :ref:`at-set-colors`. The shortcut mapping technique has the same syntax as the
  148. remote control command, for details, see :ref:`at-set-colors`.
  149. To change colors when SSHing into a remote host, use the :opt:`color_scheme
  150. <kitten-ssh.color_scheme>` setting for the :doc:`ssh kitten <kittens/ssh>`.
  151. Additionally, You can use the
  152. `OSC terminal escape codes <https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Operating-System-Commands>`__
  153. to set colors. Examples of using OSC escape codes to set colors::
  154. Change the default foreground color:
  155. printf '\x1b]10;#ff0000\x1b\\'
  156. Change the default background color:
  157. printf '\x1b]11;blue\x1b\\'
  158. Change the cursor color:
  159. printf '\x1b]12;blue\x1b\\'
  160. Change the selection background color:
  161. printf '\x1b]17;blue\x1b\\'
  162. Change the selection foreground color:
  163. printf '\x1b]19;blue\x1b\\'
  164. Change the nth color (0 - 255):
  165. printf '\x1b]4;n;green\x1b\\'
  166. You can use various syntaxes/names for color specifications in the above
  167. examples. See `XParseColor <https://linux.die.net/man/3/xparsecolor>`__
  168. for full details.
  169. If a ``?`` is given rather than a color specification, kitty will respond
  170. with the current value for the specified color.
  171. How do I specify command line options for kitty on macOS?
  172. ---------------------------------------------------------------
  173. Apple does not want you to use command line options with GUI applications. To
  174. workaround that limitation, |kitty| will read command line options from the file
  175. :file:`<kitty config dir>/macos-launch-services-cmdline` when it is launched
  176. from the GUI, i.e. by clicking the |kitty| application icon or using
  177. ``open -a kitty``. Note that this file is *only read* when running via the GUI.
  178. You can, of course, also run |kitty| from a terminal with command line options,
  179. using: :file:`/Applications/kitty.app/Contents/MacOS/kitty`.
  180. And within |kitty| itself, you can always run |kitty| using just ``kitty`` as it
  181. cleverly adds itself to the :envvar:`PATH`.
  182. I catted a binary file and now kitty is hung?
  183. -----------------------------------------------
  184. **Never** output unknown binary data directly into a terminal.
  185. Terminals have a single channel for both data and control. Certain bytes
  186. are control codes. Some of these control codes are of arbitrary length, so if
  187. the binary data you output into the terminal happens to contain the starting
  188. sequence for one of these control codes, the terminal will hang waiting for the
  189. closing sequence. Press :sc:`reset_terminal` to reset the terminal.
  190. If you do want to cat unknown data, use ``cat -v``.
  191. kitty is not able to use my favorite font?
  192. ---------------------------------------------
  193. |kitty| achieves its stellar performance by caching alpha masks of each rendered
  194. character on the GPU, and rendering them all in parallel. This means it is a
  195. strictly character cell based display. As such it can use only monospace fonts,
  196. since every cell in the grid has to be the same size. Furthermore, it needs
  197. fonts to be freely resizable, so it does not support bitmapped fonts.
  198. .. note::
  199. If you are trying to use a font patched with `Nerd Fonts
  200. <https://nerdfonts.com/>`__ symbols, don't do that as patching destroys
  201. fonts. There is no need, kitty has a builtin NERD font and will use it for
  202. symbols not found in any other font on your system.
  203. If you have patched fonts on your system they might be used instead for NERD
  204. symbols, so to force kitty to use the pure NERD font for NERD symbols,
  205. add the following line to :file:`kitty.conf`::
  206. # Nerd Fonts v3.2.0
  207. symbol_map U+e000-U+e00a,U+ea60-U+ebeb,U+e0a0-U+e0c8,U+e0ca,U+e0cc-U+e0d7,U+e200-U+e2a9,U+e300-U+e3e3,U+e5fa-U+e6b1,U+e700-U+e7c5,U+ed00-U+efc1,U+f000-U+f2ff,U+f000-U+f2e0,U+f300-U+f372,U+f400-U+f533,U+f0001-U+f1af0 Symbols Nerd Font Mono
  208. Those Unicode symbols not in the `Unicode private use areas
  209. <https://en.wikipedia.org/wiki/Private_Use_Areas>`__ are
  210. not included.
  211. If your font is not listed in ``kitten choose-fonts`` it means that it is not
  212. monospace or is a bitmapped font. On Linux you can list all monospace fonts
  213. with::
  214. fc-list : family spacing outline scalable | grep -e spacing=100 -e spacing=90 | grep -e outline=True | grep -e scalable=True
  215. On macOS, you can open *Font Book* and look in the :guilabel:`Fixed width`
  216. collection to see all monospaced fonts on your system.
  217. Note that **on Linux**, the spacing property is calculated by fontconfig based on actual glyph
  218. widths in the font. If for some reason fontconfig concludes your favorite
  219. monospace font does not have ``spacing=100`` you can override it by using the
  220. following :file:`~/.config/fontconfig/fonts.conf`::
  221. <?xml version="1.0"?>
  222. <!DOCTYPE fontconfig SYSTEM "fonts.dtd">
  223. <fontconfig>
  224. <match target="scan">
  225. <test name="family">
  226. <string>Your Font Family Name</string>
  227. </test>
  228. <edit name="spacing">
  229. <int>100</int>
  230. </edit>
  231. </match>
  232. </fontconfig>
  233. After creating (or modifying) this file, you may need to run the following
  234. command to rebuild your fontconfig cache::
  235. fc-cache -r
  236. Then, the font will be available in ``kitten choose-fonts``.
  237. How can I assign a single global shortcut to bring up the kitty terminal?
  238. -----------------------------------------------------------------------------
  239. Bringing up applications on a single key press is the job of the window
  240. manager/desktop environment. For ways to do it with kitty (or indeed any
  241. terminal) in different environments,
  242. see :iss:`here <45>`.
  243. I do not like the kitty icon!
  244. -------------------------------
  245. The kitty icon was created as tribute to my cat of nine years who passed away,
  246. as such it is not going to change. However, if you do not like it, there are
  247. many alternate icons available, click on an icon to visit its homepage:
  248. .. image:: https://github.com/k0nserv/kitty-icon/raw/main/kitty.iconset/icon_256x256.png
  249. :target: https://github.com/k0nserv/kitty-icon
  250. :width: 256
  251. .. image:: https://github.com/DinkDonk/kitty-icon/raw/main/kitty-dark.png
  252. :target: https://github.com/DinkDonk/kitty-icon
  253. :width: 256
  254. .. image:: https://github.com/DinkDonk/kitty-icon/raw/main/kitty-light.png
  255. :target: https://github.com/DinkDonk/kitty-icon
  256. :width: 256
  257. .. image:: https://github.com/hristost/kitty-alternative-icon/raw/main/kitty_icon.png
  258. :target: https://github.com/hristost/kitty-alternative-icon
  259. :width: 256
  260. .. image:: https://github.com/igrmk/whiskers/raw/main/whiskers.svg
  261. :target: https://github.com/igrmk/whiskers
  262. :width: 256
  263. .. image:: https://github.com/samholmes/whiskers/raw/main/whiskers.png
  264. :target: https://github.com/samholmes/whiskers
  265. :width: 256
  266. .. image:: https://github.com/user-attachments/assets/a37d7830-4a8c-45a8-988a-3e98a41ea541
  267. :target: https://github.com/diegobit/kitty-icon
  268. :width: 256
  269. .. image:: https://github.com/eccentric-j/eccentric-icons/raw/main/icons/kitty-terminal/2d/kitty-preview.png
  270. :target: https://github.com/eccentric-j/eccentric-icons
  271. :width: 256
  272. .. image:: https://github.com/eccentric-j/eccentric-icons/raw/main/icons/kitty-terminal/3d/kitty-preview.png
  273. :target: https://github.com/eccentric-j/eccentric-icons
  274. :width: 256
  275. .. image:: https://github.com/sodapopcan/kitty-icon/raw/main/kitty.app.png
  276. :target: https://github.com/sodapopcan/kitty-icon
  277. :width: 256
  278. .. image:: https://github.com/sfsam/some_icons/raw/main/kitty.app.iconset/icon_128x128@2x.png
  279. :target: https://github.com/sfsam/some_icons
  280. :width: 256
  281. On macOS and X11 you can put :file:`kitty.app.icns` (macOS only) or :file:`kitty.app.png` in the
  282. :ref:`kitty configuration directory <confloc>`, and this icon will be applied
  283. automatically at startup. On X11, this will set the icon for kitty windows.
  284. Unfortunately, on macOS, Apple's Dock does not change its cached icon so the
  285. custom icon will revert when kitty is quit. Run the following to force the Dock
  286. to update its cached icons:
  287. .. code-block:: sh
  288. rm /var/folders/*/*/*/com.apple.dock.iconcache; killall Dock
  289. If you prefer not to keep a custom icon in the kitty config folder, on macOS, you can
  290. also set it with the following command:
  291. .. code-block:: sh
  292. # Set kitty.icns as the icon for currently running kitty
  293. kitty +runpy 'from kitty.fast_data_types import cocoa_set_app_icon; import sys; cocoa_set_app_icon(*sys.argv[1:]); print("OK")' kitty.icns
  294. # Set the icon for app bundle specified by the path
  295. kitty +runpy 'from kitty.fast_data_types import cocoa_set_app_icon; import sys; cocoa_set_app_icon(*sys.argv[1:]); print("OK")' /path/to/icon.png /Applications/kitty.app
  296. You can also change the icon manually by following the steps:
  297. #. Find :file:`kitty.app` in the Applications folder, select it and press :kbd:`⌘+I`
  298. #. Drag :file:`kitty.icns` onto the application icon in the kitty info pane
  299. #. Delete the icon cache and restart Dock:
  300. .. code-block:: sh
  301. rm /var/folders/*/*/*/com.apple.dock.iconcache; killall Dock
  302. How do I map key presses in kitty to different keys in the terminal program?
  303. --------------------------------------------------------------------------------------
  304. This is accomplished by using ``map`` with :ac:`send_key` in :file:`kitty.conf`.
  305. For example::
  306. map alt+s send_key ctrl+s
  307. map ctrl+alt+2 combine : send_key ctrl+c : send_key h : send_key a
  308. This causes the program running in kitty to receive the :kbd:`ctrl+s` key when
  309. you press the :kbd:`alt+s` key and several keystrokes when you press
  310. :kbd:`ctrl+alt+2`. To see this in action, run::
  311. kitten show-key -m kitty
  312. Which will print out what key events it receives. To send arbitrary text rather
  313. than a key press, see :sc:`send_text <send_text>` instead.
  314. How do I open a new window or tab with the same working directory as the current window?
  315. --------------------------------------------------------------------------------------------
  316. In :file:`kitty.conf` add the following::
  317. map f1 launch --cwd=current
  318. map f2 launch --cwd=current --type=tab
  319. Pressing :kbd:`F1` will open a new kitty window with the same working directory
  320. as the current window. The :doc:`launch command <launch>` is very powerful,
  321. explore :doc:`its documentation <launch>`.
  322. Things behave differently when running kitty from system launcher vs. from another terminal?
  323. -----------------------------------------------------------------------------------------------
  324. This will be because of environment variables. When you run kitty from the
  325. system launcher, it gets a default set of system environment variables. When
  326. you run kitty from another terminal, you are actually running it from a shell,
  327. and the shell's rc files will have setup a whole different set of environment
  328. variables which kitty will now inherit.
  329. You need to make sure that the environment variables you define in your shell's
  330. rc files are either also defined system wide or via the :opt:`env` directive in
  331. :file:`kitty.conf`. Common environment variables that cause issues are those
  332. related to localization, such as :envvar:`LANG`, ``LC_*`` and loading of
  333. configuration files such as ``XDG_*``, :envvar:`KITTY_CONFIG_DIRECTORY`.
  334. To see the environment variables that kitty sees, you can add the following
  335. mapping to :file:`kitty.conf`::
  336. map f1 show_kitty_env_vars
  337. then pressing :kbd:`F1` will show you the environment variables kitty sees.
  338. This problem is most common on macOS, as Apple makes it exceedingly difficult to
  339. setup environment variables system-wide, so people end up putting them in all
  340. sorts of places where they may or may not work.
  341. I am using tmux and have a problem
  342. --------------------------------------
  343. First, terminal multiplexers are :iss:`a bad idea <391#issuecomment-638320745>`,
  344. do not use them, if at all possible. kitty contains features that do all of what
  345. tmux does, but better, with the exception of remote persistence (:iss:`391`).
  346. If you still want to use tmux, read on.
  347. Using ancient versions of tmux such as 1.8 will cause gibberish on screen when
  348. pressing keys (:iss:`3541`).
  349. If you are using tmux with multiple terminals or you start it under one terminal
  350. and then switch to another and these terminals have different :envvar:`TERM`
  351. variables, tmux will break. You will need to restart it as tmux does not support
  352. multiple terminfo definitions.
  353. Displaying images while inside programs such as nvim or ranger may not work
  354. depending on whether those programs have adopted support for the :ref:`unicode
  355. placeholders <graphics_unicode_placeholders>` workaround that kitty created
  356. for tmux refusing to support images.
  357. If you use any of the advanced features that kitty has innovated, such as
  358. :doc:`styled underlines </underlines>`, :doc:`desktop notifications
  359. </desktop-notifications>`, :doc:`extended keyboard support
  360. </keyboard-protocol>`, :doc:`file transfer </kittens/transfer>`, :doc:`the ssh
  361. kitten </kittens/ssh>`, :doc:`shell integration </shell-integration>` etc. they may or may not work,
  362. depending on the whims of tmux's maintainer, your version of tmux, etc.
  363. I opened and closed a lot of windows/tabs and top shows kitty's memory usage is very high?
  364. -------------------------------------------------------------------------------------------
  365. :program:`top` is not a good way to measure process memory usage. That is
  366. because on modern systems, when allocating memory to a process, the C library
  367. functions will typically allocate memory in large blocks, and give the process
  368. chunks of these blocks. When the process frees a chunk, the C library will not
  369. necessarily release the underlying block back to the OS. So even though the
  370. application has released the memory, :program:`top` will still claim the process
  371. is using it.
  372. To check for memory leaks, instead use a tool like `Valgrind
  373. <https://valgrind.org/>`__. Run::
  374. PYTHONMALLOC=malloc valgrind --tool=massif kitty
  375. Now open lots of tabs/windows, generate lots of output using tools like find/yes
  376. etc. Then close all but one window. Do some random work for a few seconds in
  377. that window, maybe run yes or find again. Then quit kitty and run::
  378. massif-visualizer massif.out.*
  379. You will see the allocations graph goes up when you opened the windows, then
  380. goes back down when you closed them, indicating there were no memory leaks.
  381. For those interested, you can get a similar profile out of :program:`valgrind`
  382. as you get with :program:`top` by adding ``--pages-as-heap=yes`` then you will
  383. see that memory allocated in malloc is not freed in free. This can be further
  384. refined if you use ``glibc`` as your C library by setting the environment
  385. variable ``MALLOC_MMAP_THRESHOLD_=64``. This will cause free to actually free
  386. memory allocated in sizes of more than 64 bytes. With this set, memory usage
  387. will climb high, then fall when closing windows, but not fall all the way back.
  388. The remaining used memory can be investigated using valgrind again, and it will
  389. come from arenas in the GPU drivers and the per thread arenas glibc's malloc
  390. maintains. These too allocate memory in large blocks and don't release it back
  391. to the OS immediately.
  392. Why does kitty sometimes start slowly on my Linux system?
  393. -------------------------------------------------------------------------------------------
  394. |kitty| takes no longer (within 100ms) to start than other similar GPU terminal
  395. emulators, (and may be faster than some). If |kitty| occasionally takes a long
  396. time to start, it could be a power management issue with the graphics card. On
  397. a multi-GPU system (which many modern laptops are, having a power efficient GPU
  398. that's built into the processor and a power hungry dedicated one that's usually
  399. off), even if the answer of the GPU will only be "don't use me".
  400. For example, if you have a system with an AMD CPU and an NVIDIA GPU, and you
  401. know that you want to use the lower powered card to save battery life and
  402. because kitty does not require a powerful GPU to function, you can choose not
  403. to wake up the dedicated card, which has been reported on at least one system
  404. (:iss:`4292`) to take ≈2 seconds, by running |kitty| as::
  405. MESA_LOADER_DRIVER_OVERRIDE=radeonsi __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json kitty
  406. The correct command will depend on your situation and hardware.
  407. ``__EGL_VENDOR_LIBRARY_FILENAMES`` instructs the GL dispatch library to use
  408. :file:`libEGL_mesa.so` and ignore :file:`libEGL_nvidia.so` also available on the
  409. system, which will wake the NVIDIA card during device enumeration.
  410. ``MESA_LOADER_DRIVER_OVERRIDE`` also assures that Mesa won't offer any NVIDIA
  411. card during enumeration, and will instead just use :file:`radeonsi_dri.so`.