st (Simple Terminal) crashes when I open an email that contains an emoji (in Mutt), and w/ kahl interactive
- Anmelden oder Registrieren um Kommentare zu schreiben
I've started to use Simple Terminal (st) but it crashed when:
1. I open emails that contain emoji in Mutt
2. I use khal calendar, notably when I press arrow up in interactive mode (I need to try to recompile with st's scroll patch)
With regards to number one, some people on the web suggest that the crash has to do with emoji, and suggest removing packages such as fonts-noto-color-emoji[1]; others suggest that installing the package libxft-bgra fixes the problem. This package isn't available on Trisquel.
I've looked at removing fonts-noto-color-emoji, but:
$ apt rdepends fonts-noto-color-emoji
fonts-noto-color-emoji
Reverse Depends:
Recommends: dino-im
Recommends: trisquel-budgie-desktop
Depends: pango1.0-tests
Recommends: kylin-desktop
Recommends: dino-im
Recommends: ubuntukylin-desktop
Recommends: ubuntu-unity-desktop
Recommends: ubuntu-mate-desktop
Recommends: ubuntu-mate-core
Recommends: ubuntu-budgie-desktop
Recommends: trisquel-budgie-desktop
Depends: texlive-fonts-extra-links
Recommends: texlive-fonts-extra
Depends: supertuxkart-data
Depends: spectral
Recommends: python3-sqt
Depends: pango1.0-tests
Recommends: nheko
Recommends: kylin-desktop
Recommends: gnome-characters
Recommends: gajim
Depends: fonts-recommended
Recommends: fonts-noto
For clarity:
$ apt rdepends fonts-noto-color-emoji | grep Depends
Reverse Depends:
Depends: pango1.0-tests
Depends: texlive-fonts-extra-links
Depends: supertuxkart-data
Depends: spectral
Depends: pango1.0-tests
Depends: fonts-recommended
so I can't afford to remove the package fonts-noto-color-emoji; I imagine LaTex will break if I do so.
Second suggestion: when I install the package libxft-bgra and recompile st, this is does not fix my issue - maybe I am missing something here, a path, or something; I don't know.
Any suggestion would be welcome.
Is anyone using Simple Terminal (st) and has fixed this?
PS That's the error message I get when I run st from XTerm and try to open an email that contains an emoji, in Mutt.
$ st
X Error of failed request: BadLength (poly request too large or internal Xlib length error)
Major opcode of failed request: 139 (RENDER)
Minor opcode of failed request: 20 (RenderAddGlyphs)
Serial number of failed request: 9412
Current serial number in output stream: 9442
[1] Reddit's front: https://red.ngn.tf/r/suckless/comments/f10syw/st_crashing_when_scrolling/
I imagine LaTex will break if I [remove the package fonts-noto-color-emoji].
Not, it will not. TexLive works without texlive-fonts-extra-links and fonts-recommended. What will be removed alongside fonts-noto-color-emoji] though is SuperTuxKart and Spectral.
Any suggestion would be welcome.
Besides using a more capable terminal? :-)
> Besides using a more capable terminal? :-)
Fair question. I gave a shot to st because I feel that barer tools help me learn more, and become more capable, with IT. That's just how I feel. I came from MacOS and the world of proprietary software, then moved on to using Trisquel with a desktop environment (DE), and latety reinstalled Trisquel netinstall only - thanks to andyprough and others documenting their experiments here. I've learned a tone since I've been trying to "break tools down"; one-tool one-job - thinking of the UNIX philosophy here. I am not saying that's the way to go, but I like it this way.
> Not, it will not. TexLive works without texlive-fonts-extra-links and fonts-recommended. What will be removed alongside fonts-noto-color-emoji] though is SuperTuxKart and Spectral.
Okay but I am confused because when I simulate removing fonts-noto-color-emoji I get this:
$ apt -s remove fonts-noto-color-emoji
NOTE: This is only a simulation!
apt needs root privileges for real execution.
Keep also in mind that locking is deactivated,
so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
asymptote asymptote-doc biber cm-super cm-super-minimal fonts-adf-accanthis fonts-adf-berenis fonts-adf-gillius fonts-adf-universalis fonts-arphic-bkai00mp fonts-arphic-bsmi00lp fonts-arphic-gbsn00lp fonts-arphic-gkai00mp fonts-baekmuk fonts-cabin fonts-cantarell fonts-comfortaa fonts-ebgaramond fonts-ebgaramond-extra fonts-gfs-complutum fonts-go fonts-junicode fonts-linuxlibertine fonts-lobster fonts-lobstertwo fonts-noto-core fonts-oflb-asana-math fonts-open-sans fonts-roboto-unhinted fonts-sil-charis fonts-sil-gentium-basic fonts-sil-gentiumplu fonts-sil-gentiumplus-compact fonts-sil-padauk fonts-stix fonts-tlwg-garuda fonts-tlwg-garuda-otf fonts-tlwg-kinnari fonts-tlwg-kinnari-otf fonts-tlwg-laksaman fonts-tlwg-laksaman-ot fonts-tlwg-loma fonts-tlwg-loma-otf fonts-tlwg-mono fonts-tlwg-mono-otf fonts-tlwg-norasi fonts-tlwg-norasi-otf fonts-tlwg-purisa fonts-tlwg-purisa-otf fonts-tlwg-sawasdee fonts-tlwg-sawasdee-otf fonts-tlwg-typewriter fonts-tlwg-typewriter-otf fonts-tlwg-typist fonts-tlwg-typist-otf fonts-tlwg-typo fonts-tlwg-typo-otf fonts-tlwg-umpush fonts-tlwg-umpush-otf fonts-tlwg-waree fonts-tlwg-waree-otf fonts-unfonts-core fonts-unfonts-extra info latex-cjk-all latex-cjk-chinese latex-cjk-chinese-arphic-bkai00mp latex-cjk-chinese-arphic-bsmi00lp latex-cjk-chinese-arphic-gbsn00lp latex-cjk-chinese-arphic-gkai00mp latex-cjk-common latex-cjk-japanese latex-cjk-japanese-wadalab latex-cjk-korean latex-cjk-thai libautovivification-perl libbtparse2 libbusiness-ismn-perl libbusiness-issn-perl libclass-accessor-perl libclass-inspector-perl libclass-singleton-perl libdata-compare-perl libdata-uniqid-perl libdate-simple-perl libdatetime-calendar-julian-perl libdatetime-format-builder-perl libdatetime-format-strptime-perl libdatetime-locale-perl libdatetime-perl libdatetime-timezone-perl libencode-eucjpms-perl libencode-jis2k-perl libexporter-tiny-perl libfile-find-rule-perl libfile-sharedir-perl libfile-slurper-perl libgsl27 libgslcblas0 libipc-run3-perl liblingua-translit-perl liblist-allutils-perl liblist-moreutils-perl liblist-moreutils-xs-perl liblist-someutils-perl liblist-someutils-xs-perl liblist-utilsby-perl libnumber-compare-perl libosp5 libostyle1c2 libparams-validate-perl libparse-recdescent-perl libperlio-utf8-strict-perl libregexp-common-perl libsort-key-perl libtext-bibtex-perl libtext-csv-perl libtext-csv-xs-perl libtext-glob-perl libtext-roman-perl libtext-unidecode-perl libtie-cycle-perl libxml-libxml-perl libxml-libxml-simple-perl libxml-libxslt-perl libxml-namespacesupport-perl libxml-sax-base-perl libxml-sax-expat-perl libxml-sax-perl libxml-writer-perl openjade pfb2t1c2pfb sgml-base texinfo texlive-bibtex-extra texlive-fonts-extra texlive-fonts-extra-doc texlive-formats-extra texlive-games texlive-humanities texlive-humanities-doc texlive-lang-arabic texlive-lang-chinese texlive-lang-cjk texlive-lang-cyrillic texlive-lang-czechslovak texlive-lang-english texlive-lang-european texlive-lang-french texlive-lang-german texlive-lang-greek texlive-lang-italian texlive-lang-japanese texlive-lang-korean texlive-lang-other texlive-lang-polish texlive-lang-portuguese texlive-lang-spanish texlive-music texlive-publishers texlive-publishers-doc texlive-science texlive-science-doc
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
fonts-noto-color-emoji texlive-fonts-extra-links texlive-full
0 upgraded, 0 newly installed, 3 to remove and 0 not upgraded.
Remv texlive-full [2021.20220204-1]
Remv texlive-fonts-extra-links [2021.20220204-1]
Remv fonts-noto-color-emoji [2.042-0ubuntu0.22.04.1]
~$ apt list fonts-noto-color-emoji
Listing... Done
fonts-noto-color-emoji/aramo-updates,now 2.042-0ubuntu0.22.04.1 all [installed,automatic]
N: There is 1 additional version. Please use the '-a' switch to see it
~$ sudo apt autoremove
[sudo] password for redacted:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
The following packages will be REMOVED:
fonts-noto-color-emoji texlive-fonts-extra-links texlive-full
Doesn't this mean that texlive-full will be removed and so LaTeX?
--
From debian's website:
> Package: texlive-full (2018.20190227-2)
> The TeX Live software distribution offers a complete TeX system
The package texlive-full is a convenient way to install every package in Tex Live: they all depend on it. By itself, texlive-full does not install anything. You certainly do not need the whole Tex Live distribution.
That said, as explained closer to the beginning of the output, 'apt autoremove' would remove many packages, including some LaTeX packages. You may not need any of them (for instance, you need no package to write in Chinese if you never write in Chinese). If you do need some of them though, you should 'apt install' them. They are already installed, but as dependencies of packages that were removed. That is why 'apt autoremove' would remove them.
'apt autoremove' will save you disk space.
Thanks for clarifying what texlive-full is.
> You certainly do not need the whole Tex Live distribution.
No I don't - but I still have not found a way to identify packages I need (and the ones I don't need), hence the texlive-full install.
Re st's crashing problem: I went back to st's FAQ[1] and read that there is also a workaround to "mask color font":
The solution is to remove color emoji fonts or disable this in the fontconfig
XML configuration. As an ugly workaround (which may work only on newer
fontconfig versions (FC_COLOR)), the following code can be used to mask color
fonts:
FcPatternAddBool(fcpattern, FC_COLOR, FcFalse);
I applied that workaround and st no longer crashes when displaying emoji.[2]
Also, st no longer crashes when I scroll up when running $ khal interactive.
Thanks again for your help, MB.
[1] https://git.suckless.org/st/file/FAQ.html
[2] these are the steps in detail: https://yctct.com/st-emoji-crash
This is great news! I love st because it is so very light on system resources, but I usually give up on using it for anything complex. I've gotten mouse-wheel-scrolling working by adding a bunch of patches, but you are taking it past anything I've managed.
I still have not found a way to identify packages I need (and the ones I don't need), hence the texlive-full install.
You can start with only the package that is simply named "texlive". As its description informs:
This metapackage provides a decent selection of the TeX Live packages which should suffice for the most common tasks.
If (pdf)latex (or similar) fails to create one of your documents, look in its output what it reports as missing (something you gave to the \usepackage command), search it in the descriptions of the packages (for instance using the Synaptic package manager), and install the related package. For instance, it is probable you will need something listed in the description of texlive-latex-extra, maybe texlive-science (for instance to typeset algorithms), etc.
Even with such additional packages, you can easily save more than 2GB of space on your root partition by only installing what you need for your LaTeX documents rather than the full Tex Live distribution, which is huge.