I have made new binary builds of kitty available for Linux (with bundled dependencies), along with a one-liner to install them. See https://sw.kovidgoyal.net/kitty/binary.html for details. This way people wanting to be up-to-date with the latest release version of kitty dont need to build from source.
It would be nice if we could get some testing on different Linux distributions.
P.S. The one-liner works on macOS also, where it simply downloads the dmg and installs it into /Applications auto-magically.
Ubuntu 18.04, the binary install went great. I made a symlink from ~/.local/kitty.app/bin/kitty to ~/.local/bin/kitty, and copied ~/.local/kitty.app/share/applications/kitty.desktop to ~/.local/share/application/kitty.desktop, and had to change the Icon in the desktop file to its full absolute path, but then everything worked great, as expected!
Good to know :)
cat /etc/issue.net && curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
Debian GNU/Linux 9
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0Using python executable: /usr/bin/python3
100 8225 100 8225 0 0 50853 0 --:--:-- --:--:-- --:--:-- 51086
Checking for latest release on GitHub...
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "<string>", line 222, in script_launch
File "<string>", line 189, in main
File "<string>", line 78, in get_latest_release_data
File "/usr/lib/python3.5/json/__init__.py", line 268, in load
parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw)
File "/usr/lib/python3.5/json/__init__.py", line 312, in loads
s.__class__.__name__))
TypeError: the JSON object must be str, not 'bytes'
p.s. My python knowhow is way to low to even have an opinion on the above.
This is a bug in python versions before 3.6, should be an easy workaround. Basically versions of python between 3 and 3.5 only used a version of json.loads that could not decode bytes.
That did the trick
curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8249 100 8249 0 0 28705 0 --:--:-- --:--:-- --:--:-- 28742
Using python executable: /usr/bin/python3
Checking for latest release on GitHub...
Will download and install kitty-0.11.1-x86_64.txz
Downloaded 8520320 bytes
Extracting tarball...
kitty successfully installed to /home/ticho/.local/kitty.app
Use /home/ticho/.local/kitty.app/bin/kitty to run kitty
Traceback (most recent call last):
File "python3.6/runpy.py", line 280, in run_path
File "python3.6/runpy.py", line 85, in _run_code
File "kitty/__main__.py", line 96, in <module>
File "kitty/__main__.py", line 89, in main
File "kitty/main.py", line 10, in <module>
File "kitty/borders.py", line 8, in <module>
ImportError: /home/ticho/.local/kitty.app/bin/../lib/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates
Now I need a newer harfbuzz python ... I assume?
No, a newer freetype, harfbuzz is bundled, freetype is not, because it often has system specific patches.
Some of this?
apt-cache policy libfreetype6
libfreetype6:
Installed: 2.7-0.1
Candidate: 2.7-0.1
Version table:
*** 2.7-0.1 100
100 /var/lib/dpkg/status
2.6.3-3.2 500
500 https://deb.debian.org/debian stretch/main amd64 Packages
apt-cache policy libftgl2
libftgl2:
Installed: 2.1.3~rc5-4+nmu1.1
Candidate: 2.1.3~rc5-4+nmu1.1
Version table:
*** 2.1.3~rc5-4+nmu1.1 500
500 https://deb.debian.org/debian stretch/main amd64 Packages
100 /var/lib/dpkg/status
libfreetype6
libfreetype6 backported from sid, still no joy
~/.local/kitty.app/bin
./kitty
[169 23:21:59.654064] Unknown uniform in cursor program: _main_pos_map_0[0]
apt-cache policy libfreetype6
libfreetype6:
Installed: 2.8.1-2~bpo9+1
Candidate: 2.8.1-2~bpo9+1
Version table:
*** 2.8.1-2~bpo9+1 100
100 /var/lib/dpkg/status
2.6.3-3.2 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
That indicates a problem in your OpenGL stack, the shader compiler is not able to handle OpenGL 3.3 shaders. Updating the drivers should do the trick.
I'am assuming this is a problem with nvidia blob (really old nvidia card) and switching to nouveau would probably fix that?
Probably, I dont have any experience with nvidia, though.
on CentOS 7 the freetype provided comes with the same missing symbol:
../kitty/bin/../lib/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates
My current approach around this is:
It works... It's clunky, what would be the issues of providing a freetype library bundled with kitty? If it's meant to work as a standalone it wouldn't really be affected from the system libraries no?
FreeType is often patched by distros and fontconfig depends on it which is even more often patched and reads files from various compile time option dependent locations and creates system-wide caches whose format is version dependent. As such they are not suitable for inclusion in a bundle. All you need to do is delete the harfbuzz from the kitty lib dir and kitty should use your system harfbuzz instead which hopefully is new enough (IIRC kity requires harfbuzz >= 1.6
Ah, shame
CentOS only makes 1.3.2 available - unless I've got privileges that won't change anytime soon. I've left fontconfig alone, I really didn't know that FreeType had those limitations. Until something breaks I'll continue doing the workaround.
Thanks!
I just tried the binary installer on Ubuntu 16.04 and got:
% curl -L https://sw.kovidgoyal.net/kitty/installer.sh | sh /dev/stdin
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 8249 100 8249 0 0 17618 0 --:--:-- --:--:-- --:--:-- 17588
Using python executable: /usr/bin/python3
Checking for latest release on GitHub...
Will download and install kitty-0.12.0-x86_64.txz
Downloaded 8088464 bytes
Extracting tarball...
kitty successfully installed to /home/niklas/.local/kitty.app
Use /home/niklas/.local/kitty.app/bin/kitty to run kitty
Traceback (most recent call last):
File "python3.7/runpy.py", line 280, in run_path
File "python3.7/runpy.py", line 85, in _run_code
File "kitty/__main__.py", line 110, in <module>
File "kitty/__main__.py", line 103, in main
File "kitty/main.py", line 10, in <module>
from .borders import load_borders_program
File "kitty/borders.py", line 7, in <module>
from .fast_data_types import (
ImportError: /home/niklas/.local/kitty.app/bin/../lib/libharfbuzz.so.0: undefined symbol: FT_Get_Var_Blend_Coordinates
It would be nice if the website could mention systems on which the binary installer is known to not work due to too old system dependencies, so that people don't spend time on this.
In case you are listening to nh2's advice, I agree. KDE Neon also has this problem. Yes I can go track down a newer freetype or build from source, but....
Update: http://ubuntuhandbook.org/index.php/2017/06/install-freetype-2-8-in-ubuntu-16-04-17-04/
That PPA will get you working.
Thanks @wd5gnr that fixed it for me too on Ubuntu 16.04
Unfortunately http://ubuntuhandbook.org/index.php/2017/06/install-freetype-2-8-in-ubuntu-16-04-17-04/ does not work anymore, the referred ppa has been removed.
This worked for me on Ubuntu 16.04:
hb_ lib, but mentioning it anywayAfter installing freetype, you can verify the newly installed libs (libfreetype.so and libfreetype.so.6 on my system) have the missing symbols: nm -D <libname> | grep FT_Get_Var, or something similar. The symbols should have a T next to them.
There might be a couple locations to softlink the freetype .so's into, just run find . -name "*freetype*" in /usr/lib to find those locations. Don't delete the old shared libraries of course, in case some other app relies on them and you need to revert.
I guess it's worth mentioning since I spent an hour messing around with font hinting until realizing it was actually a totally different font (oops :sweat_smile: ) - kitty doesn't default to the system default font. So for Ubuntu, font_family Ubuntu Mono (no double quotes).
Cheers!
FWIW, on Debian stretch It looks like things are working after doing:
./autogen.sh && ./configure && make)libharfbuzz.so you just built, overwriting ~/.local/lib/libharfbuzz.so.0@jberryman this solution of yours works in debian stretch, thanks
@jberryman Thank you so much!
I've struggled to get this working, and now I finally have it!
On thing to note, after building harfbuzz, libharfbuzz.so, it should be located under src/.libs
FreeType is often patched by distros and fontconfig depends on it which is even more often patched and reads files from various compile time option dependent locations and creates system-wide caches whose format is version dependent. As such they are not suitable for inclusion in a bundle. All you need to do is delete the harfbuzz from the kitty lib dir and kitty should use your system harfbuzz instead which hopefully is new enough (IIRC kity requires harfbuzz >= 1.6
This worked, thank you!
rm -rf ~/.local/kitty.app/bin/../lib/libharfbuzz.so.0
Most helpful comment
I just tried the binary installer on Ubuntu 16.04 and got:
It would be nice if the website could mention systems on which the binary installer is known to not work due to too old system dependencies, so that people don't spend time on this.