Home | Posts

Installing st simple terminal on ChromeOS with Crostini (Arm CPU)

4 months ago

I was using Alacritty on my Chromebook, but I was having some problems with the rendering (it would often freeze for a few seconds) and it was annoying, so I decided to look for something else.

I was not sure if it would work on arm64, but it seems to work fine.

git clone git://git.suckless.org/st
cd st
sudo apt install libx11-dev libxft-dev

Running sudo make clean install directly will throw these errors. So you need libx11-dev libxft-dev .

x.c:12:10: fatal error: X11/Xlib.h: No such file or directory
   12 | #include <X11/Xlib.h>
x.c: 15: 10: fatal error: X11 / Xft / Xft.h: No such file or directory
15 | #include < X11 / Xft / Xft.h >

Default color scheme is a bit harsh on my eyes, so change theme. Skip if you don't want. ref: https://st.suckless.org/patches/solarized/

wget https://st.suckless.org/patches/solarized/st-no_bold_colors-20170623-b331da5.diff
git apply st-no_bold_colors-20170623-b331da5.diff

wget https://st.suckless.org/patches/solarized/st-solarized-dark-0.8.5.diff
git apply st-solarized-dark-0.8.5.diff

I also changed font.

// config.h
static char *font = "consolas:pixelsize=16:antialias=true:autohint=true";

And install with

sudo make clean install
# now you should be able to run st.

It's more convenient to be able to run st directly from the ChromeOS shelf, so create an entry.

[Desktop Entry]
Comment=Terminal Emulator

Copy this file with cp ./st.desktop /.local/share/applications/, it should appear on the app list. ref: How do I add Linux apps to the home screen? - Google Pixelbook Community

This is the repository with the above changes: https://github.com/foloinfo/st

I would recommend cloning from the original repository first.

Now I feel much faster terminal on my mobile workspace. Like switching the tmux screen within a few ms.

Happy coding! 🎉


I noticed it crashes when tring to display some emoji (like 🤖)

The bug seems to be originated from Xft not st, you may recompile with fixed version.

I didn't have time so I installed sudo apt install fonts-symbola and it's not crashing.

ref: ST keeps crashing when displaying emojis : suckless