<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">

<channel>
<title>friendo dot monster</title>
<image>
<url>https://friendo.monster/images/favicon.png</url>
<title>friendo dot monster</title>
<link>https:/friendo.monster/</link>
</image>
<description>Drew's site</description>
<language>en-gb</language>
<link>https://friendo.monster/rss.xml</link>
<atom:link href="https://friendo.monster/rss.xml" rel="self" type="application/rss+xml" />

<item>
<title>Fuck web services</title>
<link>https://friendo.monster/posts/fuck-web-services.html</link>
<guid>https://friendo.monster/posts/fuck-web-services.html</guid>
<pubDate>Wed, 25 Mar 2026 11:14:06 +0000</pubDate>
<description><![CDATA[<p>I watch a fair amount of films and TV and I also have a shit memory, so it’s nice to have a list of stuff I’ve watched with (very arbitrary) ratings. Not to obsessively track what I watch, I don’t care about that, but for those (frequent) times when I go “What was that good film we watched the other day?” or when people ask for recommendations.</p>
<p>I used a website called Trakt for this and it worked well enough. All I really wanted was a list of stuff I’d watched ordered by date and by rating (two lists, like) and it did that fine.</p>
<p>Recently, they seemed to enter the “we’ve got a load of users, let’s paywall everything in the guise of a ‘UI redesign’” phase of their development cycle.</p>
<p>I could just move to whatever web service people are moving to instead, but the same thing would happen, it would be temporary. Or maybe Trakt will relent in the face of <em>everyone hating the ‘redesign’</em>, but the same applies.</p>
<p>When we use these things we’re at the whim of what some techbro bellend thinks will be profitable. It’s always temporary, the rug will always be pulled.</p>
<p>It’s not even like Trakt was doing anything clever, for my use at least, just a list of films/shows with dates and ratings. So I decided to replace it with a <a href="https://gitlab.com/uoou/dotfiles/-/blob/master/stow/bin/home/drew/.local/bin/rate?ref_type=heads">bash script</a> (yeah, I know, I’ll get off Gitlab soon).</p>
<p>I exported my ‘data’ from Trakt, which was all in horrible json. I did some <a href="https://jqlang.org/">jq</a> magic (i.e. guesswork) and got the stuff I cared about into a single tab-separated file.</p>
<p>Now I can just go <code>rate "White Men Can't Jump" 1992 10</code> in a terminal and the script takes that, sticks it in the tsv file with today’s date, generates a couple of very basic <a href="/dat.html">html pages</a> and uploads them to this server. I also made it so I can just update in case I want to stick stuff in the tsv manually.</p>
<p>I’m not suggesting anyone else use this script, it’s not particularly well written and is tailored very much to my use. But it only took about an hour, works better than Trakt ever did for me and will work forever.</p>]]></description>
<content:encoded><![CDATA[<p>I watch a fair amount of films and TV and I also have a shit memory, so it’s nice to have a list of stuff I’ve watched with (very arbitrary) ratings. Not to obsessively track what I watch, I don’t care about that, but for those (frequent) times when I go “What was that good film we watched the other day?” or when people ask for recommendations.</p>
<p>I used a website called Trakt for this and it worked well enough. All I really wanted was a list of stuff I’d watched ordered by date and by rating (two lists, like) and it did that fine.</p>
<p>Recently, they seemed to enter the “we’ve got a load of users, let’s paywall everything in the guise of a ‘UI redesign’” phase of their development cycle.</p>
<p>I could just move to whatever web service people are moving to instead, but the same thing would happen, it would be temporary. Or maybe Trakt will relent in the face of <em>everyone hating the ‘redesign’</em>, but the same applies.</p>
<p>When we use these things we’re at the whim of what some techbro bellend thinks will be profitable. It’s always temporary, the rug will always be pulled.</p>
<p>It’s not even like Trakt was doing anything clever, for my use at least, just a list of films/shows with dates and ratings. So I decided to replace it with a <a href="https://gitlab.com/uoou/dotfiles/-/blob/master/stow/bin/home/drew/.local/bin/rate?ref_type=heads">bash script</a> (yeah, I know, I’ll get off Gitlab soon).</p>
<p>I exported my ‘data’ from Trakt, which was all in horrible json. I did some <a href="https://jqlang.org/">jq</a> magic (i.e. guesswork) and got the stuff I cared about into a single tab-separated file.</p>
<p>Now I can just go <code>rate "White Men Can't Jump" 1992 10</code> in a terminal and the script takes that, sticks it in the tsv file with today’s date, generates a couple of very basic <a href="/dat.html">html pages</a> and uploads them to this server. I also made it so I can just update in case I want to stick stuff in the tsv manually.</p>
<p>I’m not suggesting anyone else use this script, it’s not particularly well written and is tailored very much to my use. But it only took about an hour, works better than Trakt ever did for me and will work forever.</p>]]></content:encoded>
</item>


<item>
<title>Pixel fonts in terminals</title>
<link>https://friendo.monster/posts/pixel-fonts-in-terminals.html</link>
<guid>https://friendo.monster/posts/pixel-fonts-in-terminals.html</guid>
<pubDate>Tue, 24 Mar 2026 14:12:36 +0000</pubDate>
<description><![CDATA[<p>For years I’ve heard extensive-terminal-users proselytise about pixel fonts. I’d never paid much attention because what is this, the 1800s? But I’ve been hankering for a bit of <a href="xterm-is-good.html">basicness</a> in my computering recently so I thought I’d give them a pop.</p>
<h2 id="what-is-it-fonts">What is it “fonts”?</h2>
<p>Back in the olden days, when computers mainly did text, screens were divided into rows and columns of characters, and characters were rows and columns of pixels. And that’s what a pixel font still is - characters drawn in a fixed-size grid with pixels that are entirely on or off.</p>
<p>In the modern times we have fonts that are made of curves rather than pixels. <em>Vectors</em>, as the kids call them. Screens, of course, are still made of pixels, and you can’t really do curves on a pixel grid, you can only, with some fancy maths, <em>approximate</em> them. The higher the density of pixels, the closer the approximation gets, but it’s always an approximation. Or, in other words, <em>a disgusting and shameful lie</em>.</p>
<p>When you’re sending sinuous curves through a pixel grid, sometimes the curve will pass through half a pixel. Is that pixel on or off? What you got, particularly on relatively low-density screens relative to the font size, was often a bit of a fucking mess.</p>
<p>But then font-boffins invented <em>hinting</em>, whereby the font contained information as to whether, when a curve passes half-way through a pixel, that bit of the letter is more <em>inny</em> or <em>outie</em> and, therefore, whether that pixel should be on or off.</p>
<p>And we carried those boffins through the streets on our shoulders. Statues were erected and songs were sung. Finally our letters could be more roundier, without bits sticking out in weird places. “But wait!” someone in the crowd shouted, “The letters are still jaggy!” The scales fell from our eyes and we kicked the boffins to death for their wicked pride.</p>
<p>Their progeny continued their diabolical work and invented anti-aliasing: What if, when those curves pass partially through a pixel, instead of making it either black or white, we sometimes made it in-between, deceiving thine eyes into seeing something smooth.</p>
<p>So, to display a letter in a pixel font, the computer asks the font: Is this pixel on or off? And the font replies either “on” or “off”. Computers <em>love</em> this, since “on or off” is their native language.</p>
<p>To display a vector font, the computer asks the same question, and the font replies: It’s complicated, here’s a lot of difficult maths homework.</p>
<p>Does this extra work really matter on a modern computer? No, not at all. But it does add complexity - you generally need libraries to do all that fancy font maths.</p>
<h2 id="who-the-pixels-though">Who the pixels though?</h2>
<p>One thing that pixel fonts are objectively, undeniably better at is being legible at very small sizes. While the notable downside is that they can’t really be resized, you get what you’re given in terms of font sizes.</p>
<p>There’s a certain kind of <del>dickhead</del> productivity-maxing programmer-type who just wants to have as much text on screen as is humanly possible, so many of the modern pixel fonts prioritise clarity at absurdly tiny sizes.</p>
<p>I’m not interested in that and my eyes are too old for it anyway, I just want a nice, crisp pixel font that looks decent at normal sizes.</p>
<p>I tried a handful of these and found them mostly lacking - they tend to not have enough sizes (I want to ‘zoom’ in on my terminals sometimes), look inconsistent at different sizes or, often, both.</p>
<p>So I settled on <a href="https://terminus-font.sourceforge.net/">Terminus</a>, which is very much the de facto default of pixel fonts (suiting my <em>drive for basicness</em>). It’s not, to my eyes, the most <em>attractive</em> font - I like my serifs and my curly gs and ks - but it’s decent enough, comes in loads of sizes and looks consistent across those sizes.</p>
<h2 id="so-as-to-be-using-it-though">So as to be using it though???</h2>
<p>I’ve been using Terminus as my terminal font for a week or two now. It’s very geometric when I tend to favour something a bit humanist or irregular-leaning neo-grotesque, but I got used to it fairly quickly and quite like it now. Despite being very regular, it does have a touch of personality, particularly in the letters with descenders (which might just be a function of fitting the pixel grid but I like it nonetheless).</p>
<p>And something I thought might happen has happened - vector fonts at body-text sizes, particularly in terminals, look unpleasantly blurry/fuzzy to me now.</p>
<p><a href="/images/pixel_font_comparison.png"><img src="/images/pixel_font_comparison.png" alt="two terminals side-by-side, the left one using Terminus pixel font and the right using IBM Plex Mono, a vector font" /></a></p>
<p>Since your eyes probably haven’t beheld the glory of pixel fonts as mine have, you probably aren’t seeing that as I am. Here’s an artist’s impression of how that looks to me.</p>
<p><img src="/images/pixel_font_artist_comparison.jpg" alt="left: a beautiful illuminated manuscript, right: a grotesque human special effect" /></p>
<h2 id="summerly">Summerly</h2>
<p>I like my pixel terminal font. I will be sticking with it. The crisp clarity seeps into your eyes like honey spat through a sieve by an elderly bigot.</p>
<hr />
<h2 id="a-pedantic-aside">A pedantic aside</h2>
<p>What we tend to refer to as a <em>font</em> is actually a <em>typeface</em>. For example, Comic Sans is a typeface not a font. A font is a typeface with particular characteristics (size, weight, etc.). Comic Sans in bold at 12pt is a font. I’m not arguing that the ‘correct’ usage should be pushed, that battle is lost, just might be interesting for anyone not aware of the distinction.</p>]]></description>
<content:encoded><![CDATA[<p>For years I’ve heard extensive-terminal-users proselytise about pixel fonts. I’d never paid much attention because what is this, the 1800s? But I’ve been hankering for a bit of <a href="xterm-is-good.html">basicness</a> in my computering recently so I thought I’d give them a pop.</p>
<h2 id="what-is-it-fonts">What is it “fonts”?</h2>
<p>Back in the olden days, when computers mainly did text, screens were divided into rows and columns of characters, and characters were rows and columns of pixels. And that’s what a pixel font still is - characters drawn in a fixed-size grid with pixels that are entirely on or off.</p>
<p>In the modern times we have fonts that are made of curves rather than pixels. <em>Vectors</em>, as the kids call them. Screens, of course, are still made of pixels, and you can’t really do curves on a pixel grid, you can only, with some fancy maths, <em>approximate</em> them. The higher the density of pixels, the closer the approximation gets, but it’s always an approximation. Or, in other words, <em>a disgusting and shameful lie</em>.</p>
<p>When you’re sending sinuous curves through a pixel grid, sometimes the curve will pass through half a pixel. Is that pixel on or off? What you got, particularly on relatively low-density screens relative to the font size, was often a bit of a fucking mess.</p>
<p>But then font-boffins invented <em>hinting</em>, whereby the font contained information as to whether, when a curve passes half-way through a pixel, that bit of the letter is more <em>inny</em> or <em>outie</em> and, therefore, whether that pixel should be on or off.</p>
<p>And we carried those boffins through the streets on our shoulders. Statues were erected and songs were sung. Finally our letters could be more roundier, without bits sticking out in weird places. “But wait!” someone in the crowd shouted, “The letters are still jaggy!” The scales fell from our eyes and we kicked the boffins to death for their wicked pride.</p>
<p>Their progeny continued their diabolical work and invented anti-aliasing: What if, when those curves pass partially through a pixel, instead of making it either black or white, we sometimes made it in-between, deceiving thine eyes into seeing something smooth.</p>
<p>So, to display a letter in a pixel font, the computer asks the font: Is this pixel on or off? And the font replies either “on” or “off”. Computers <em>love</em> this, since “on or off” is their native language.</p>
<p>To display a vector font, the computer asks the same question, and the font replies: It’s complicated, here’s a lot of difficult maths homework.</p>
<p>Does this extra work really matter on a modern computer? No, not at all. But it does add complexity - you generally need libraries to do all that fancy font maths.</p>
<h2 id="who-the-pixels-though">Who the pixels though?</h2>
<p>One thing that pixel fonts are objectively, undeniably better at is being legible at very small sizes. While the notable downside is that they can’t really be resized, you get what you’re given in terms of font sizes.</p>
<p>There’s a certain kind of <del>dickhead</del> productivity-maxing programmer-type who just wants to have as much text on screen as is humanly possible, so many of the modern pixel fonts prioritise clarity at absurdly tiny sizes.</p>
<p>I’m not interested in that and my eyes are too old for it anyway, I just want a nice, crisp pixel font that looks decent at normal sizes.</p>
<p>I tried a handful of these and found them mostly lacking - they tend to not have enough sizes (I want to ‘zoom’ in on my terminals sometimes), look inconsistent at different sizes or, often, both.</p>
<p>So I settled on <a href="https://terminus-font.sourceforge.net/">Terminus</a>, which is very much the de facto default of pixel fonts (suiting my <em>drive for basicness</em>). It’s not, to my eyes, the most <em>attractive</em> font - I like my serifs and my curly gs and ks - but it’s decent enough, comes in loads of sizes and looks consistent across those sizes.</p>
<h2 id="so-as-to-be-using-it-though">So as to be using it though???</h2>
<p>I’ve been using Terminus as my terminal font for a week or two now. It’s very geometric when I tend to favour something a bit humanist or irregular-leaning neo-grotesque, but I got used to it fairly quickly and quite like it now. Despite being very regular, it does have a touch of personality, particularly in the letters with descenders (which might just be a function of fitting the pixel grid but I like it nonetheless).</p>
<p>And something I thought might happen has happened - vector fonts at body-text sizes, particularly in terminals, look unpleasantly blurry/fuzzy to me now.</p>
<p><a href="/images/pixel_font_comparison.png"><img src="/images/pixel_font_comparison.png" alt="two terminals side-by-side, the left one using Terminus pixel font and the right using IBM Plex Mono, a vector font" /></a></p>
<p>Since your eyes probably haven’t beheld the glory of pixel fonts as mine have, you probably aren’t seeing that as I am. Here’s an artist’s impression of how that looks to me.</p>
<p><img src="/images/pixel_font_artist_comparison.jpg" alt="left: a beautiful illuminated manuscript, right: a grotesque human special effect" /></p>
<h2 id="summerly">Summerly</h2>
<p>I like my pixel terminal font. I will be sticking with it. The crisp clarity seeps into your eyes like honey spat through a sieve by an elderly bigot.</p>
<hr />
<h2 id="a-pedantic-aside">A pedantic aside</h2>
<p>What we tend to refer to as a <em>font</em> is actually a <em>typeface</em>. For example, Comic Sans is a typeface not a font. A font is a typeface with particular characteristics (size, weight, etc.). Comic Sans in bold at 12pt is a font. I’m not arguing that the ‘correct’ usage should be pushed, that battle is lost, just might be interesting for anyone not aware of the distinction.</p>]]></content:encoded>
</item>


