Last active
March 6, 2024 17:53
-
-
Save eggplants/04fa8e4af972098c6db05c0838d99a16 to your computer and use it in GitHub Desktop.
On Ubuntu 21.04, this script enables gnome-terminal to show sixel images. (Ref: https://www.kofuk.org/blog/20210803-vte-sixel/, https://twitter.com/man_2_fork/status/1422514528886030337?s=19 )
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env -S bash -e | |
# REPO='https://gitlab.gnome.org/GNOME/vte.git' | |
REPO='https://github.com/GNOME/vte.git' | |
LIBPATH='/usr/local/lib/x86_64-linux-gnu' | |
LDCONFPATH='/etc/ld.so.conf' | |
# See Deps: | |
# https://github.com/GNOME/vte/blob/master/meson.build | |
# On Ubuntu 21.04, GNOME-Terminal 3.38.1: | |
pip install meson | |
sudo apt install build-essential git libfribidi-dev \ | |
libgirepository1.0-dev libglib2.0-dev \ | |
libgnutls28-dev libpango1.0-dev libpcre2-8-0 \ | |
libpthread-stubs0-dev libsystemd-dev ninja-build \ | |
python3-pip valac zlib1g-dev -y | |
( | |
[ -d "./vte/.git" ] || { | |
git clone --depth 1 "$REPO" vte | |
} | |
cd vte | |
meson . _build -Dsixel=true && cd _build && ninja | |
sudo ninja install | |
grep -q "$LIBPATH" "$LDCONFPATH" || { | |
sudo sed -i "1iinclude $LIBPATH" "$LDCONFPATH" | |
sudo ldconfig | |
} | |
) | |
echo -n "done! kill all gnome-terminal-server?(n/y): " | |
read -r i | |
[ "$i" = "y" ] && killall gnome-terminal-server |
Author
eggplants
commented
Aug 3, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment