# In kitty :new command creates a window with broken symbols

**URL:** <https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766>\
**Category:** Help\
**Tags:** kitty\
**Created:** [June 9, 2021, 8:14pm UTC](https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766 "2021-06-09T20:14:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vbauerster](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vbauerster](https://discuss.kakoune.com/u/vbauerster)\
**Post date:** [June 9, 2021, 8:14pm UTC](https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766/1 "2021-06-09T20:14:30Z")

</div>

I’m trying to migrate to kitty over tmux. So first issue I’ve encountered is weird characters in window created with `:new` command. In screenshot it is right window:

 ![Screen Shot 2021-06-10 at 00.59.58](https://discuss.kakoune.com/uploads/default/original/1X/382792e16c4c4136421970aad17c743a4f12367b.png)

Why is that? Any ideas how to fix this?

---

<div class="post-metadata">

**Author:** ![himi](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/h/848f3c/32.png) [@himi](https://discuss.kakoune.com/u/himi)\
**Post date:** [June 9, 2021, 11:15pm UTC](https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766/2 "2021-06-09T23:15:39Z")

</div>

I’ve been using kitty for ages now and never seen this - maybe this is a bug in the version of kitty you’re using? It’s under very active development, so a packaged version is likely to be very out of date - I build from source, which is pretty easy to do with kitty.

---

<div class="post-metadata">

**Author:** ![vbauerster](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vbauerster](https://discuss.kakoune.com/u/vbauerster)\
**Post date:** [June 10, 2021, 5:37am UTC](https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766/3 "2021-06-10T05:37:04Z")

</div>

I installed kitty from homebrew couple of days ago, it’s v 0.20.3

---

<div class="post-metadata">

**Author:** ![vbauerster](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vbauerster](https://discuss.kakoune.com/u/vbauerster)\
**Post date:** [June 10, 2021, 7:35am UTC](https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766/4 "2021-06-10T07:35:00Z")

</div>

It’s same with iTerm2, looks like `:new` command doesn’t receive env vars properly.

---

<div class="post-metadata">

**Author:** ![Screwtapello](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/screwtapello/32/12_2.png) [@Screwtapello](https://discuss.kakoune.com/u/Screwtapello)\
**Post date:** [June 10, 2021, 8:09am UTC](https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766/5 "2021-06-10T08:09:21Z")

</div>

In most POSIXy operating systems, the login procedure sets a bunch of environment variables that are inherited by all the apps you run, including your terminal emulator. Then, when `:new` launches a new terminal emulator process running Kakoune, it inherits the same sensible configuration the first terminal emulator inherited, and everything works.

macOS, on the other hand, [makes it very difficult](https://stackoverflow.com/questions/25385934/setting-environment-variables-via-launchd-conf-no-longer-works-in-os-x-yosemite) to set environment variables at login, so users tend to set them up in files like `~/.bashrc`. If you launch a new interactive terminal, it runs `bash` which loads `.bashrc` and then anything you run inside bash works the way you expect, but when Kakoune launches a new terminal emulator process _only_ running Kakoune, not running an interactive `bash` session, those settings aren’t loaded and Weird Stuff happens.

The best solution would be for macOS to add an official, standard way to set environment variables at login, like Windows has done since WinNT 3.1 (I think?); the second best would be to set environment variables [in the terminal’s config file](https://sw.kovidgoyal.net/kitty/conf.html#opt-kitty.env) rather than in `.bashrc`.

---

<div class="post-metadata">

**Author:** ![vbauerster](https://discuss.kakoune.com/letter_avatar_proxy/v4/letter/v/85e7bf/32.png) [@vbauerster](https://discuss.kakoune.com/u/vbauerster)\
**Post date:** [June 11, 2021, 8:15am UTC](https://discuss.kakoune.com/t/in-kitty-new-command-creates-a-window-with-broken-symbols/1766/6 "2021-06-11T08:15:55Z")

</div>

Indeed it’s macOS specific [issue](https://github.com/mawww/kakoune/issues/3768).