<item>
<title>Things I enjoyed in 2025</title>
<link>https://friendo.monster/posts/things-i-enjoyed-in-2025.html</link>
<guid>https://friendo.monster/posts/things-i-enjoyed-in-2025.html</guid>
<pubDate>Thu, 01 Jan 2026 22:36:49 +0000</pubDate>
<description><![CDATA[<p>During this time of whatever it’s important to y’know.</p>
<p>So let’s do that! Here are some things that I enjoyed for the first time in 2025 probably, regardless of when they were made.</p>
<p>I’ll mostly lean towards less obvious stuff cos it’s fairly pointless highlighting stuff everyone knows about. With the exception of…</p>
<h2 id="pluribus-2025-tv">Pluribus (2025) (tv)</h2>
<p>Everyone knows about this one already. I’m sure we’ve all had plenty of people telling us to watch this. But, for once, they’re right!</p>
<p>It’s like they took a good Star Trek episode premise with its interesting sci-fi situation and all the philosophical questions and ethical conundra that entails, span it out into a full series, and then made it very character focused. It’s slow in a rewarding way, intentional and darkly funny.</p>
<p>What did we learn?</p>
<ul>
<li>Don’t(?) shout at it</li>
</ul>
<h2 id="dinner-in-america-2020-film">Dinner in America (2020) (film)</h2>
<p>You won’t believe me 20 minutes in but this is the most charming, heart-warming romance I’ve seen in forever. I was blubbing for the last 1/3 or so.</p>
<p>Two misfits meet and stuff happens. I don’t want to say anything. Just watch it.</p>
<video controls>
<source src="/video/cool.mp4" type="video/mp4">
</video>
<p>What did we learn?</p>
<ul>
<li>You are punk as fuck</li>
</ul>
<h2 id="beyond-the-infinite-two-minutes-2020-film">Beyond the Infinite Two Minutes (2020) (film)</h2>
<p>A fella works in a café and discovers that the TV in the café and the monitor in his flat above are connected, but the TV in the café is two minutes in the future.</p>
<p>It’s all presented as a continuous take which gives it a nice kinetic feel as the characters get their heads around the intricacies of the time paradox.</p>
<p>It’s very playful and a ton of fun.</p>
<p>What did we learn?</p>
<ul>
<li>Japanese monitor cables are really long</li>
</ul>
<h2 id="the-great-villainess-strategy-of-lily-2025-game">The Great Villainess: Strategy of Lily (2025) (game)</h2>
<p>Imagine if they took JRPG turn-based combat but somehow actually made it fun. <em>Impossible</em>, you say, and I would’ve agreed, but they’ve only gone and bloody done it!</p>
<p>Narratively it’s about a crazed noble, Scarlet, who’s launching a rebellion against the king or emperor or something. You play as Lily who’s tasked with reining in Scarlet’s more genocidal tendencies (or not) and winning the war while also… streaming the battles and gaining followers. It’s quite silly. The dialogue’s witty and engaging and, unusually, there’s not <em>too fucking much</em> of it.</p>
<p>There’s a strategic overmap which <em>actually has some nice strategy to it</em> due to a cool supply-chain mechanic. And battles themselves are <em>only three turns</em>, which transforms what’s usually a spam-best-attack slog into something very intentional and thoughtful.</p>
<p>What did we learn?</p>
<ul>
<li>The revolution is televised</li>
</ul>
<h2 id="under-the-silver-lake-2018-film">Under the Silver Lake (2018) (film)</h2>
<p>An odd, hazy, symbolist polemic. Playfully dissects our relationship with entertainment in general and celebrity and Hollywood in particular. Sort of oozes in and out of the aesthetics and forms of classic Hollywood in a way that reveals within them a looming menace. It’s unsettling and beautiful and delightful. One of them where saying too much would spoil it a bit.</p>
<p>What did we learn?</p>
<ul>
<li>🐶🔪💵🏃💃🎈🦉🚗751</li>
</ul>
<h2 id="patriot-2015-tv">Patriot (2015) (tv)</h2>
<p>CIA operative gets a non-official cover job at a Miluake piping company in order to do CIA stuff. Clearly depressed and traumatised, we follow him as he does what’s expected, almost entirely alienated from reality and the people around him. At night he sings folk songs about his activities to process his emotions. It’s weird and dark and funny.</p>
<p>(caveat: I’ve only watched one of two seasons so far)</p>
<p>What did we learn?</p>
<ul>
<li>The CIA does bad stuff 😮</li>
</ul>
<h2 id="welcome-to-me-2014-film">Welcome to Me (2014) (film)</h2>
<p>A woman with borderline personality disorder wins the lottery and then pays for a TV talk show about herself. Will this alienate her further from those around her? Or will it help people understand her and she them? OMG I DON’T KNOW WATCH AND FIND OUT!!!!!!</p>
<p>It neither romanticises her ‘illness’ nor fetishises her struggle and feels (to me, as someone who doesn’t have it) true to how that disorder might feel.</p>
<p>What did we learn?</p>
<ul>
<li>Bananas are in their own container</li>
</ul>
<h2 id="superman-2025-film">Superman (2025) (film)</h2>
<p>James Gunn sure knows how to make a comic book film. I’d not heard of him before but apparently “Superman” is a strong alien from a long-running series of comic books.</p>
<p>I enjoyed this film a lot. But more than that it was just really fucking refreshing to see a fun, actually-heroic, humanised Superman after the exhausting, miserable, loud, boring, violent, excessive, long, dark grey mess of the Snyder DC films.</p>
<p>It’s fun!</p>
<p>What did we learn?</p>
<ul>
<li>Everyone wants to fuck Jimmy Olsen</li>
</ul>
<h2 id="section">&lt;3</h2>
<p>I want to say thank you to the people with whom I enjoyed a lot of these on our <a href="https://discord.gg/QEf7ANp9uV">discord server</a>: <a href="https://thefrenchghosty.me/">Ghosty</a>, <a href="http://feather.onl/blog/">Wing</a>, Dani, Char, Temhr, <a href="https://thepolarbear.co.uk/">Hamish</a>, Anjune, Nado, ait and the ones I inevitably forgot. You made my year brighter, thank you &lt;3</p>]]></description>
<content:encoded><![CDATA[<p>During this time of whatever it’s important to y’know.</p>
<p>So let’s do that! Here are some things that I enjoyed for the first time in 2025 probably, regardless of when they were made.</p>
<p>I’ll mostly lean towards less obvious stuff cos it’s fairly pointless highlighting stuff everyone knows about. With the exception of…</p>
<h2 id="pluribus-2025-tv">Pluribus (2025) (tv)</h2>
<p>Everyone knows about this one already. I’m sure we’ve all had plenty of people telling us to watch this. But, for once, they’re right!</p>
<p>It’s like they took a good Star Trek episode premise with its interesting sci-fi situation and all the philosophical questions and ethical conundra that entails, span it out into a full series, and then made it very character focused. It’s slow in a rewarding way, intentional and darkly funny.</p>
<p>What did we learn?</p>
<ul>
<li>Don’t(?) shout at it</li>
</ul>
<h2 id="dinner-in-america-2020-film">Dinner in America (2020) (film)</h2>
<p>You won’t believe me 20 minutes in but this is the most charming, heart-warming romance I’ve seen in forever. I was blubbing for the last 1/3 or so.</p>
<p>Two misfits meet and stuff happens. I don’t want to say anything. Just watch it.</p>
<video controls>
<source src="/video/cool.mp4" type="video/mp4">
</video>
<p>What did we learn?</p>
<ul>
<li>You are punk as fuck</li>
</ul>
<h2 id="beyond-the-infinite-two-minutes-2020-film">Beyond the Infinite Two Minutes (2020) (film)</h2>
<p>A fella works in a café and discovers that the TV in the café and the monitor in his flat above are connected, but the TV in the café is two minutes in the future.</p>
<p>It’s all presented as a continuous take which gives it a nice kinetic feel as the characters get their heads around the intricacies of the time paradox.</p>
<p>It’s very playful and a ton of fun.</p>
<p>What did we learn?</p>
<ul>
<li>Japanese monitor cables are really long</li>
</ul>
<h2 id="the-great-villainess-strategy-of-lily-2025-game">The Great Villainess: Strategy of Lily (2025) (game)</h2>
<p>Imagine if they took JRPG turn-based combat but somehow actually made it fun. <em>Impossible</em>, you say, and I would’ve agreed, but they’ve only gone and bloody done it!</p>
<p>Narratively it’s about a crazed noble, Scarlet, who’s launching a rebellion against the king or emperor or something. You play as Lily who’s tasked with reining in Scarlet’s more genocidal tendencies (or not) and winning the war while also… streaming the battles and gaining followers. It’s quite silly. The dialogue’s witty and engaging and, unusually, there’s not <em>too fucking much</em> of it.</p>
<p>There’s a strategic overmap which <em>actually has some nice strategy to it</em> due to a cool supply-chain mechanic. And battles themselves are <em>only three turns</em>, which transforms what’s usually a spam-best-attack slog into something very intentional and thoughtful.</p>
<p>What did we learn?</p>
<ul>
<li>The revolution is televised</li>
</ul>
<h2 id="under-the-silver-lake-2018-film">Under the Silver Lake (2018) (film)</h2>
<p>An odd, hazy, symbolist polemic. Playfully dissects our relationship with entertainment in general and celebrity and Hollywood in particular. Sort of oozes in and out of the aesthetics and forms of classic Hollywood in a way that reveals within them a looming menace. It’s unsettling and beautiful and delightful. One of them where saying too much would spoil it a bit.</p>
<p>What did we learn?</p>
<ul>
<li>🐶🔪💵🏃💃🎈🦉🚗751</li>
</ul>
<h2 id="patriot-2015-tv">Patriot (2015) (tv)</h2>
<p>CIA operative gets a non-official cover job at a Miluake piping company in order to do CIA stuff. Clearly depressed and traumatised, we follow him as he does what’s expected, almost entirely alienated from reality and the people around him. At night he sings folk songs about his activities to process his emotions. It’s weird and dark and funny.</p>
<p>(caveat: I’ve only watched one of two seasons so far)</p>
<p>What did we learn?</p>
<ul>
<li>The CIA does bad stuff 😮</li>
</ul>
<h2 id="welcome-to-me-2014-film">Welcome to Me (2014) (film)</h2>
<p>A woman with borderline personality disorder wins the lottery and then pays for a TV talk show about herself. Will this alienate her further from those around her? Or will it help people understand her and she them? OMG I DON’T KNOW WATCH AND FIND OUT!!!!!!</p>
<p>It neither romanticises her ‘illness’ nor fetishises her struggle and feels (to me, as someone who doesn’t have it) true to how that disorder might feel.</p>
<p>What did we learn?</p>
<ul>
<li>Bananas are in their own container</li>
</ul>
<h2 id="superman-2025-film">Superman (2025) (film)</h2>
<p>James Gunn sure knows how to make a comic book film. I’d not heard of him before but apparently “Superman” is a strong alien from a long-running series of comic books.</p>
<p>I enjoyed this film a lot. But more than that it was just really fucking refreshing to see a fun, actually-heroic, humanised Superman after the exhausting, miserable, loud, boring, violent, excessive, long, dark grey mess of the Snyder DC films.</p>
<p>It’s fun!</p>
<p>What did we learn?</p>
<ul>
<li>Everyone wants to fuck Jimmy Olsen</li>
</ul>
<h2 id="section">&lt;3</h2>
<p>I want to say thank you to the people with whom I enjoyed a lot of these on our <a href="https://discord.gg/QEf7ANp9uV">discord server</a>: <a href="https://thefrenchghosty.me/">Ghosty</a>, <a href="http://feather.onl/blog/">Wing</a>, Dani, Char, Temhr, <a href="https://thepolarbear.co.uk/">Hamish</a>, Anjune, Nado, ait and the ones I inevitably forgot. You made my year brighter, thank you &lt;3</p>]]></content:encoded>
</item>


<item>
<title>Emojis are shit</title>
<link>https://friendo.monster/posts/emojis-are-shit.html</link>
<guid>https://friendo.monster/posts/emojis-are-shit.html</guid>
<pubDate>Mon, 18 Aug 2025 00:00:00 +0100</pubDate>
<description><![CDATA[<p>The chat program Trillian had the best emoticons. Back during the regency era, my friends and I fell in love with them immediately and took them to other platforms long after we stopped using Trillian. They had a derpy cuteness and abundance of personality without being overly specific. Their meaning was negotiated and contextual. Like the human interaction we humans enjoy.</p>
<p><a href="/images/trillian_emoticons.jpg">/images/trillian_emoticons.jpg</a></p>
<p>There was ‘pipeface’ (7 down, 2nd from right in the image above), summoned with <code>:Y</code>. It’s a picture of a person with a resolute frown smoking a pipe. I have absolutely no idea whatsoever what it was intended to convey and it doesn’t matter - we used it when we knew we were being a bit pompous (perhaps playfully, perhaps not) or to convey finality - a sense of <em>… and I will brook no further argument</em>. “It’s a shit game and I shan’t play it :Y”, “Monet is overrated :Y”, “A meal fit for a king :Y”. There’s no emoji that does that.</p>
<p>Then there were ‘hugleft’ and ‘hugright’, summoned with <code>({)</code> and <code>(})</code> (4 down and 3 &amp; 4 in on the image). We used this when we were feeling sad or vulnerable or just in need of comfort. One would request/offer with <code>({)</code> and others would complete with <code>(})</code>. And there was a sense of completion to it - it was bilateral, like a hug.</p>
<p>And ‘nod’, summoned with <code>(nod)</code> (9 down, 3 in). This one was animated and, because of its unblinking stare and smug, slow nod, it was usually used sarcastically.</p>
<p>There are so many good ones but the last one I’ll touch on is <code>inlove</code>, summoned with <code>%)</code> (9 down, 2 in (left of (nod))). Another animated one where the eyes would kinda drift around resulting in a delirious expression that really captured <em>feeling love</em> in a way that the lazy sterility of 🥰 and 😍 simply do not.</p>
<p>My friends and I continued using the textual form of these emoticons long after we could convince the platforms we were chatting on to use the pictures. I still sometimes end sentences with ‘:Y’.</p>
<p>Emoticons were great. Whichever emoticons were used in a particular community would gain meanings specific to that community. They had personality and a bit of <em>humanity</em> to them, which allowed them to <em>gain</em> meaning through interpretation and use. To be contextual and fluid while, in a particular context, specific. They were aesthetically rich and semantically vague enough to encourage <em>reading in</em> - they were <em>descriptive</em> rather than <em>prescriptive</em>.</p>
<p>And then there’s the bland dead-eyed coporate HR-clipart of emojis…</p>
<h2 id="bland">Bland</h2>
<p>They’re bland for the exact same reasons that clipart is bland - by design. They’re cornflakes - designed to elicit no feelings whatsoever. They’re as devoid of imagination and humanity as the corporate culture that shat them wetly onto our screens. They make Vettriano look like Caravaggio. They were begotten without love. The propaganda of purgatory.</p>
<p>If you want to send someone a hug you’ve got 🤗, which looks like a sex predator coming in for a titty grab or 🫂, two ghouls embracing limply. Corporations don’t understand love or compassion or comradeship. So this is what we get, a hug is either sex predation or two empty mannequins in a flaccid grapple.</p>
<p>Here’s the Trillian hug emoticon for contrast:</p>
<p><img style="width: 80px; height: 32px; image-rendering: pixelated; image-rendering: crisp-edges;" src="/images/hug.gif"></p>
<p>Sure it has the advantage of being animated but, that aside, there’s a warmth and humanity to it. It <em>feels</em> right. Because it was made by a person who had experienced a hug ever, not a consortium of Californian vampires.</p>
<h2 id="theres-too-many-of-them">There’s too many of them</h2>
<p>There are <em>so fucking many of them</em>. According to the <a href="https://unicode.org">unicode website</a> there are either <em>1910</em>, if you look at the <a href="https://unicode.org/emoji/charts/full-emoji-list.html">full emoji list</a> or <em>3790</em> if you look at <a href="https://unicode.org/emoji/charts/emoji-counts.html">emoji counts</a>. Either way, it’s a fucking lot.</p>
<p>To put that into perspective, the constructed language <a href="https://tokipona.org/">Toki Pona</a>, created by <a href="https://www.lang.sg/">Sonja Lang</a> has 120-137 words. It’s a minimalistic language by design but it supports <a href="https://www.reddit.com/r/tokipona/comments/17mghq3/is_toki_pona_actually_usable/">full conversations</a>. With, at most, 1/16th the number of symbols as emoji. Could you have a full conversation in emoji? Could you fuck as like.</p>
<p>The language <a href="https://dedalvs.com/work/the-100/trigedasleng_v5.pdf">Trigedasleng</a>, created by <a href="https://dedalvs.com/">David J. Peterson</a> for the TV show <a href="https://www.youtube.com/watch?v=aDrsItJ_HU4">The 100</a> has about 1700 words and I know for a fact supports full conversations (and fanfics and song translations and so on) because I have friends who do that.</p>
<p>And emojis aren’t even a natural language - they don’t need to be able to express all that can be said - they exist, as did the earliest ASCII smileys, to convey what doesn’t come across easily in text - mood, tone, posture and so on.</p>
<p>Their job is just to <em>augment</em> natural language - to add a bit of warmth or to let the other person know I’m being facetious or feeling sympathetic or irritated or bored or delirious with love.</p>
<p>And somehow we’ve ended up with about 2000 of them. Which is far too many to visually scan through, as you could with emoticons back in the day, so you have to search. Which brings me to…</p>
<h3 id="whats-going-on-with-the-fucking-names">What’s going on with the fucking names?</h3>
<p>I want to send 😐 so I search for “straight mouth” cos, y’know, we humans call that a straight-mouthed expression. I eventually find it under “neutral expression”. Which, first off, it isn’t really, that would be a blank-eyed stare. And, secondly, yeah that’s absolutely how humans talk. Neutral expression. Just set all our transistors to zero and that’s the expression we humans have.</p>
<p>I want to send a nod, so I search for… that. But no, “head shaking vertically”. Y’know, like we all say. “Yeah I agreed with her so I shook my head vertically.” So normal. So human.</p>
<p>I want to send 💦, so I search for water? Nope. Splash? Nope. Drip?! Nope. Oh it’s <em>sweat droplets</em>. Of course. Because we all think in anime.</p>
<p>This isn’t the fault of whatever software I happen to be using to send the message, these names are baked into the standard.</p>
<p>The primary problem is having so many that I <em>need</em> to search rather than picking at a glance. The secondary problem is that these names are a mishmash of, in some cases, trying to describe what’s happening without assuming any social or cultural context - some cultures don’t nod in agreement so let’s call it a “vertical head shake” - and, in other cases, describing them in a very specific cultural context as with “sweat droplets”.</p>
<p>They really don’t know whether they want to be general and standard or specific.</p>
<h2 id="the-general-and-the-specific">The general and the specific</h2>
<p>Emoticons worked best when they tended towards aesthetic richness and semantic looseness. By which I mean they had a ton of personality and were visually fun, such that they invited reading-in and repurposing, and they were not too tied down semantically - I have no idea what pipeface was <em>supposed</em> to mean, we imbued it with meaning ourselves.</p>
<p>This allowed them to… do their job. To add context, emotion and situationality. Not to try to do the job of natural language and convey straightforward meaning.</p>
<p>Emojis go the absolute other way - aesthetically sterile and semantically nailed down.</p>
<p>Trillian had a couple of emoticons for food. So if I wanted to express that I was <em>really</em> looking forward to my food I could say “I’m making cheese on toast (food)(drool)”</p>
<p>It didn’t matter what food it was. Food is a shared human experience, it didn’t need to be specific.</p>
<p>Similarly there was one flag emoticon. It was just a red flag. It could be used to express shared pride or comradeship like “I’m watching India win the cricket with Nish (flag)” or “We’re going on the protest later (flag)” or “Branston Pickle was invented in Staffordshire (flag)”</p>
<p>It didn’t matter <em>what</em> the flag was, it just represented <em>shared experience</em> and communality in a particular context.</p>
<p>Oh but I see emojis have 300-odd flags so we’re all divided up again, lovely. The dream of the internet.</p>
<p>And <em>130</em> food items. 30ish Japanese foods, due to emoji’s heritage, a bunch of fruit and veg and the rest are mostly… foods that <a href="/video/californians.webm">Californian</a> techbros have heard of.</p>
<p>This is the problem with specificity. We have 130 very specific foods but not a single <em>specific</em> food item from Africa or South Asia. And <em>one</em> from West Asia because Californian techbros have had falafel I guess.</p>
<p>And no <a href="https://en.wikipedia.org/wiki/Staffordshire_oatcake">North Staffordshire oatcakes</a>, an absolute fucking travesty (flag)</p>
<p>We’re going to end up with 5000 food emojis and it’ll never have the one you actually want in the moment unless you eat nothing but sushi and texmex. What an improvement over just having a plate of food!</p>
<p>But at least we’ve got the 🔰 emoji. For all the times every day I want to say 🔰 and would have no way to say 🔰 without 🔰 being an emoji 🙅</p>
<h2 id="what">What?</h2>
<p>Emoticons, and textual smileys before them, were made with love, by and for communities. They gained life within the communities in which they were used. They were fun and human, rich and fluid, and brought joy to communication by helping express those things that text doesn’t well.</p>
<p>Their strength was their abundance of visual personality and semantic flexibility. They worked through shared experience and communality, gaining more meaning as they were used in a particular community over time.</p>
<p>Emojis are sterile, lifeless slop handed down by our corporate brahmins, devoid of even a drop of humanity. They’re specific in all the places they should be universal and vice versa. They’re aesthetically dull and nailed-down semantically to the point of uselessness. Like the <a href="https://www.youtube.com/watch?v=3tFtR-ZYafo">PMC</a> HR-speak of their creators, they constrain our expression rather than amplifying it.</p>
<p>Emojis are ugly. In a more profound sense than just being unpleasant to look at (which they also are). They say something ugly about us and how we see ourselves. Emoticons were poetry and emojis are a CV, a marketing email, a corporate mission statement. They’re a <a href="https://en.wiktionary.org/wiki/Verschlimmbesserung#German"><em>Verschlimmbesserung</em></a> :Y</p>]]></description>
<content:encoded><![CDATA[<p>The chat program Trillian had the best emoticons. Back during the regency era, my friends and I fell in love with them immediately and took them to other platforms long after we stopped using Trillian. They had a derpy cuteness and abundance of personality without being overly specific. Their meaning was negotiated and contextual. Like the human interaction we humans enjoy.</p>
<p><a href="/images/trillian_emoticons.jpg">/images/trillian_emoticons.jpg</a></p>
<p>There was ‘pipeface’ (7 down, 2nd from right in the image above), summoned with <code>:Y</code>. It’s a picture of a person with a resolute frown smoking a pipe. I have absolutely no idea whatsoever what it was intended to convey and it doesn’t matter - we used it when we knew we were being a bit pompous (perhaps playfully, perhaps not) or to convey finality - a sense of <em>… and I will brook no further argument</em>. “It’s a shit game and I shan’t play it :Y”, “Monet is overrated :Y”, “A meal fit for a king :Y”. There’s no emoji that does that.</p>
<p>Then there were ‘hugleft’ and ‘hugright’, summoned with <code>({)</code> and <code>(})</code> (4 down and 3 &amp; 4 in on the image). We used this when we were feeling sad or vulnerable or just in need of comfort. One would request/offer with <code>({)</code> and others would complete with <code>(})</code>. And there was a sense of completion to it - it was bilateral, like a hug.</p>
<p>And ‘nod’, summoned with <code>(nod)</code> (9 down, 3 in). This one was animated and, because of its unblinking stare and smug, slow nod, it was usually used sarcastically.</p>
<p>There are so many good ones but the last one I’ll touch on is <code>inlove</code>, summoned with <code>%)</code> (9 down, 2 in (left of (nod))). Another animated one where the eyes would kinda drift around resulting in a delirious expression that really captured <em>feeling love</em> in a way that the lazy sterility of 🥰 and 😍 simply do not.</p>
<p>My friends and I continued using the textual form of these emoticons long after we could convince the platforms we were chatting on to use the pictures. I still sometimes end sentences with ‘:Y’.</p>
<p>Emoticons were great. Whichever emoticons were used in a particular community would gain meanings specific to that community. They had personality and a bit of <em>humanity</em> to them, which allowed them to <em>gain</em> meaning through interpretation and use. To be contextual and fluid while, in a particular context, specific. They were aesthetically rich and semantically vague enough to encourage <em>reading in</em> - they were <em>descriptive</em> rather than <em>prescriptive</em>.</p>
<p>And then there’s the bland dead-eyed coporate HR-clipart of emojis…</p>
<h2 id="bland">Bland</h2>
<p>They’re bland for the exact same reasons that clipart is bland - by design. They’re cornflakes - designed to elicit no feelings whatsoever. They’re as devoid of imagination and humanity as the corporate culture that shat them wetly onto our screens. They make Vettriano look like Caravaggio. They were begotten without love. The propaganda of purgatory.</p>
<p>If you want to send someone a hug you’ve got 🤗, which looks like a sex predator coming in for a titty grab or 🫂, two ghouls embracing limply. Corporations don’t understand love or compassion or comradeship. So this is what we get, a hug is either sex predation or two empty mannequins in a flaccid grapple.</p>
<p>Here’s the Trillian hug emoticon for contrast:</p>
<p><img style="width: 80px; height: 32px; image-rendering: pixelated; image-rendering: crisp-edges;" src="/images/hug.gif"></p>
<p>Sure it has the advantage of being animated but, that aside, there’s a warmth and humanity to it. It <em>feels</em> right. Because it was made by a person who had experienced a hug ever, not a consortium of Californian vampires.</p>
<h2 id="theres-too-many-of-them">There’s too many of them</h2>
<p>There are <em>so fucking many of them</em>. According to the <a href="https://unicode.org">unicode website</a> there are either <em>1910</em>, if you look at the <a href="https://unicode.org/emoji/charts/full-emoji-list.html">full emoji list</a> or <em>3790</em> if you look at <a href="https://unicode.org/emoji/charts/emoji-counts.html">emoji counts</a>. Either way, it’s a fucking lot.</p>
<p>To put that into perspective, the constructed language <a href="https://tokipona.org/">Toki Pona</a>, created by <a href="https://www.lang.sg/">Sonja Lang</a> has 120-137 words. It’s a minimalistic language by design but it supports <a href="https://www.reddit.com/r/tokipona/comments/17mghq3/is_toki_pona_actually_usable/">full conversations</a>. With, at most, 1/16th the number of symbols as emoji. Could you have a full conversation in emoji? Could you fuck as like.</p>
<p>The language <a href="https://dedalvs.com/work/the-100/trigedasleng_v5.pdf">Trigedasleng</a>, created by <a href="https://dedalvs.com/">David J. Peterson</a> for the TV show <a href="https://www.youtube.com/watch?v=aDrsItJ_HU4">The 100</a> has about 1700 words and I know for a fact supports full conversations (and fanfics and song translations and so on) because I have friends who do that.</p>
<p>And emojis aren’t even a natural language - they don’t need to be able to express all that can be said - they exist, as did the earliest ASCII smileys, to convey what doesn’t come across easily in text - mood, tone, posture and so on.</p>
<p>Their job is just to <em>augment</em> natural language - to add a bit of warmth or to let the other person know I’m being facetious or feeling sympathetic or irritated or bored or delirious with love.</p>
<p>And somehow we’ve ended up with about 2000 of them. Which is far too many to visually scan through, as you could with emoticons back in the day, so you have to search. Which brings me to…</p>
<h3 id="whats-going-on-with-the-fucking-names">What’s going on with the fucking names?</h3>
<p>I want to send 😐 so I search for “straight mouth” cos, y’know, we humans call that a straight-mouthed expression. I eventually find it under “neutral expression”. Which, first off, it isn’t really, that would be a blank-eyed stare. And, secondly, yeah that’s absolutely how humans talk. Neutral expression. Just set all our transistors to zero and that’s the expression we humans have.</p>
<p>I want to send a nod, so I search for… that. But no, “head shaking vertically”. Y’know, like we all say. “Yeah I agreed with her so I shook my head vertically.” So normal. So human.</p>
<p>I want to send 💦, so I search for water? Nope. Splash? Nope. Drip?! Nope. Oh it’s <em>sweat droplets</em>. Of course. Because we all think in anime.</p>
<p>This isn’t the fault of whatever software I happen to be using to send the message, these names are baked into the standard.</p>
<p>The primary problem is having so many that I <em>need</em> to search rather than picking at a glance. The secondary problem is that these names are a mishmash of, in some cases, trying to describe what’s happening without assuming any social or cultural context - some cultures don’t nod in agreement so let’s call it a “vertical head shake” - and, in other cases, describing them in a very specific cultural context as with “sweat droplets”.</p>
<p>They really don’t know whether they want to be general and standard or specific.</p>
<h2 id="the-general-and-the-specific">The general and the specific</h2>
<p>Emoticons worked best when they tended towards aesthetic richness and semantic looseness. By which I mean they had a ton of personality and were visually fun, such that they invited reading-in and repurposing, and they were not too tied down semantically - I have no idea what pipeface was <em>supposed</em> to mean, we imbued it with meaning ourselves.</p>
<p>This allowed them to… do their job. To add context, emotion and situationality. Not to try to do the job of natural language and convey straightforward meaning.</p>
<p>Emojis go the absolute other way - aesthetically sterile and semantically nailed down.</p>
<p>Trillian had a couple of emoticons for food. So if I wanted to express that I was <em>really</em> looking forward to my food I could say “I’m making cheese on toast (food)(drool)”</p>
<p>It didn’t matter what food it was. Food is a shared human experience, it didn’t need to be specific.</p>
<p>Similarly there was one flag emoticon. It was just a red flag. It could be used to express shared pride or comradeship like “I’m watching India win the cricket with Nish (flag)” or “We’re going on the protest later (flag)” or “Branston Pickle was invented in Staffordshire (flag)”</p>
<p>It didn’t matter <em>what</em> the flag was, it just represented <em>shared experience</em> and communality in a particular context.</p>
<p>Oh but I see emojis have 300-odd flags so we’re all divided up again, lovely. The dream of the internet.</p>
<p>And <em>130</em> food items. 30ish Japanese foods, due to emoji’s heritage, a bunch of fruit and veg and the rest are mostly… foods that <a href="/video/californians.webm">Californian</a> techbros have heard of.</p>
<p>This is the problem with specificity. We have 130 very specific foods but not a single <em>specific</em> food item from Africa or South Asia. And <em>one</em> from West Asia because Californian techbros have had falafel I guess.</p>
<p>And no <a href="https://en.wikipedia.org/wiki/Staffordshire_oatcake">North Staffordshire oatcakes</a>, an absolute fucking travesty (flag)</p>
<p>We’re going to end up with 5000 food emojis and it’ll never have the one you actually want in the moment unless you eat nothing but sushi and texmex. What an improvement over just having a plate of food!</p>
<p>But at least we’ve got the 🔰 emoji. For all the times every day I want to say 🔰 and would have no way to say 🔰 without 🔰 being an emoji 🙅</p>
<h2 id="what">What?</h2>
<p>Emoticons, and textual smileys before them, were made with love, by and for communities. They gained life within the communities in which they were used. They were fun and human, rich and fluid, and brought joy to communication by helping express those things that text doesn’t well.</p>
<p>Their strength was their abundance of visual personality and semantic flexibility. They worked through shared experience and communality, gaining more meaning as they were used in a particular community over time.</p>
<p>Emojis are sterile, lifeless slop handed down by our corporate brahmins, devoid of even a drop of humanity. They’re specific in all the places they should be universal and vice versa. They’re aesthetically dull and nailed-down semantically to the point of uselessness. Like the <a href="https://www.youtube.com/watch?v=3tFtR-ZYafo">PMC</a> HR-speak of their creators, they constrain our expression rather than amplifying it.</p>
<p>Emojis are ugly. In a more profound sense than just being unpleasant to look at (which they also are). They say something ugly about us and how we see ourselves. Emoticons were poetry and emojis are a CV, a marketing email, a corporate mission statement. They’re a <a href="https://en.wiktionary.org/wiki/Verschlimmbesserung#German"><em>Verschlimmbesserung</em></a> :Y</p>]]></content:encoded>
</item>


<item>
<title>Xterm is good</title>
<link>https://friendo.monster/posts/xterm-is-good.html</link>
<guid>https://friendo.monster/posts/xterm-is-good.html</guid>
<pubDate>Wed, 13 Aug 2025 00:00:00 +0100</pubDate>
<description><![CDATA[<p>Much like <a href="https://www.qmul.ac.uk/mei/media/mei/tgc-media/blog-post-images/John-Major-1993.png">John Major</a>, I’m going <em>Back to Basics</em>. I use <a href="https://friendo.monster/posts/underappreciated-top">top</a> instead of htop or whatever, I’ve returned to vim from neovim, I even tried going back to bash instead of zshell but that was a foolish mistake - all of youse bash users should really give zshell a go, it’s just better.</p>
<p>Anyway, prompted by your friend and mine, <a href="https://chriswere.wales/">Chris Were</a>, I’ve been giving xterm a go. And it’s good! I’m sticking with it!</p>
<p>There’s a simple pleasure in returning to the old standards that’ve been around since humankind first emerged from their caves and needed to emulate terminals. It’s like unearthing your grandmother’s old recipe book and finding that she really knew her shit, but there’s also recipes like <a href="https://vintagerecipecards.com/wp-content/uploads/2011/06/ham_and_bananas_hollandaise.jpg">Ham and Bananas Hollandaise</a> so you just ignore those and blame the vallium addiction.</p>
<p>For me, the sticking point with xterm before was the lack of emojis. Not that that is an <em>essential thing</em> in a terminal emulator, but I use mutt for email and when my sisters send me emojis it’s nice to see them.</p>
<p>But it does emojis now! And even sixel (kinda)!</p>
<h2 id="sixel-kinda">Sixel (kinda)!</h2>
<p>One shocking realisation when using the terminal emulator xterm is that it emulates terminals. As in it emulates actual specific physical terminals that actually existed.</p>
<p>The default terminal it emulates is the <a href="https://en.wikipedia.org/wiki/VT420">VT420</a>, which did not have sixel support. To get that, you need to drop down to an older terminal - the <a href="https://en.wikipedia.org/wiki/VT320">VT340</a> - which <em>did</em> have sixel support. You do this by launching xterm with <code>xterm -ti 340</code> or setting <code>XTerm*decTerminalID: 340</code> in <code>~/.Xresources</code>.</p>
<p><a href="/images/obligatory_fetch.png">/images/obligatory_fetch.png</a></p>
<p>A quick overview of xterm’s pros and cons:</p>
<p><strong>Pros:</strong></p>
<ul>
<li>It starts with ‘<a href="https://www.malcolm-x.org/media/pic/mg48.jpg">X</a>’, the coolest letter</li>
<li>It’s from 1984, the year we <a href="https://www.youtube.com/watch?v=RH-xd5bPKTA">solved hunger</a></li>
<li>It’s not <a href="https://www.versluis.com/wp-content/uploads/2020/01/IMG_6070-610x458.jpg">GPU</a> accelerated</li>
<li>It doesn’t support Wayland</li>
<li>It starts really fast - perceptually as fast as st, to me</li>
<li>It’s the de facto standard terminal emulator. It works with everything. And you’ll never have to fuck around with terminfo files ever again</li>
<li>It has a <a href="https://invisible-island.net/xterm/images/icons-xterm-color_281.png">cool logo</a></li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>It also has an <a href="https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Icon_of_XTerm_%28from_2012%29.svg/250px-Icon_of_XTerm_%28from_2012%29.svg.png">uncool logo</a></li>
</ul>
<h2 id="shut-your-fat-fucking-mouth-and-tell-me-how-to-configure-it-all-nice-like">Shut your fat fucking mouth and tell me how to configure it all nice like</h2>
<p>Okayyy, fine. Gee willikers.</p>
<p>Xterm, like many old X things (and some newer ones), is configured through X Resources. You edit <code>~/.Xresources</code>, then run <code>xrdb -merge ~/.Xresources</code> and the settings will take effect next time you pop an xterm open.</p>
<p>First let’s define our colours, that happens like this:</p>
<pre><code>! special
*.foreground: #f0ebe3
*.background: #040404
*.cursorColor: #f0ebe3

! black
*.color0: #080809
*.color8: #535353
! red
*.color1: #ff0064
*.color9: #ff0064
(etc.)</code></pre>
<p>Obviously you do all the other colours too, I’m just saving space.</p>
<p>I could be more specific and set <code>XTerm*colour1: ...</code> but then it would only be picked up by xterm. The way I’ve done it, it’ll be read by any terminal emulator which uses X Resources.</p>
<p>Then the font face and size</p>
<pre><code>! xterm
XTerm*fastScroll: true
XTerm*faceName: IBM Plex Mono
XTerm*faceSize: 11</code></pre>
<p>That’s self explanatory. The <code>fastScroll</code> setting sacrifices a bit of accuracy for throughput - a compromise most modern terminal emulators make - I recommend setting it.</p>
<p>Rather than allowing the free resizing of fonts, xterm has some predefined font sizes which you can choose between. You can set those like this:</p>
<pre><code>! VT Font Menu: Unreadable
XTerm*faceSize1: 8
! VT font menu: Tiny
XTerm*faceSize2: 10
! VT font menu: Medium
XTerm*faceSize3: 14
! VT font menu: Large
XTerm*faceSize4: 16
! VT font menu: Huge
XTerm*faceSize5: 22</code></pre>
<p>Now let’s turn off the blinking cursor (adjust to taste of course) and a coupla other convenience oozits.</p>
<pre><code>XTerm*utf8: true
XTerm*cursorBlink: false
XTerm*scrollKey:true
XTerm*saveLines: 9000</code></pre>
<p>I’m not entirely convinced <code>utf8</code> does anything on my system but I leave it there for good luck. <code>scrollKey: true</code> makes the terminal scroll return to the bottom when you’re scrolled up and you hit a key. <code>saveLines:</code> is how many lines of history you can scroll back through.</p>
<pre><code>XTerm*backarrowKey: false
XTerm*ttyModes: erase ^?</code></pre>
<p>The above fixes the backspace key in certain programs. If you find your backspace key misbehaving, stick that in.</p>
<pre><code>XTerm*scrollTtyOutput: false</code></pre>
<p>That prevents the terminal from scrolling back down when you’re scrolled up and there’s new output.</p>
<pre><code>XTerm*borderWidth: 0
XTerm*internalBorder: 33</code></pre>
<p><code>borderWidth</code> is an <em>exterior</em> border on the xterm window (and the menu windows - more on that later). <code>internalBorder</code> is … an internal border, between the window edge and the contents.</p>
<pre><code>XTerm*termName: xterm-256color</code></pre>
<p>Set that so that programs know which terminal they’re dealing with.</p>
<pre><code>XTerm*selectToClipboard: false
XTerm*alternateScroll: true</code></pre>
<p><code>selectToClipboard: false</code> tells xterm to use the clipboard rather than the primary selection and <code>alternateScroll</code> allows mouse-scrolling in alternate windows (such as less).</p>
<p>And here’s how to do a few key bindings:</p>
<pre><code>XTerm*vt100.translations: #override \
    Shift Ctrl &lt;Key&gt; C: copy-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; V: insert-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; R: set-reverse-video(toggle) 
\
    Ctrl &lt;Key&gt; plus:larger-vt-font() 
\
    Ctrl &lt;Key&gt; minus:smaller-vt-font() 
\
    Ctrl &lt;Key&gt; 0:set-vt-font(d)</code></pre>
<p>With those applied, ctrl-shift-c and v will copy and paste text. ctrl-shift-r will toggle the foreground and background colours (fun!).</p>
<p>ctrl and +/- will increment/decrement through the font sizes and ctrl-0 will reset the font size to default.</p>
<h2 id="but-what-about-that-menu-thing-you-said-something-about-or-whatever">But what about that menu thing you said something about or whatever</h2>
<p>If you press ctrl and one of the three main mouse buttons, you’ll notice that xterm has weird menus! Where you can do insane stuff like save what you see in your terminal as HTML or SVG. Mental.</p>
<p>But those menus probably look like arse. That’s because they’re drawn with something called Athena, which does things in the old fashioned X way that they used in the Edwardian times: <a href="https://wiki.archlinux.org/title/X_Logical_Font_Description">XFLD</a>.</p>
<p>On a modern system (at least on mine) this stuff isn’t really used any more. There’s one built-in, fallback font specified in that way just so that such things can work at all. But it’s not ideal. If that’s the case for you, too, you’ll need to generate some definitions.</p>
<p>You’ll need <code>mkfontscale</code>, <code>mkfontdir</code> and <code>xfontsel</code>. On Arch that means installing <code>xorg-mkfontscale</code> (which includes both <code>mkfontscale</code> and <code>mkfontdir</code>) and <code>xorg-xfontsel</code>.</p>
<p>Locate the directory that contains the font you want to use. Or do as I did and just do it for all system installed fonts.</p>
<p>If you’re doing it in one directory, just go to the directory containing the fonts and run:</p>
<pre><code>mkfontscale
mkfontdir
xset fp rehash</code></pre>
<p>If, like me, you’re doing it in a directory with subdirectories which contain the actual fonts, in my case <code>/usr/share/fonts/</code>, then cd to that directory, then (probably as root depending on location), run:</p>
<pre><code>for dir in * ; do if [  -d  &quot;$dir&quot;  ]; then cd &quot;$dir&quot;;xset +fp &quot;$PWD&quot; ;mkfontscale; mkfontdir;cd .. ;fi; done &amp;&amp; xset fp rehash</code></pre>
<p>Either way you do it, that will generate the necessary descriptions.</p>
<p>Now you can run <code>xfontsel</code> to choose the font.</p>
<p><a href="/images/xfontsel.png">/images/xfontsel.png</a></p>
<p>Click on <code>-fndry</code> and <code>-fmly</code> to narrow it down to the typeface you want, then choose the variant with <code>-wght</code> and <code>slant</code>. Then choose a <code>-pxlsz</code> if you’re using a bitmap font or a <code>-ptSz</code> if you’re using a vector font (TTF or OTF).</p>
<p>You can then click on the <code>select</code> button, which will put the font definition string on your primary selection. You can middle click to paste it somewhere.</p>
<p><a href="/images/xfontsel_done.png">/images/xfontsel_done.png</a></p>
<p>You can then add these lines to <code>~/.Xresources</code> to configure the menus:</p>
<pre><code>XTerm*SimpleMenu*font: -*-ibm plex mono-medium-r-normal-*-*-100-*-*-*-*-*-*
XTerm*SimpleMenu*background: #333333</code></pre>
<p>Lastly, set the emulation to VT340 if you want sixel support. If you notice any jank, just delete this and go back to the defaul.</p>
<pre><code>XTerm*decTerminalID: 340</code></pre>
<p>(I changed the font size from 120 to 100).</p>
<p>And that’s it. Here’s everything together (excluding colours):</p>
<pre><code>! xterm
XTerm*decTerminalID: 340
XTerm*fastScroll: true
XTerm*faceName: IBM Plex Mono
XTerm*faceSize: 11
XTerm*SimpleMenu*font: -*-ibm plex mono-medium-r-normal-*-*-100-*-*-*-*-*-*
XTerm*SimpleMenu*background: #333333
! VT Font Menu: Unreadable
XTerm*faceSize1: 8
! VT font menu: Tiny
XTerm*faceSize2: 10
! VT font menu: Medium
XTerm*faceSize3: 14
! VT font menu: Large
XTerm*faceSize4: 16
! VT font menu: Huge
XTerm*faceSize5: 22
XTerm*utf8: true
XTerm*cursorBlink: false
XTerm*scrollKey:true
XTerm*saveLines: 9000
XTerm*backarrowKey: false
XTerm*ttyModes: erase ^?
XTerm*scrollTtyOutput: false
XTerm*borderWidth: 0
XTerm*internalBorder: 33
XTerm*termName: xterm-256color
XTerm*selectToClipboard: false
XTerm*alternateScroll: true
XTerm*vt100.translations: #override \
    Shift Ctrl &lt;Key&gt; C: copy-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; V: insert-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; R: set-reverse-video(toggle) 
\
    Ctrl &lt;Key&gt; plus:larger-vt-font() 
\
    Ctrl &lt;Key&gt; minus:smaller-vt-font() 
\
    Ctrl &lt;Key&gt; 0:set-vt-font(d)</code></pre>
<p>And you can find my full <code>~/.Xresources</code> file <a href="https://gitlab.com/uoou/dotfiles/-/blob/master/stow/xresources/home/drew/.Xresources?ref_type=heads">here</a> if you’re a dirty snoop.</p>]]></description>
<content:encoded><![CDATA[<p>Much like <a href="https://www.qmul.ac.uk/mei/media/mei/tgc-media/blog-post-images/John-Major-1993.png">John Major</a>, I’m going <em>Back to Basics</em>. I use <a href="https://friendo.monster/posts/underappreciated-top">top</a> instead of htop or whatever, I’ve returned to vim from neovim, I even tried going back to bash instead of zshell but that was a foolish mistake - all of youse bash users should really give zshell a go, it’s just better.</p>
<p>Anyway, prompted by your friend and mine, <a href="https://chriswere.wales/">Chris Were</a>, I’ve been giving xterm a go. And it’s good! I’m sticking with it!</p>
<p>There’s a simple pleasure in returning to the old standards that’ve been around since humankind first emerged from their caves and needed to emulate terminals. It’s like unearthing your grandmother’s old recipe book and finding that she really knew her shit, but there’s also recipes like <a href="https://vintagerecipecards.com/wp-content/uploads/2011/06/ham_and_bananas_hollandaise.jpg">Ham and Bananas Hollandaise</a> so you just ignore those and blame the vallium addiction.</p>
<p>For me, the sticking point with xterm before was the lack of emojis. Not that that is an <em>essential thing</em> in a terminal emulator, but I use mutt for email and when my sisters send me emojis it’s nice to see them.</p>
<p>But it does emojis now! And even sixel (kinda)!</p>
<h2 id="sixel-kinda">Sixel (kinda)!</h2>
<p>One shocking realisation when using the terminal emulator xterm is that it emulates terminals. As in it emulates actual specific physical terminals that actually existed.</p>
<p>The default terminal it emulates is the <a href="https://en.wikipedia.org/wiki/VT420">VT420</a>, which did not have sixel support. To get that, you need to drop down to an older terminal - the <a href="https://en.wikipedia.org/wiki/VT320">VT340</a> - which <em>did</em> have sixel support. You do this by launching xterm with <code>xterm -ti 340</code> or setting <code>XTerm*decTerminalID: 340</code> in <code>~/.Xresources</code>.</p>
<p><a href="/images/obligatory_fetch.png">/images/obligatory_fetch.png</a></p>
<p>A quick overview of xterm’s pros and cons:</p>
<p><strong>Pros:</strong></p>
<ul>
<li>It starts with ‘<a href="https://www.malcolm-x.org/media/pic/mg48.jpg">X</a>’, the coolest letter</li>
<li>It’s from 1984, the year we <a href="https://www.youtube.com/watch?v=RH-xd5bPKTA">solved hunger</a></li>
<li>It’s not <a href="https://www.versluis.com/wp-content/uploads/2020/01/IMG_6070-610x458.jpg">GPU</a> accelerated</li>
<li>It doesn’t support Wayland</li>
<li>It starts really fast - perceptually as fast as st, to me</li>
<li>It’s the de facto standard terminal emulator. It works with everything. And you’ll never have to fuck around with terminfo files ever again</li>
<li>It has a <a href="https://invisible-island.net/xterm/images/icons-xterm-color_281.png">cool logo</a></li>
</ul>
<p><strong>Cons:</strong></p>
<ul>
<li>It also has an <a href="https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Icon_of_XTerm_%28from_2012%29.svg/250px-Icon_of_XTerm_%28from_2012%29.svg.png">uncool logo</a></li>
</ul>
<h2 id="shut-your-fat-fucking-mouth-and-tell-me-how-to-configure-it-all-nice-like">Shut your fat fucking mouth and tell me how to configure it all nice like</h2>
<p>Okayyy, fine. Gee willikers.</p>
<p>Xterm, like many old X things (and some newer ones), is configured through X Resources. You edit <code>~/.Xresources</code>, then run <code>xrdb -merge ~/.Xresources</code> and the settings will take effect next time you pop an xterm open.</p>
<p>First let’s define our colours, that happens like this:</p>
<pre><code>! special
*.foreground: #f0ebe3
*.background: #040404
*.cursorColor: #f0ebe3

! black
*.color0: #080809
*.color8: #535353
! red
*.color1: #ff0064
*.color9: #ff0064
(etc.)</code></pre>
<p>Obviously you do all the other colours too, I’m just saving space.</p>
<p>I could be more specific and set <code>XTerm*colour1: ...</code> but then it would only be picked up by xterm. The way I’ve done it, it’ll be read by any terminal emulator which uses X Resources.</p>
<p>Then the font face and size</p>
<pre><code>! xterm
XTerm*fastScroll: true
XTerm*faceName: IBM Plex Mono
XTerm*faceSize: 11</code></pre>
<p>That’s self explanatory. The <code>fastScroll</code> setting sacrifices a bit of accuracy for throughput - a compromise most modern terminal emulators make - I recommend setting it.</p>
<p>Rather than allowing the free resizing of fonts, xterm has some predefined font sizes which you can choose between. You can set those like this:</p>
<pre><code>! VT Font Menu: Unreadable
XTerm*faceSize1: 8
! VT font menu: Tiny
XTerm*faceSize2: 10
! VT font menu: Medium
XTerm*faceSize3: 14
! VT font menu: Large
XTerm*faceSize4: 16
! VT font menu: Huge
XTerm*faceSize5: 22</code></pre>
<p>Now let’s turn off the blinking cursor (adjust to taste of course) and a coupla other convenience oozits.</p>
<pre><code>XTerm*utf8: true
XTerm*cursorBlink: false
XTerm*scrollKey:true
XTerm*saveLines: 9000</code></pre>
<p>I’m not entirely convinced <code>utf8</code> does anything on my system but I leave it there for good luck. <code>scrollKey: true</code> makes the terminal scroll return to the bottom when you’re scrolled up and you hit a key. <code>saveLines:</code> is how many lines of history you can scroll back through.</p>
<pre><code>XTerm*backarrowKey: false
XTerm*ttyModes: erase ^?</code></pre>
<p>The above fixes the backspace key in certain programs. If you find your backspace key misbehaving, stick that in.</p>
<pre><code>XTerm*scrollTtyOutput: false</code></pre>
<p>That prevents the terminal from scrolling back down when you’re scrolled up and there’s new output.</p>
<pre><code>XTerm*borderWidth: 0
XTerm*internalBorder: 33</code></pre>
<p><code>borderWidth</code> is an <em>exterior</em> border on the xterm window (and the menu windows - more on that later). <code>internalBorder</code> is … an internal border, between the window edge and the contents.</p>
<pre><code>XTerm*termName: xterm-256color</code></pre>
<p>Set that so that programs know which terminal they’re dealing with.</p>
<pre><code>XTerm*selectToClipboard: false
XTerm*alternateScroll: true</code></pre>
<p><code>selectToClipboard: false</code> tells xterm to use the clipboard rather than the primary selection and <code>alternateScroll</code> allows mouse-scrolling in alternate windows (such as less).</p>
<p>And here’s how to do a few key bindings:</p>
<pre><code>XTerm*vt100.translations: #override \
    Shift Ctrl &lt;Key&gt; C: copy-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; V: insert-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; R: set-reverse-video(toggle) 
\
    Ctrl &lt;Key&gt; plus:larger-vt-font() 
\
    Ctrl &lt;Key&gt; minus:smaller-vt-font() 
\
    Ctrl &lt;Key&gt; 0:set-vt-font(d)</code></pre>
<p>With those applied, ctrl-shift-c and v will copy and paste text. ctrl-shift-r will toggle the foreground and background colours (fun!).</p>
<p>ctrl and +/- will increment/decrement through the font sizes and ctrl-0 will reset the font size to default.</p>
<h2 id="but-what-about-that-menu-thing-you-said-something-about-or-whatever">But what about that menu thing you said something about or whatever</h2>
<p>If you press ctrl and one of the three main mouse buttons, you’ll notice that xterm has weird menus! Where you can do insane stuff like save what you see in your terminal as HTML or SVG. Mental.</p>
<p>But those menus probably look like arse. That’s because they’re drawn with something called Athena, which does things in the old fashioned X way that they used in the Edwardian times: <a href="https://wiki.archlinux.org/title/X_Logical_Font_Description">XFLD</a>.</p>
<p>On a modern system (at least on mine) this stuff isn’t really used any more. There’s one built-in, fallback font specified in that way just so that such things can work at all. But it’s not ideal. If that’s the case for you, too, you’ll need to generate some definitions.</p>
<p>You’ll need <code>mkfontscale</code>, <code>mkfontdir</code> and <code>xfontsel</code>. On Arch that means installing <code>xorg-mkfontscale</code> (which includes both <code>mkfontscale</code> and <code>mkfontdir</code>) and <code>xorg-xfontsel</code>.</p>
<p>Locate the directory that contains the font you want to use. Or do as I did and just do it for all system installed fonts.</p>
<p>If you’re doing it in one directory, just go to the directory containing the fonts and run:</p>
<pre><code>mkfontscale
mkfontdir
xset fp rehash</code></pre>
<p>If, like me, you’re doing it in a directory with subdirectories which contain the actual fonts, in my case <code>/usr/share/fonts/</code>, then cd to that directory, then (probably as root depending on location), run:</p>
<pre><code>for dir in * ; do if [  -d  &quot;$dir&quot;  ]; then cd &quot;$dir&quot;;xset +fp &quot;$PWD&quot; ;mkfontscale; mkfontdir;cd .. ;fi; done &amp;&amp; xset fp rehash</code></pre>
<p>Either way you do it, that will generate the necessary descriptions.</p>
<p>Now you can run <code>xfontsel</code> to choose the font.</p>
<p><a href="/images/xfontsel.png">/images/xfontsel.png</a></p>
<p>Click on <code>-fndry</code> and <code>-fmly</code> to narrow it down to the typeface you want, then choose the variant with <code>-wght</code> and <code>slant</code>. Then choose a <code>-pxlsz</code> if you’re using a bitmap font or a <code>-ptSz</code> if you’re using a vector font (TTF or OTF).</p>
<p>You can then click on the <code>select</code> button, which will put the font definition string on your primary selection. You can middle click to paste it somewhere.</p>
<p><a href="/images/xfontsel_done.png">/images/xfontsel_done.png</a></p>
<p>You can then add these lines to <code>~/.Xresources</code> to configure the menus:</p>
<pre><code>XTerm*SimpleMenu*font: -*-ibm plex mono-medium-r-normal-*-*-100-*-*-*-*-*-*
XTerm*SimpleMenu*background: #333333</code></pre>
<p>Lastly, set the emulation to VT340 if you want sixel support. If you notice any jank, just delete this and go back to the defaul.</p>
<pre><code>XTerm*decTerminalID: 340</code></pre>
<p>(I changed the font size from 120 to 100).</p>
<p>And that’s it. Here’s everything together (excluding colours):</p>
<pre><code>! xterm
XTerm*decTerminalID: 340
XTerm*fastScroll: true
XTerm*faceName: IBM Plex Mono
XTerm*faceSize: 11
XTerm*SimpleMenu*font: -*-ibm plex mono-medium-r-normal-*-*-100-*-*-*-*-*-*
XTerm*SimpleMenu*background: #333333
! VT Font Menu: Unreadable
XTerm*faceSize1: 8
! VT font menu: Tiny
XTerm*faceSize2: 10
! VT font menu: Medium
XTerm*faceSize3: 14
! VT font menu: Large
XTerm*faceSize4: 16
! VT font menu: Huge
XTerm*faceSize5: 22
XTerm*utf8: true
XTerm*cursorBlink: false
XTerm*scrollKey:true
XTerm*saveLines: 9000
XTerm*backarrowKey: false
XTerm*ttyModes: erase ^?
XTerm*scrollTtyOutput: false
XTerm*borderWidth: 0
XTerm*internalBorder: 33
XTerm*termName: xterm-256color
XTerm*selectToClipboard: false
XTerm*alternateScroll: true
XTerm*vt100.translations: #override \
    Shift Ctrl &lt;Key&gt; C: copy-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; V: insert-selection(CLIPBOARD) 
\
    Shift Ctrl &lt;Key&gt; R: set-reverse-video(toggle) 
\
    Ctrl &lt;Key&gt; plus:larger-vt-font() 
\
    Ctrl &lt;Key&gt; minus:smaller-vt-font() 
\
    Ctrl &lt;Key&gt; 0:set-vt-font(d)</code></pre>
<p>And you can find my full <code>~/.Xresources</code> file <a href="https://gitlab.com/uoou/dotfiles/-/blob/master/stow/xresources/home/drew/.Xresources?ref_type=heads">here</a> if you’re a dirty snoop.</p>]]></content:encoded>
</item>


<item>
<title>The web doesn't exist</title>
<link>https://friendo.monster/posts/the-web-doesnt-exist.html</link>
<guid>https://friendo.monster/posts/the-web-doesnt-exist.html</guid>
<pubDate>Wed, 30 Oct 2024 00:00:00 +0000</pubDate>
<description><![CDATA[<p>It’s not just, as I’ve long thought, that the web has gone to shit. It’s that the web, <em>as I think of it</em>, no longer exists.</p>
<p>When I think of the web, I think of a network of weird and interesting sites made by weird and interesting human beings. This is not what the web is now - it’s a handful of silos that <a href="https://en.wikipedia.org/wiki/The_Hoover_Company">hoover</a> up, brand and monetise everything else.</p>
<p><a href="https://smolweb.org/">Small sites</a> still exist, of course. But they’re drowned out by the cacophony of capitalist slop. The <a href="https://smolweb.org/">small web</a> movement is cool, and there are some lovely small websites, but it increasingly feels like trying to hold a book club in a busy shopping centre.</p>
<p>So I’ll use the ‘web apps’, to the extent that I do, but I’ll find the humans I used to look for on the web over on <a href="gemini://friendo.monster/">Gemini</a> and <a href="gopher://friendo.monster/">Gopher</a>. I’d love to bump into you over there!</p>]]></description>
<content:encoded><![CDATA[<p>It’s not just, as I’ve long thought, that the web has gone to shit. It’s that the web, <em>as I think of it</em>, no longer exists.</p>
<p>When I think of the web, I think of a network of weird and interesting sites made by weird and interesting human beings. This is not what the web is now - it’s a handful of silos that <a href="https://en.wikipedia.org/wiki/The_Hoover_Company">hoover</a> up, brand and monetise everything else.</p>
<p><a href="https://smolweb.org/">Small sites</a> still exist, of course. But they’re drowned out by the cacophony of capitalist slop. The <a href="https://smolweb.org/">small web</a> movement is cool, and there are some lovely small websites, but it increasingly feels like trying to hold a book club in a busy shopping centre.</p>
<p>So I’ll use the ‘web apps’, to the extent that I do, but I’ll find the humans I used to look for on the web over on <a href="gemini://friendo.monster/">Gemini</a> and <a href="gopher://friendo.monster/">Gopher</a>. I’d love to bump into you over there!</p>]]></content:encoded>
</item>


<item>
<title>Flatpaks and stuff</title>
<link>https://friendo.monster/posts/flatpaks-and-stuff.html</link>
<guid>https://friendo.monster/posts/flatpaks-and-stuff.html</guid>
<pubDate>Fri, 01 Sep 2023 00:00:00 +0100</pubDate>
<description><![CDATA[<p>This is gonna be notes for myself as much as anything else. I often forget what static linking <em>is</em> exactly and have to look it up. Otherwise this is just my working through my thoughts towards containerised applications and immutability and stuff. Expect rambles. I’m not a coder, there may be errors/simplifications.</p>
<h2 id="dynamic-linking">Dynamic linking</h2>
<p>This is the ‘norm’ on Linux. This is where (ideally) there’s one copy of <code>ffmpeg</code> installed and any program that wants to make use of <code>ffmpeg</code> (i.e. anything that wants to play or encode video and audio) uses that same version.</p>
<p>The big upside of this way of doing things is that it’s efficient. One copy of each library - what’s the point of having shared libraries if they’re not shared?</p>
<p>The (considerable) downside is that managing this - keeping track of the web of dependencies - is <em>very</em> complex, and each distro must do this itself. That’s a lot of duplicated effort. Dynamic linking necessitates complex, and sometimes fragile, package management systems.</p>
<p>A graph of dependencies on my fairly sparse (~650 packages) system, generated with <code>pacgraph</code>:</p>
<p><a href="/images/pacgraph.jpg">/images/pacgraph.jpg</a></p>
<p>An upside of <em>having</em> that complex package management system, though, is that we can update everything on our system all in one go, and that process is (ideally) very efficient since nothing is duplicated.</p>
<p><strong><em>But…</em></strong></p>
<p>What happens if two programs need different versions of <code>ffmpeg</code>?</p>
<p>Well, there are two basic approaches to this: accommodate that or don’t.</p>
<p>Arch, for example, takes the general approach of having only one version (the latest) of each library. If the latest version of <code>mpv</code> doesn’t work with the latest version of <code>ffmpeg</code> then this is a bug, and must be fixed.</p>
<p>The advantage of Arch’s approach is simplicity from a packaging point of view. Drawbacks include the inability to, within this system, use old software, and a lack of stability (meaning “things keep changing” not “things keep crashing”).</p>
<p>Debian takes the other approach - allowing different versions of libraries to be concurrently installed. This allows for the use of old software, atomic upgrades (i.e. updating/installing one application without updating the whole system) and allows for stability. But it compounds the complexity of package management.</p>
<p>From the point of view of a user, dynamic linking is kinda ideal. It makes the most efficient use of storage, memory and bandwidth and allows for the easy installation and maintenance of all software from the OS itself through to applications.</p>
<p>For the developer and maintainer, though, it’s potentially a nightmare. It means that a package has to be created for every piece of software on every distro. Not so bad for established software - the process will often be largely automated and will be the responsibility of each distro’s maintainer for that package. But for a developer making new or niche software which is not yet in repos, it’s quite a burden. To distribute their software for Linux they’d have to create and maintain a package for every distro (or at least a big few) - a process with which they’re likely to be entirely unfamiliar and which will differ from distro to distro. They’ll also be distributing that package outside of the package manager’s repos (PPAs and Arch’s AUR aside), which is far from ideal.</p>
<p><strong>Summary</strong></p>
<ul>
<li>+ Great for users (so long as everything’s in the repos)</li>
<li>+ Efficient use of system resources</li>
<li>- Requires complex package management infrastructure</li>
<li>- Unfun for developers</li>
</ul>
<h2 id="bundling">Bundling</h2>
<p>This is where you bundle the needed libraries with the software. The libraries don’t get installed on the system, they just sit there in the application’s directory. Which <em>seems</em> like a good idea until you realise that, unless you include everything up-to-but-not-including the kernel, those libraries are still making use of system libraries. And at some point, that’ll stop working (as system libraries get updated).</p>
<p>On Linux I’ve only ever seen this approach with proprietary software. It’s how GOG games used to be distributed, for example. I usually take it as a signal that the distributors of the software have no intention whatsoever of maintaining the thing, which held true for GOG.</p>
<p>Appimages are sort of containerised bundles. They’re convenient, in that you can just download a single file and run it without having to worry about dependencies and so on, but they’re maximally inefficient, fiddly to maintain, and don’t confer any of the broader benefits of ‘proper’ containerisation.</p>
<p>I do use a couple of Appimages - one is Libreoffice, which is a piece of software I resent having to have installed for the rare times someone sends me a .docx or .xlsx and expects me to see it how they’re seeing it. I don’t care if Libreoffice is up-to-date, I don’t want its dependencies cluttering up my package management and I don’t enjoy or like it as software. I want to forget it’s there as far as I possibly can and Appimages suit that.</p>
<p>But really, bundling is the worst of all worlds.</p>
<p><strong>Summary</strong></p>
<ul>
<li>+ Easy for developers</li>
<li>+ Convenient…</li>
<li>- … until they stop working</li>
<li>- Bad in every other way</li>
</ul>
<h2 id="static-linking">Static linking</h2>
<p>This is some special magic whereby the bits of a library that a program uses are included in the program at compile-time. If the program makes use of <code>ffmpeg</code> then the bits of <code>ffmpeg</code> that are used are pulled out and included with the application (in an object file, I believe), meaning that a system running the software doesn’t even need to have <code>ffmpeg</code> installed.</p>
<p>(<code>ffmpeg</code> is probably a terrible example in this case but this is just illustrative)</p>
<p>This approach involves some redundancy - you may have tweaked your system-wide <code>ffmpeg</code> and <em>want</em> to use that - but simplifies packaging and reduces dependencies, making life easier for developers.</p>
<p>This is like the cleverer version of bundling. It shares, but reduces the impact of, bundling’s drawbacks while retaining its advantages.</p>
<p><strong>Summary</strong></p>
<ul>
<li>= A balance between efficiency and ease of development</li>
<li>- Less efficient and flexible than dynamic linking for users</li>
<li>+ Less complex in terms of package management</li>
</ul>
<h2 id="flatpaks-containerisation">Flatpaks (containerisation)</h2>
<p>Remember where, under ‘Bundling’, I said:</p>
<blockquote>
<p>unless you include everything up-to-but-not-including the kernel</p>
</blockquote>
<p>Well, this is kinda that.</p>
<p>A container, in this context, is like another copy of a Linux operating system running on your current OS’s kernel. This may sound like a virtual machine, but it’s not really. A virtual machine <em>emulates a CPU</em> and then runs an entire Linux OS on that emulated CPU. A container is just a bunch of software that <em>believes</em> it’s a Linux OS, running on your current kernel and hardware. VMs involve much more overhead than containers.</p>
<p>Here’s a hopefully illustrative example. I’m using <a href="https://github.com/89luca89/distrobox">distrobox</a> to run <a href="https://www.debian.org/">Debian</a> in a container:</p>
<p><a href="/images/distrobox.jpg">/images/distrobox.jpg</a></p>
<p>As you can see from the output, they (optionally) share the host’s home directory but otherwise Debian’s filesystem is its own - it is fully Debian. Both distros see the same hardware and kernel but they are otherwise separate.</p>
<p>That’s roughly how Flatpaks work. Flatpak applications run within a containerised copy of Linux, running on your ‘host’ OS’s kernel and sharing its hardware. This obviously involves a significant amount of duplication but, within Flatpak itself, duplication is minimised through the use of shared ‘runtimes’ which applications make use of.</p>
<p>This approach is, effectively, a universal package system for all Linux distros, which is great for developers.</p>
<p>It also provides some ‘sandboxing’ - separation between applications and the base system - you can restrict which parts of the filesystem and what devices a containerised application has access to.</p>
<p><strong>Summary</strong></p>
<ul>
<li>- Inefficient compared to dynamic linking…</li>
<li>+ … but duplication ideally happens only once</li>
<li>+ A single package manager for all distros is good for developers</li>
</ul>
<h2 id="going-further-immutability">Going further (immutability)</h2>
<p>So if you take that idea of isolating applications from the base system to its natural conclusion you could <em>completely</em> isolate the base system from applications. Make the base system essentially ‘read-only’ - applications cannot alter it in any way.</p>
<p>This is immutability, and there are a few ways to get there. One way is to make all applications containers, this is the path Ubuntu is going down with its Snaps. This would work with Flatpaks, too.</p>
<p>NixOS takes a different approach. On NixOS, every package is installed to its own directory which means that multiple versions of dependencies can exist at the same time. A program will use the <em>exact</em> dependencies it is built against. This isn’t containerisation as such but shares some of the benefits, while also retaining the benefits of dynamic linking.</p>
<p>Everything in NixOS - which packages are installed and also runtime configurations - is (or at least can be) configured in one place. The system can easily be ‘rolled back’ to a previous state and that configuration can easily be copied to another machine to produce the exact same setup.</p>
<p>Immutability is an attractive idea - you can have a very stable base system and run whatever bleeding edge applications you like without ever risking the integrity of that base system.</p>
<p><strong>Summary (of immutability in general)</strong></p>
<ul>
<li>+ Stable base system and applications as cutting edge as you like</li>
<li>+ Depending on the method used can facilitate <a href="https://en.wikipedia.org/wiki/Reproducible_builds">reproducibility</a></li>
<li>- Likely to involve some redundancy, depending on method</li>
<li>+ Probably the future</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>I used to be very dubious of containerised applications. The <em>efficiency</em> of dynamic linking seems so intrinsically <em>linuxy</em> and, while package management was a hard problem to solve, it seems to work great now from a user’s perspective.</p>
<p>Flatpaks seemed to be a move to appease developers of proprietary software which is something I have no interest in at all.</p>
<p>But then I realised I could install Krita without pulling in half of KDE. And install Steam and play games without having 32bit libraries - which were <em>only used by Steam and games</em> - installed in my base system. All that stuff is still there, of course, but it’s tucked away where I don’t have to look at it, and it doesn’t get updated every time I update my base system.</p>
<p>Valve have gone with an immutable base on the Steam Deck for good reason, immutability is very appealing. The advantages of running Debian stable <em>plus</em> the advantages of, say, Arch, with some additional advantages on top. Of course, if immutability is implemented through containers then it carries with it the disadvantages of containers in general, and if it’s implemented in the NixOSy way then you still have complex package management. But the upsides seem well worth it to me and I expect distros with an immutable base to become the norm over the next decade or so.</p>]]></description>
<content:encoded><![CDATA[<p>This is gonna be notes for myself as much as anything else. I often forget what static linking <em>is</em> exactly and have to look it up. Otherwise this is just my working through my thoughts towards containerised applications and immutability and stuff. Expect rambles. I’m not a coder, there may be errors/simplifications.</p>
<h2 id="dynamic-linking">Dynamic linking</h2>
<p>This is the ‘norm’ on Linux. This is where (ideally) there’s one copy of <code>ffmpeg</code> installed and any program that wants to make use of <code>ffmpeg</code> (i.e. anything that wants to play or encode video and audio) uses that same version.</p>
<p>The big upside of this way of doing things is that it’s efficient. One copy of each library - what’s the point of having shared libraries if they’re not shared?</p>
<p>The (considerable) downside is that managing this - keeping track of the web of dependencies - is <em>very</em> complex, and each distro must do this itself. That’s a lot of duplicated effort. Dynamic linking necessitates complex, and sometimes fragile, package management systems.</p>
<p>A graph of dependencies on my fairly sparse (~650 packages) system, generated with <code>pacgraph</code>:</p>
<p><a href="/images/pacgraph.jpg">/images/pacgraph.jpg</a></p>
<p>An upside of <em>having</em> that complex package management system, though, is that we can update everything on our system all in one go, and that process is (ideally) very efficient since nothing is duplicated.</p>
<p><strong><em>But…</em></strong></p>
<p>What happens if two programs need different versions of <code>ffmpeg</code>?</p>
<p>Well, there are two basic approaches to this: accommodate that or don’t.</p>
<p>Arch, for example, takes the general approach of having only one version (the latest) of each library. If the latest version of <code>mpv</code> doesn’t work with the latest version of <code>ffmpeg</code> then this is a bug, and must be fixed.</p>
<p>The advantage of Arch’s approach is simplicity from a packaging point of view. Drawbacks include the inability to, within this system, use old software, and a lack of stability (meaning “things keep changing” not “things keep crashing”).</p>
<p>Debian takes the other approach - allowing different versions of libraries to be concurrently installed. This allows for the use of old software, atomic upgrades (i.e. updating/installing one application without updating the whole system) and allows for stability. But it compounds the complexity of package management.</p>
<p>From the point of view of a user, dynamic linking is kinda ideal. It makes the most efficient use of storage, memory and bandwidth and allows for the easy installation and maintenance of all software from the OS itself through to applications.</p>
<p>For the developer and maintainer, though, it’s potentially a nightmare. It means that a package has to be created for every piece of software on every distro. Not so bad for established software - the process will often be largely automated and will be the responsibility of each distro’s maintainer for that package. But for a developer making new or niche software which is not yet in repos, it’s quite a burden. To distribute their software for Linux they’d have to create and maintain a package for every distro (or at least a big few) - a process with which they’re likely to be entirely unfamiliar and which will differ from distro to distro. They’ll also be distributing that package outside of the package manager’s repos (PPAs and Arch’s AUR aside), which is far from ideal.</p>
<p><strong>Summary</strong></p>
<ul>
<li>+ Great for users (so long as everything’s in the repos)</li>
<li>+ Efficient use of system resources</li>
<li>- Requires complex package management infrastructure</li>
<li>- Unfun for developers</li>
</ul>
<h2 id="bundling">Bundling</h2>
<p>This is where you bundle the needed libraries with the software. The libraries don’t get installed on the system, they just sit there in the application’s directory. Which <em>seems</em> like a good idea until you realise that, unless you include everything up-to-but-not-including the kernel, those libraries are still making use of system libraries. And at some point, that’ll stop working (as system libraries get updated).</p>
<p>On Linux I’ve only ever seen this approach with proprietary software. It’s how GOG games used to be distributed, for example. I usually take it as a signal that the distributors of the software have no intention whatsoever of maintaining the thing, which held true for GOG.</p>
<p>Appimages are sort of containerised bundles. They’re convenient, in that you can just download a single file and run it without having to worry about dependencies and so on, but they’re maximally inefficient, fiddly to maintain, and don’t confer any of the broader benefits of ‘proper’ containerisation.</p>
<p>I do use a couple of Appimages - one is Libreoffice, which is a piece of software I resent having to have installed for the rare times someone sends me a .docx or .xlsx and expects me to see it how they’re seeing it. I don’t care if Libreoffice is up-to-date, I don’t want its dependencies cluttering up my package management and I don’t enjoy or like it as software. I want to forget it’s there as far as I possibly can and Appimages suit that.</p>
<p>But really, bundling is the worst of all worlds.</p>
<p><strong>Summary</strong></p>
<ul>
<li>+ Easy for developers</li>
<li>+ Convenient…</li>
<li>- … until they stop working</li>
<li>- Bad in every other way</li>
</ul>
<h2 id="static-linking">Static linking</h2>
<p>This is some special magic whereby the bits of a library that a program uses are included in the program at compile-time. If the program makes use of <code>ffmpeg</code> then the bits of <code>ffmpeg</code> that are used are pulled out and included with the application (in an object file, I believe), meaning that a system running the software doesn’t even need to have <code>ffmpeg</code> installed.</p>
<p>(<code>ffmpeg</code> is probably a terrible example in this case but this is just illustrative)</p>
<p>This approach involves some redundancy - you may have tweaked your system-wide <code>ffmpeg</code> and <em>want</em> to use that - but simplifies packaging and reduces dependencies, making life easier for developers.</p>
<p>This is like the cleverer version of bundling. It shares, but reduces the impact of, bundling’s drawbacks while retaining its advantages.</p>
<p><strong>Summary</strong></p>
<ul>
<li>= A balance between efficiency and ease of development</li>
<li>- Less efficient and flexible than dynamic linking for users</li>
<li>+ Less complex in terms of package management</li>
</ul>
<h2 id="flatpaks-containerisation">Flatpaks (containerisation)</h2>
<p>Remember where, under ‘Bundling’, I said:</p>
<blockquote>
<p>unless you include everything up-to-but-not-including the kernel</p>
</blockquote>
<p>Well, this is kinda that.</p>
<p>A container, in this context, is like another copy of a Linux operating system running on your current OS’s kernel. This may sound like a virtual machine, but it’s not really. A virtual machine <em>emulates a CPU</em> and then runs an entire Linux OS on that emulated CPU. A container is just a bunch of software that <em>believes</em> it’s a Linux OS, running on your current kernel and hardware. VMs involve much more overhead than containers.</p>
<p>Here’s a hopefully illustrative example. I’m using <a href="https://github.com/89luca89/distrobox">distrobox</a> to run <a href="https://www.debian.org/">Debian</a> in a container:</p>
<p><a href="/images/distrobox.jpg">/images/distrobox.jpg</a></p>
<p>As you can see from the output, they (optionally) share the host’s home directory but otherwise Debian’s filesystem is its own - it is fully Debian. Both distros see the same hardware and kernel but they are otherwise separate.</p>
<p>That’s roughly how Flatpaks work. Flatpak applications run within a containerised copy of Linux, running on your ‘host’ OS’s kernel and sharing its hardware. This obviously involves a significant amount of duplication but, within Flatpak itself, duplication is minimised through the use of shared ‘runtimes’ which applications make use of.</p>
<p>This approach is, effectively, a universal package system for all Linux distros, which is great for developers.</p>
<p>It also provides some ‘sandboxing’ - separation between applications and the base system - you can restrict which parts of the filesystem and what devices a containerised application has access to.</p>
<p><strong>Summary</strong></p>
<ul>
<li>- Inefficient compared to dynamic linking…</li>
<li>+ … but duplication ideally happens only once</li>
<li>+ A single package manager for all distros is good for developers</li>
</ul>
<h2 id="going-further-immutability">Going further (immutability)</h2>
<p>So if you take that idea of isolating applications from the base system to its natural conclusion you could <em>completely</em> isolate the base system from applications. Make the base system essentially ‘read-only’ - applications cannot alter it in any way.</p>
<p>This is immutability, and there are a few ways to get there. One way is to make all applications containers, this is the path Ubuntu is going down with its Snaps. This would work with Flatpaks, too.</p>
<p>NixOS takes a different approach. On NixOS, every package is installed to its own directory which means that multiple versions of dependencies can exist at the same time. A program will use the <em>exact</em> dependencies it is built against. This isn’t containerisation as such but shares some of the benefits, while also retaining the benefits of dynamic linking.</p>
<p>Everything in NixOS - which packages are installed and also runtime configurations - is (or at least can be) configured in one place. The system can easily be ‘rolled back’ to a previous state and that configuration can easily be copied to another machine to produce the exact same setup.</p>
<p>Immutability is an attractive idea - you can have a very stable base system and run whatever bleeding edge applications you like without ever risking the integrity of that base system.</p>
<p><strong>Summary (of immutability in general)</strong></p>
<ul>
<li>+ Stable base system and applications as cutting edge as you like</li>
<li>+ Depending on the method used can facilitate <a href="https://en.wikipedia.org/wiki/Reproducible_builds">reproducibility</a></li>
<li>- Likely to involve some redundancy, depending on method</li>
<li>+ Probably the future</li>
</ul>
<h2 id="conclusion">Conclusion</h2>
<p>I used to be very dubious of containerised applications. The <em>efficiency</em> of dynamic linking seems so intrinsically <em>linuxy</em> and, while package management was a hard problem to solve, it seems to work great now from a user’s perspective.</p>
<p>Flatpaks seemed to be a move to appease developers of proprietary software which is something I have no interest in at all.</p>
<p>But then I realised I could install Krita without pulling in half of KDE. And install Steam and play games without having 32bit libraries - which were <em>only used by Steam and games</em> - installed in my base system. All that stuff is still there, of course, but it’s tucked away where I don’t have to look at it, and it doesn’t get updated every time I update my base system.</p>
<p>Valve have gone with an immutable base on the Steam Deck for good reason, immutability is very appealing. The advantages of running Debian stable <em>plus</em> the advantages of, say, Arch, with some additional advantages on top. Of course, if immutability is implemented through containers then it carries with it the disadvantages of containers in general, and if it’s implemented in the NixOSy way then you still have complex package management. But the upsides seem well worth it to me and I expect distros with an immutable base to become the norm over the next decade or so.</p>]]></content:encoded>
</item>


<item>
<title>Easier ssh with .ssh config</title>
<link>https://friendo.monster/posts/easier-ssh-with-.ssh-config.html</link>
<guid>https://friendo.monster/posts/easier-ssh-with-.ssh-config.html</guid>
<pubDate>Mon, 03 Feb 2020 00:00:00 +0000</pubDate>
<description><![CDATA[<p>I didn’t know about the <code>~/.ssh/config</code> file until quite recently and it’s <em>really</em> handy, so I thought I’d share.</p>
<p><code>~/.ssh/config</code> lets you make what I think of as ssh aliases. You can give connections short names and specify various connection settings ‒ pretty much anything you can pass to <code>ssh</code>’s <abbr title="Command Line Interface">CLI</abbr> can be configured here.</p>
<p>Here’s a simple example:</p>
<pre><code>Host nas
    Hostname 192.168.1.10

Host laptop
    Hostname 192.168.1.11
    User laptop-me

Host someserver
    Hostname 203.0.113.1
    User seriousthings
    Port 10100
    PubkeyAuthentication yes
    Identityfile ~/.ssh/id_rsa_seriousthings

Host *
    PubkeyAuthentication no</code></pre>
<p>I am then able to do, for example, simply: <code>ssh nas</code></p>
<p>These settings apply from top to bottom, cumulatively. So you want to structure this file with <strong>specific rules above general rules</strong>, otherwise the general rules will override the specific, which is not what you want.</p>
<p>One nice benefit is that you’ll get autocompletion of hosts defined in <code>~/.ssh/config</code> when using <code>ssh</code> under bash or zsh (at least).</p>
<p><code>~/.ssh/config</code> can also be used to shore up some of the leaky parts of sshing, as described <a href="https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-ssh-config/#gfm-10">here</a> ‒ the whole page, and other articles in the series (linked at the top) are worth a read if you use ssh a decent amount.</p>]]></description>
<content:encoded><![CDATA[<p>I didn’t know about the <code>~/.ssh/config</code> file until quite recently and it’s <em>really</em> handy, so I thought I’d share.</p>
<p><code>~/.ssh/config</code> lets you make what I think of as ssh aliases. You can give connections short names and specify various connection settings ‒ pretty much anything you can pass to <code>ssh</code>’s <abbr title="Command Line Interface">CLI</abbr> can be configured here.</p>
<p>Here’s a simple example:</p>
<pre><code>Host nas
    Hostname 192.168.1.10

Host laptop
    Hostname 192.168.1.11
    User laptop-me

Host someserver
    Hostname 203.0.113.1
    User seriousthings
    Port 10100
    PubkeyAuthentication yes
    Identityfile ~/.ssh/id_rsa_seriousthings

Host *
    PubkeyAuthentication no</code></pre>
<p>I am then able to do, for example, simply: <code>ssh nas</code></p>
<p>These settings apply from top to bottom, cumulatively. So you want to structure this file with <strong>specific rules above general rules</strong>, otherwise the general rules will override the specific, which is not what you want.</p>
<p>One nice benefit is that you’ll get autocompletion of hosts defined in <code>~/.ssh/config</code> when using <code>ssh</code> under bash or zsh (at least).</p>
<p><code>~/.ssh/config</code> can also be used to shore up some of the leaky parts of sshing, as described <a href="https://www.everythingcli.org/ssh-tunnelling-for-fun-and-profit-ssh-config/#gfm-10">here</a> ‒ the whole page, and other articles in the series (linked at the top) are worth a read if you use ssh a decent amount.</p>]]></content:encoded>
</item>


<item>
<title>Monitor inputs with ddcutil</title>
<link>https://friendo.monster/posts/monitor-inputs-with-ddcutil.html</link>
<guid>https://friendo.monster/posts/monitor-inputs-with-ddcutil.html</guid>
<pubDate>Wed, 01 Jan 2020 00:00:00 +0000</pubDate>
<description><![CDATA[<p><code>ddcutil</code> is a program for messing with monitor settings. Brightness and colour levels and all that and – the one I’m interested in – <em>input source</em>. It works by magic. Or, as <code>ddcutil</code>’s <a href="https://www.ddcutil.com/">docs</a> put it:</p>
<blockquote>
<p>ddcutil primarily uses DDC/CI (Display Data Channel Command Interface) to communicate with monitors implementing MCCS (Monitor Control Command Set) over I2C.</p>
</blockquote>
<p>Whatever that means.</p>
<p>Obviously <code>ddcutil</code> will only work if the monitor supports that stuff. Reading around suggests that most but not all do.</p>
<p><code>ddcutil</code> will not work on laptops as they use a different interface.</p>
<p>Its usefulness for me is that I have a Nintendo Switch plugged into my main monitor as well as my PC. When I want to play on my Switch, rather than leaning over my desk and using the super fiddly buttons on the front of my monitor, I can just hit a key combo to switch between the DisplayPort input my PC uses and the HDMI used by my Switch.</p>
<p>The same approach could be applied to VFIO passthrough setups or just, as mentioned above, for adjusting brightness and so on.</p>
<h3 id="preparation">Preparation</h3>
<p>To use <code>ddcutil</code> the i2c-dev module must be loaded. On some distros it’s built into the kernel, if it’s not it’ll need to be explicitly loaded.</p>
<p>To check whether i2c-dev is built in, run:</p>
<pre><code>grep i2c-dev.ko  /lib/modules/`uname -r`/modules.builtin</code></pre>
<p>If you get output then you’re all good. If not then you need to explicitly load the module by adding the line <code>i2c_dev</code> to <code>/etc/modules</code> or create a file containing that line in <code>/etc/modules-load.d/</code>.</p>
<p>In my case, on Arch, the module was not included in the kernel so I created the file <code>/etc/modules-load.d/i2c-dev.conf</code> containing the single line:</p>
<pre><code>i2c_dev</code></pre>
<p>That’ll only take effect next time you reboot so for now you can load the module directly with:</p>
<pre><code>sudo modprobe i2c_dev</code></pre>
<h3 id="using-ddcutil">Using ddcutil</h3>
<p>Once the i2c_dev module is loaded we can do:</p>
<pre><code>sudo ddcutil detect</code></pre>
<p>To detect monitors. The output in my case is:</p>
<pre><code>Display 1
   I2C bus:             /dev/i2c-5
   EDID synopsis:
      Mfg id:           DEL
      Model:            DELL U2715H
      Serial number:    GH85D67S05JS
      Manufacture year: 2016
      EDID version:     1.4
   VCP version:         2.1</code></pre>
<p>If you’ve got multiple monitors, pay attention to that <code>Display</code> number – you’ll need to use that with subsequent commands. So if you want to operate on display 2, for example, wherever I use <code>ddcutil</code>, you’ll want to use <code>ddcutil -d 2</code>.</p>
<p>Once you’ve settled on a display, run:</p>
<pre><code>sudo ddcutil capabilities</code></pre>
<p>Which will output a load of stuff that <code>ddcutil</code> can mess with on the monitor.</p>
<p>The one I’m interested in is <em>Feature 60 (Input Source)</em> (I <em>believe</em> feature codes are common across devices but don’t take my word for that).</p>
<pre><code>   Feature: 60 (Input Source)
      Values:
         0f: DisplayPort-1
         10: DisplayPort-2
         11: HDMI-1
         12: HDMI-2</code></pre>
<p>There we see feature code 60 with its possible values and what they mean.</p>
<p>We can get the current value of any particular feature by using <code>ddcutil getvcp</code>. Feature codes are hexidecimal and need to be prepended with <code>0x</code> when used in commands. So to get the current input source we can do:</p>
<pre><code>sudo ddcutil getvcp 0x60</code></pre>
<p>Which outputs:</p>
<pre><code>VCP code 0x60 (Input Source                  ): DisplayPort-2 (sl=0x10)</code></pre>
<p>We can change settings with <code>ddcutil setvcp</code>. So, if I want to switch to HDMI 2, which has the code 12 in the output up above, we can do:</p>
<pre><code>sudo ddcutil setvcp 0x60 0x12</code></pre>
<p>And my monitor will switch over to HDMI input. It takes a couple of seconds but it works. Magic.</p>
<p>So to make this super-useful to me I wrote a little bash script which toggles between DisplayPort 2 (my PC) and HDMI 2 (my Switch) and bound it to a key combo:</p>
<pre><code>#!/usr/bin/env bash
notify-send &quot;Switching...&quot;
if sudo ddcutil getvcp 0x60 | grep &quot;DisplayPort&quot; &gt; /dev/null 2&gt;&amp;1;then
    sudo ddcutil setvcp 0x60 0x12
else
    sudo ddcutil setvcp 0x60 0x10
fi</code></pre>
<p>As you can see, <code>ddcutil</code> requires root permissions to do its thing. You can handle this in whatever way you like in any scripts you make – I just use sudo because I am not clever like you are.</p>]]></description>
<content:encoded><![CDATA[<p><code>ddcutil</code> is a program for messing with monitor settings. Brightness and colour levels and all that and – the one I’m interested in – <em>input source</em>. It works by magic. Or, as <code>ddcutil</code>’s <a href="https://www.ddcutil.com/">docs</a> put it:</p>
<blockquote>
<p>ddcutil primarily uses DDC/CI (Display Data Channel Command Interface) to communicate with monitors implementing MCCS (Monitor Control Command Set) over I2C.</p>
</blockquote>
<p>Whatever that means.</p>
<p>Obviously <code>ddcutil</code> will only work if the monitor supports that stuff. Reading around suggests that most but not all do.</p>
<p><code>ddcutil</code> will not work on laptops as they use a different interface.</p>
<p>Its usefulness for me is that I have a Nintendo Switch plugged into my main monitor as well as my PC. When I want to play on my Switch, rather than leaning over my desk and using the super fiddly buttons on the front of my monitor, I can just hit a key combo to switch between the DisplayPort input my PC uses and the HDMI used by my Switch.</p>
<p>The same approach could be applied to VFIO passthrough setups or just, as mentioned above, for adjusting brightness and so on.</p>
<h3 id="preparation">Preparation</h3>
<p>To use <code>ddcutil</code> the i2c-dev module must be loaded. On some distros it’s built into the kernel, if it’s not it’ll need to be explicitly loaded.</p>
<p>To check whether i2c-dev is built in, run:</p>
<pre><code>grep i2c-dev.ko  /lib/modules/`uname -r`/modules.builtin</code></pre>
<p>If you get output then you’re all good. If not then you need to explicitly load the module by adding the line <code>i2c_dev</code> to <code>/etc/modules</code> or create a file containing that line in <code>/etc/modules-load.d/</code>.</p>
<p>In my case, on Arch, the module was not included in the kernel so I created the file <code>/etc/modules-load.d/i2c-dev.conf</code> containing the single line:</p>
<pre><code>i2c_dev</code></pre>
<p>That’ll only take effect next time you reboot so for now you can load the module directly with:</p>
<pre><code>sudo modprobe i2c_dev</code></pre>
<h3 id="using-ddcutil">Using ddcutil</h3>
<p>Once the i2c_dev module is loaded we can do:</p>
<pre><code>sudo ddcutil detect</code></pre>
<p>To detect monitors. The output in my case is:</p>
<pre><code>Display 1
   I2C bus:             /dev/i2c-5
   EDID synopsis:
      Mfg id:           DEL
      Model:            DELL U2715H
      Serial number:    GH85D67S05JS
      Manufacture year: 2016
      EDID version:     1.4
   VCP version:         2.1</code></pre>
<p>If you’ve got multiple monitors, pay attention to that <code>Display</code> number – you’ll need to use that with subsequent commands. So if you want to operate on display 2, for example, wherever I use <code>ddcutil</code>, you’ll want to use <code>ddcutil -d 2</code>.</p>
<p>Once you’ve settled on a display, run:</p>
<pre><code>sudo ddcutil capabilities</code></pre>
<p>Which will output a load of stuff that <code>ddcutil</code> can mess with on the monitor.</p>
<p>The one I’m interested in is <em>Feature 60 (Input Source)</em> (I <em>believe</em> feature codes are common across devices but don’t take my word for that).</p>
<pre><code>   Feature: 60 (Input Source)
      Values:
         0f: DisplayPort-1
         10: DisplayPort-2
         11: HDMI-1
         12: HDMI-2</code></pre>
<p>There we see feature code 60 with its possible values and what they mean.</p>
<p>We can get the current value of any particular feature by using <code>ddcutil getvcp</code>. Feature codes are hexidecimal and need to be prepended with <code>0x</code> when used in commands. So to get the current input source we can do:</p>
<pre><code>sudo ddcutil getvcp 0x60</code></pre>
<p>Which outputs:</p>
<pre><code>VCP code 0x60 (Input Source                  ): DisplayPort-2 (sl=0x10)</code></pre>
<p>We can change settings with <code>ddcutil setvcp</code>. So, if I want to switch to HDMI 2, which has the code 12 in the output up above, we can do:</p>
<pre><code>sudo ddcutil setvcp 0x60 0x12</code></pre>
<p>And my monitor will switch over to HDMI input. It takes a couple of seconds but it works. Magic.</p>
<p>So to make this super-useful to me I wrote a little bash script which toggles between DisplayPort 2 (my PC) and HDMI 2 (my Switch) and bound it to a key combo:</p>
<pre><code>#!/usr/bin/env bash
notify-send &quot;Switching...&quot;
if sudo ddcutil getvcp 0x60 | grep &quot;DisplayPort&quot; &gt; /dev/null 2&gt;&amp;1;then
    sudo ddcutil setvcp 0x60 0x12
else
    sudo ddcutil setvcp 0x60 0x10
fi</code></pre>
<p>As you can see, <code>ddcutil</code> requires root permissions to do its thing. You can handle this in whatever way you like in any scripts you make – I just use sudo because I am not clever like you are.</p>]]></content:encoded>
</item>


<item>
<title>Underappreciated top</title>
<link>https://friendo.monster/posts/underappreciated-top.html</link>
<guid>https://friendo.monster/posts/underappreciated-top.html</guid>
<pubDate>Sun, 10 Nov 2019 00:00:00 +0000</pubDate>
<description><![CDATA[<p>There are some fancy process monitoring <abbr title="Terminal User Interface">TUI</abbr> programs these days. Aside from the venerable <a href="https://hisham.hm/htop/">htop</a> there are also upstarts like <a href="https://github.com/nicolargo/glances">glances</a> and <a href="https://github.com/MrRio/vtop">vtop</a> and numerous others.</p>
<p>But what about poor old neglected top? It may look like a bag of trowels out-of-the-box, but with a little care and attention it can look pretty cool, too. Here’s mine:</p>
<p><a href="/images/top_top.png">/images/top_top.png</a></p>
<p>And it does it without needing a huge scripting language to run; its only real dependency is <code>ncurses</code> and you can pretty much guarantee it’ll be preinstalled on any machine you use, regardless of the flavour of Unix it’s running.</p>
<p>And being a proper Unixy thing, with top you can do things like:</p>
<pre><code>top | grep firefox</code></pre>
<p>Can those fancy monitors do that? Can they fuck as like.</p>
<h3 id="but-how-can-i-make-my-top-look-fly-like-yours">But how can I make <em>my</em> top look <em>fly</em> like <em>yours</em>?</h3>
<p>Well, I’m glad you asked.</p>
<p>Top’s documentation is <em>excellent</em> – both the manpage and the in-application help which is accessed by pressing <code>h</code>. If you enjoy figuring stuff out yourself then the latter is all you really need – you can close this right now, press <code>h</code> and get customising.</p>
<p>At any time while customising your top you can press <code>W</code> to save your settings.</p>
<p>Now let’s get some nice CPU bars. Press <code>1</code> to expand the CPU info thing at the top to show all cores. The default is to show text-based stats so press <code>t</code> to get pretty bars. You can press <code>t</code> a few more times if you’d like to see your other options.</p>
<p>You can do the same with the memory usage summary by pressing <code>m</code> – cycle through the options and use what you prefer. Personally, for memory, I prefer the full stats.</p>
<p>Press <code>0</code> to omit numerical fields with zeroed values from the process list if you think that looks nicer/clearer as I do. Then <code>J</code> to justify numbers.</p>
<p>If you only want to show tasks for your user, type <code>u</code> and then enter your username.</p>
<p>Now press <code>z</code> to get some colour and <code>x</code> to highlight the sorted column with bold.</p>
<p>Some optional stuff:</p>
<ul>
<li>Press <code>c</code> to toggle between just task names and full paths</li>
<li>Press <code>e</code> and <code>E</code> to cycle through scales of memory units – i.e. bytes, KiB, MiB etc. – in the task list and memory area respectively.</li>
<li>Press <code>V</code> to view processes as a tree</li>
</ul>
<p>Okay, so that’s a good start. All we’ve done so far is press <code>1t0Jzx</code> and now we have this:</p>
<p><a href="/images/top_1t0Jzx.png">/images/top_1t0Jzx.png</a></p>
<p>Press <code>W</code> to save your <em>hard work</em>.</p>
<h3 id="windows">Windows‽</h3>
<p>Top’s <em>big secret</em> is that it comes with four <em>windows</em> defined (that’s what it calls them). By default you’re in <em>Single Window Mode</em> – Press <code>A</code> to switch to <em>Multiple Window Mode</em>.</p>
<p>Unfortunately these new windows are <em>ugly</em>. We can switch between windows by pressing <code>a</code> and <code>w</code>, so let’s pretty them up by pressing <code>a1t0Jzx</code> three times.</p>
<p>Now we have four windows each with the same settings, like so:</p>
<p><a href="/images/top_a1t0Jzx_x_3.png">/images/top_a1t0Jzx_x_3.png</a></p>
<p>You can use as many of these four windows as you like, each with its own fields and settings. I like to have two – one ordered by CPU usage and the other by memory. Adjust to taste, obviously.</p>
<p>First of all let’s hide the bottom two windows. Move to them using <code>a</code> and <code>w</code> and press <code>-</code> to hide them. you can tell what window is currently selected by looking at the number in the very top left (if you don’t see that, press <code>l</code> to being the summary back).</p>
<p>You can also switch windows by pressing <code>g</code> then the number of the window you want to select.</p>
<p>Press <code>g1</code> to select the first window then <code>G</code> and name this window as you please. Now press <code>f</code>.</p>
<p><a href="/images/top_fields.png">/images/top_fields.png</a></p>
<p>This screen allows you to customise which fields are displayed in the currently selected window. Use cursor keys (or <code>Alt</code> + <code>j</code> and <code>k</code>) to move up and down this list, <code>d</code> to toggle whether a field is displayed and <code>s</code> to choose the field by which the window is sorted.</p>
<p>To move fields around, press right cursor (or <code>Alt</code> + <code>l</code>) to select an item for move, then just move it up and down the list as you like. Press left cursor (or <code>Alt</code> + <code>h</code>) or <code>Enter</code> to complete the move.</p>
<p>Press <code>q</code> when you’re done.</p>
<p>Now press <code>Z</code> so we can make the colours pretty.</p>
<p><a href="/images/top_colours.png">/images/top_colours.png</a></p>
<p>This window explains itself very well so take some time to read it. At the top is a preview of how the selected window will look. Press the keys <code>0</code> - <code>7</code> to change the colour of the currently selected element. Select an element by pressing <code>S</code>, <code>M</code>, <code>H</code> and <code>T</code> for <em>Summary Data</em>, <em>Message Prompts</em>, <em>Column Heads</em> and <em>Task Information</em> respectively.</p>
<p>Colour all the things until they sparkle then press <code>Enter</code> to commit your changes and return to top. Be careful here, unlike on the previous screen pressing <code>q</code> will abort your changes.</p>
<p>Repeat these steps until the windows you want to use have all the fields and colours you want.</p>
<p>And you’re done!</p>
<p>Don’t forget to press <code>W</code> to save your customisations!</p>
<h3 id="now-my-top-looks-dope-but-how-do-i-actually-use-it">Now my top looks <em>dope</em> but how do I actually <em>use</em> it?</h3>
<p>Top can do a lot of clever stuff but let’s be honest, as desktop users all we really want a process monitor for is generally keeping an eye on things and killing anything that misbehaves. If you’re a sysadmin you no doubt know what you’re doing much better than I do.</p>
<p>So I’ll just explain how to filter your process list and kill anything that’s being naughty.</p>
<p>First of all, select the window that best represents what you’re interested in (i.e. CPU usage, RAM usage etc.) then press <code>A</code> to make things clearer.</p>
<p>To filter this list press <code>o</code> (or <code>O</code> if you wish your filter to be case-sensitive) then type, for example:</p>
<ul>
<li><code>COMMAND=firefox</code> to show processes whose COMMAND field contains <code>firefox</code></li>
<li><code>!COMMAND=firefox</code> to show processes which <em>don’t</em> contain <code>firefox</code></li>
<li><code>%CPU&gt;3.0</code> to filter to processes whose %CPU field is greater than 3.0</li>
</ul>
<p>For more info on filters do a <code>man top</code>.</p>
<p>Okay, let’s clear those filters by pressing <code>=</code>.</p>
<p>To kill a task you simply press <code>k</code> then type the PID of the process you wish to kill. This will default to the process at the top of the current list, which is usually what you want – i.e. if you wanted to kill the process with the highest CPU use, you’d choose your CPU usage window and then press <code>k</code>. If that’s not the case then filtering, as described above, can make it easier to spot the PID of the process you wish to kill.</p>
<p>After choosing a PID you’ll be asked which signal to send. The default is SIGTERM (signal number 15) which tells the process to exit in a seemly manner. If you want to send the “fuck you, close” SIGKILL instead, <a href="https://bencane.com/2014/04/01/understanding-the-kill-command-and-how-to-terminate-processes-in-linux/">bad practise</a> as it may be, enter <code>9</code>.</p>
<p>And that’s it. Top may not be the prettiest of all the task managers but it’s <em>extremely</em> powerful and customisable and, to my mind, just looks and feels more <em>unixy</em> and thus, obviously, <em>cooler</em>…</p>
<p><a href="https://www.youtube.com/embed/Bmz67ErIRa4">https://www.youtube.com/embed/Bmz67ErIRa4</a></p>]]></description>
<content:encoded><![CDATA[<p>There are some fancy process monitoring <abbr title="Terminal User Interface">TUI</abbr> programs these days. Aside from the venerable <a href="https://hisham.hm/htop/">htop</a> there are also upstarts like <a href="https://github.com/nicolargo/glances">glances</a> and <a href="https://github.com/MrRio/vtop">vtop</a> and numerous others.</p>
<p>But what about poor old neglected top? It may look like a bag of trowels out-of-the-box, but with a little care and attention it can look pretty cool, too. Here’s mine:</p>
<p><a href="/images/top_top.png">/images/top_top.png</a></p>
<p>And it does it without needing a huge scripting language to run; its only real dependency is <code>ncurses</code> and you can pretty much guarantee it’ll be preinstalled on any machine you use, regardless of the flavour of Unix it’s running.</p>
<p>And being a proper Unixy thing, with top you can do things like:</p>
<pre><code>top | grep firefox</code></pre>
<p>Can those fancy monitors do that? Can they fuck as like.</p>
<h3 id="but-how-can-i-make-my-top-look-fly-like-yours">But how can I make <em>my</em> top look <em>fly</em> like <em>yours</em>?</h3>
<p>Well, I’m glad you asked.</p>
<p>Top’s documentation is <em>excellent</em> – both the manpage and the in-application help which is accessed by pressing <code>h</code>. If you enjoy figuring stuff out yourself then the latter is all you really need – you can close this right now, press <code>h</code> and get customising.</p>
<p>At any time while customising your top you can press <code>W</code> to save your settings.</p>
<p>Now let’s get some nice CPU bars. Press <code>1</code> to expand the CPU info thing at the top to show all cores. The default is to show text-based stats so press <code>t</code> to get pretty bars. You can press <code>t</code> a few more times if you’d like to see your other options.</p>
<p>You can do the same with the memory usage summary by pressing <code>m</code> – cycle through the options and use what you prefer. Personally, for memory, I prefer the full stats.</p>
<p>Press <code>0</code> to omit numerical fields with zeroed values from the process list if you think that looks nicer/clearer as I do. Then <code>J</code> to justify numbers.</p>
<p>If you only want to show tasks for your user, type <code>u</code> and then enter your username.</p>
<p>Now press <code>z</code> to get some colour and <code>x</code> to highlight the sorted column with bold.</p>
<p>Some optional stuff:</p>
<ul>
<li>Press <code>c</code> to toggle between just task names and full paths</li>
<li>Press <code>e</code> and <code>E</code> to cycle through scales of memory units – i.e. bytes, KiB, MiB etc. – in the task list and memory area respectively.</li>
<li>Press <code>V</code> to view processes as a tree</li>
</ul>
<p>Okay, so that’s a good start. All we’ve done so far is press <code>1t0Jzx</code> and now we have this:</p>
<p><a href="/images/top_1t0Jzx.png">/images/top_1t0Jzx.png</a></p>
<p>Press <code>W</code> to save your <em>hard work</em>.</p>
<h3 id="windows">Windows‽</h3>
<p>Top’s <em>big secret</em> is that it comes with four <em>windows</em> defined (that’s what it calls them). By default you’re in <em>Single Window Mode</em> – Press <code>A</code> to switch to <em>Multiple Window Mode</em>.</p>
<p>Unfortunately these new windows are <em>ugly</em>. We can switch between windows by pressing <code>a</code> and <code>w</code>, so let’s pretty them up by pressing <code>a1t0Jzx</code> three times.</p>
<p>Now we have four windows each with the same settings, like so:</p>
<p><a href="/images/top_a1t0Jzx_x_3.png">/images/top_a1t0Jzx_x_3.png</a></p>
<p>You can use as many of these four windows as you like, each with its own fields and settings. I like to have two – one ordered by CPU usage and the other by memory. Adjust to taste, obviously.</p>
<p>First of all let’s hide the bottom two windows. Move to them using <code>a</code> and <code>w</code> and press <code>-</code> to hide them. you can tell what window is currently selected by looking at the number in the very top left (if you don’t see that, press <code>l</code> to being the summary back).</p>
<p>You can also switch windows by pressing <code>g</code> then the number of the window you want to select.</p>
<p>Press <code>g1</code> to select the first window then <code>G</code> and name this window as you please. Now press <code>f</code>.</p>
<p><a href="/images/top_fields.png">/images/top_fields.png</a></p>
<p>This screen allows you to customise which fields are displayed in the currently selected window. Use cursor keys (or <code>Alt</code> + <code>j</code> and <code>k</code>) to move up and down this list, <code>d</code> to toggle whether a field is displayed and <code>s</code> to choose the field by which the window is sorted.</p>
<p>To move fields around, press right cursor (or <code>Alt</code> + <code>l</code>) to select an item for move, then just move it up and down the list as you like. Press left cursor (or <code>Alt</code> + <code>h</code>) or <code>Enter</code> to complete the move.</p>
<p>Press <code>q</code> when you’re done.</p>
<p>Now press <code>Z</code> so we can make the colours pretty.</p>
<p><a href="/images/top_colours.png">/images/top_colours.png</a></p>
<p>This window explains itself very well so take some time to read it. At the top is a preview of how the selected window will look. Press the keys <code>0</code> - <code>7</code> to change the colour of the currently selected element. Select an element by pressing <code>S</code>, <code>M</code>, <code>H</code> and <code>T</code> for <em>Summary Data</em>, <em>Message Prompts</em>, <em>Column Heads</em> and <em>Task Information</em> respectively.</p>
<p>Colour all the things until they sparkle then press <code>Enter</code> to commit your changes and return to top. Be careful here, unlike on the previous screen pressing <code>q</code> will abort your changes.</p>
<p>Repeat these steps until the windows you want to use have all the fields and colours you want.</p>
<p>And you’re done!</p>
<p>Don’t forget to press <code>W</code> to save your customisations!</p>
<h3 id="now-my-top-looks-dope-but-how-do-i-actually-use-it">Now my top looks <em>dope</em> but how do I actually <em>use</em> it?</h3>
<p>Top can do a lot of clever stuff but let’s be honest, as desktop users all we really want a process monitor for is generally keeping an eye on things and killing anything that misbehaves. If you’re a sysadmin you no doubt know what you’re doing much better than I do.</p>
<p>So I’ll just explain how to filter your process list and kill anything that’s being naughty.</p>
<p>First of all, select the window that best represents what you’re interested in (i.e. CPU usage, RAM usage etc.) then press <code>A</code> to make things clearer.</p>
<p>To filter this list press <code>o</code> (or <code>O</code> if you wish your filter to be case-sensitive) then type, for example:</p>
<ul>
<li><code>COMMAND=firefox</code> to show processes whose COMMAND field contains <code>firefox</code></li>
<li><code>!COMMAND=firefox</code> to show processes which <em>don’t</em> contain <code>firefox</code></li>
<li><code>%CPU&gt;3.0</code> to filter to processes whose %CPU field is greater than 3.0</li>
</ul>
<p>For more info on filters do a <code>man top</code>.</p>
<p>Okay, let’s clear those filters by pressing <code>=</code>.</p>
<p>To kill a task you simply press <code>k</code> then type the PID of the process you wish to kill. This will default to the process at the top of the current list, which is usually what you want – i.e. if you wanted to kill the process with the highest CPU use, you’d choose your CPU usage window and then press <code>k</code>. If that’s not the case then filtering, as described above, can make it easier to spot the PID of the process you wish to kill.</p>
<p>After choosing a PID you’ll be asked which signal to send. The default is SIGTERM (signal number 15) which tells the process to exit in a seemly manner. If you want to send the “fuck you, close” SIGKILL instead, <a href="https://bencane.com/2014/04/01/understanding-the-kill-command-and-how-to-terminate-processes-in-linux/">bad practise</a> as it may be, enter <code>9</code>.</p>
<p>And that’s it. Top may not be the prettiest of all the task managers but it’s <em>extremely</em> powerful and customisable and, to my mind, just looks and feels more <em>unixy</em> and thus, obviously, <em>cooler</em>…</p>
<p><a href="https://www.youtube.com/embed/Bmz67ErIRa4">https://www.youtube.com/embed/Bmz67ErIRa4</a></p>]]></content:encoded>
</item>



</channel>
</rss>
