<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
    <channel>
        <title>
            
                    linux on
                
            
            The Neo-Babbage Files</title>
        <link>https://babbagefiles.xyz/categories/linux/</link>
        <description>Recent content  in linux
            on The Neo-Babbage Files</description>
        <language>en-gb</language>
        
                <managingEditor>slade@lambda-y.net (Benjamin Slade)</managingEditor>
                <webMaster>slade@lambda-y.net (Benjamin Slade)</webMaster><lastBuildDate>Mon, 29 Dec 2025 11:00:32 +0000</lastBuildDate>
        <generator>Hugo -- gohugo.io</generator>
        <docs>https://validator.w3.org/feed/docs/rss2.html</docs>
            <atom:link href="https://babbagefiles.xyz/categories/linux/index.xml" rel="self" type="application/rss&#43;xml" />
        
            
            <item>
                <title>So you need kill (or do something else to) something in Linux</title>
                <link>https://babbagefiles.xyz/you-need-to-kill-or-do-something-in-linux/</link>
                
                
                <description>&lt;h2 id=&#34;or-what-if-you-can-t-just-click-the-bad-thing-with-the-skull-until-it-dies&#34;&gt;(Or, what if you can&amp;rsquo;t just click the bad thing with the skull until it dies?)&lt;/h2&gt;
&lt;p&gt;Sometimes you need to kill something in Linux. Sometimes it makes
sense to use some sort interactive process monitor, like the process
table in Plasma&amp;rsquo;s System Monitor, or &lt;code&gt;top&lt;/code&gt; or &lt;code&gt;htop&lt;/code&gt; or &lt;code&gt;bottom&lt;/code&gt; or some
other sort of top.&lt;sup id=&#34;fnref:1&#34;&gt;&lt;a href=&#34;#fn:1&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;1&lt;/a&gt;&lt;/sup&gt; (Or, if you&amp;rsquo;re in an X11 environment rather
than a Wayland one, you could use &lt;code&gt;xkill&lt;/code&gt;.&lt;sup id=&#34;fnref:2&#34;&gt;&lt;a href=&#34;#fn:2&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;2&lt;/a&gt;&lt;/sup&gt;)&lt;/p&gt;
&lt;h3 id=&#34;killing-with-killall&#34;&gt;killing with &lt;code&gt;killall&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;You can often get by with &lt;a href=&#34;https://en.wikipedia.org/wiki/Killall&#34;&gt;&lt;code&gt;killall&lt;/code&gt;&lt;/a&gt;, e.g., if you want to kill all
running Firefox applications:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;killall firefox
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;killing-with-pkill&#34;&gt;killing with &lt;code&gt;pkill&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;Or you could use &lt;a href=&#34;https://en.wikipedia.org/wiki/Pkill&#34;&gt;&lt;code&gt;pkill&lt;/code&gt;&lt;/a&gt; (which has a number of options) in much the
same way.&lt;/p&gt;
&lt;p&gt;These sorts of approaches don&amp;rsquo;t always work. Sometimes (this is true
in Guix&lt;sup id=&#34;fnref:3&#34;&gt;&lt;a href=&#34;#fn:3&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;3&lt;/a&gt;&lt;/sup&gt; a lot) processes are named in ways that &lt;code&gt;killall&lt;/code&gt; or &lt;code&gt;pkill&lt;/code&gt; don&amp;rsquo;t
match.&lt;/p&gt;
&lt;h3 id=&#34;listing-processes-and-process-ids-with-ps&#34;&gt;listing processes and process ids with &lt;code&gt;ps&lt;/code&gt;&lt;/h3&gt;
&lt;p&gt;You can list running processes in Linux with &lt;code&gt;ps -ef&lt;/code&gt;, and this will
show you all running processes. It&amp;rsquo;s too much, obviously, there are a
lot of things going on in your system. So, you can filter it by
&amp;ldquo;piping&amp;rdquo; the output of &lt;code&gt;ps -ef&lt;/code&gt; through &lt;a href=&#34;https://en.wikipedia.org/wiki/Grep&#34;&gt;&lt;code&gt;grep&lt;/code&gt;&lt;/a&gt;, e.g., &lt;code&gt;ps -ef | grep -i emacs&lt;/code&gt;, which might show you something like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;emacsomancer    &lt;span class=&#34;m&#34;&gt;15188&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 21:05 ?        00:00:02 /gnu/store/5vkx1cf1d2k9dj974vgd77yx0fdis284-emacs-pdf-tools-1.1.0/bin/epdfinfo
emacsomancer    &lt;span class=&#34;m&#34;&gt;23294&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 21:33 ?        00:00:00 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously nil)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;23550&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;2250&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 21:34 pts/4    00:00:00 grep --color&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;auto -i emacs
emacsomancer    &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;     &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt; 19:47 ?        00:05:42 /home/emacsomancer/.guix-home/profile/bin/emacs --daemon --debug-init
emacsomancer    &lt;span class=&#34;m&#34;&gt;26513&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:47 ?        00:00:03 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously t)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;26514&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:47 ?        00:00:02 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously t)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;26515&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:47 ?        00:00:02 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously t)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;26516&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:47 ?        00:00:01 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously t)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;26517&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:47 ?        00:00:02 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously t)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;26518&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:47 ?        00:00:02 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously t)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;26519&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:47 ?        00:00:01 /home/emacsomancer/.guix-home/profile/bin/emacs --quick --batch --load /home/emacsomancer/.emacs.d/eln-cache/30.0.93-e51375a4/el-job-child-8a892b0e-c7b5e3df.eln --eval &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;el-job-child--work &lt;span class=&#34;c1&#34;&gt;#&amp;#39;org-node-parser--collect-dangerously t)&lt;/span&gt;
emacsomancer    &lt;span class=&#34;m&#34;&gt;26750&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;23962&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:48 tty8     00:00:00 /home/emacsomancer/.guix-home/profile/bin/emacsclient -c
emacsomancer    &lt;span class=&#34;m&#34;&gt;26761&lt;/span&gt; &lt;span class=&#34;m&#34;&gt;23962&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;0&lt;/span&gt; 19:48 tty8     00:00:00 /home/emacsomancer/.guix-home/profile/bin/emacsclient -c -e &lt;span class=&#34;o&#34;&gt;(&lt;/span&gt;mu4e&lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Since you&amp;rsquo;ve piped &lt;code&gt;ps&lt;/code&gt; through &lt;code&gt;grep&lt;/code&gt;, you&amp;rsquo;re missing the explanatory
column headers row (because that row doesn&amp;rsquo;t contain the string &amp;ldquo;emacs&amp;rdquo;
and so has been filtered out by &lt;code&gt;grep&lt;/code&gt;), which are:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;UID        PID  PPID  C STIME TTY          TIME CMD
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;So, then, picking one of the entries above, let&amp;rsquo;s line them up:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;UID             PID    PPID  C STIME TTY      TIME     CMD
emacsomancer    &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;     &lt;span class=&#34;m&#34;&gt;1&lt;/span&gt;  &lt;span class=&#34;m&#34;&gt;5&lt;/span&gt; 19:47 ?        00:05:42 /home/emacsomancer/.guix-home/profile/bin/emacs --daemon --debug-init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The UID is just the name of &amp;ldquo;user&amp;rdquo; who executed the process (probably
you). The CMD is what the process actually is, which is important. The
other important piece here is the PID, which is the Process ID or
&lt;a href=&#34;https://en.wikipedia.org/wiki/Process_identifier&#34;&gt;Processor identifier&lt;/a&gt;, for with this you can have your system kill (or
do other things) to a very specific process (usually an application,
or a process it&amp;rsquo;s spun off). The other fields aren&amp;rsquo;t relevant for us
here.&lt;sup id=&#34;fnref:4&#34;&gt;&lt;a href=&#34;#fn:4&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;4&lt;/a&gt;&lt;/sup&gt;&lt;/p&gt;
&lt;h3 id=&#34;kill--or-how-to-kill-things-nicely&#34;&gt;&lt;code&gt;kill&lt;/code&gt; (or, how to kill things nicely)&lt;/h3&gt;
&lt;p&gt;With the PID, you can do various things with a process, such as
&lt;a href=&#34;https://en.wikipedia.org/wiki/Kill_(command)&#34;&gt;&lt;code&gt;kill&lt;/code&gt;&lt;/a&gt;. This could be a simple &lt;code&gt;kill 26384&lt;/code&gt; to kill the &lt;code&gt;emacs --daemon&lt;/code&gt;
process.&lt;/p&gt;
&lt;p&gt;Sometimes, processes don&amp;rsquo;t want to die and a simple &lt;code&gt;kill&lt;/code&gt; won&amp;rsquo;t work.
&lt;code&gt;kill&lt;/code&gt; is equivalent to &lt;code&gt;kill -TERM&lt;/code&gt; or &lt;code&gt;kill -15&lt;/code&gt;, which essentially nicely
ask the process to stop. This is often good, because if the process
has some sort of &amp;ldquo;exit things&amp;rdquo; it does, like saving backups of open
files, it will do those things first before stopping.&lt;/p&gt;
&lt;p&gt;But sometimes the reason you&amp;rsquo;re in the command line in the first place
is because a process is hung, and so the simple &lt;code&gt;kill&lt;/code&gt; won&amp;rsquo;t do any
good.&lt;/p&gt;
&lt;h3 id=&#34;kill-9--or-what-if-politely-killing-doesn-t-work&#34;&gt;&lt;code&gt;kill -9&lt;/code&gt; (or, what if politely killing doesn&amp;rsquo;t work)&lt;/h3&gt;
&lt;p&gt;In that case you can do &lt;code&gt;kill -9&lt;/code&gt;, which is &amp;ldquo;the unsafe way of brutally
murdering a process. It&amp;rsquo;s equivalent to pulling the power cord, and
may cause data corruption.&amp;quot;&lt;sup id=&#34;fnref:5&#34;&gt;&lt;a href=&#34;#fn:5&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;5&lt;/a&gt;&lt;/sup&gt; This often not what you want
to do, but is useful for when you need to force something to stop
immediately or when it&amp;rsquo;s not responding to polite &lt;code&gt;kill&lt;/code&gt;&#39;s. (Though
&lt;code&gt;kill -9&lt;/code&gt; / &lt;code&gt;SIGKILL&lt;/code&gt; won&amp;rsquo;t kill &lt;a href=&#34;https://en.wikipedia.org/wiki/Zombie_process&#34;&gt;zombies&lt;/a&gt;, because they&amp;rsquo;re dead already and
are just waiting for their parent processes to reap them.)&lt;/p&gt;
&lt;h3 id=&#34;advanced-pkill--or-what-if-there-are-too-many-things-to-kill-one-by-one&#34;&gt;Advanced &lt;code&gt;pkill&lt;/code&gt; (or, what if there are too many things to kill one by one?)&lt;/h3&gt;
&lt;p&gt;If you recall the &lt;code&gt;ps -ef | grep -i emacs&lt;/code&gt; output from above, there are
often a bunch of associated processes. I&amp;rsquo;ve often ended up having to
try to run &lt;code&gt;kill&lt;/code&gt; (or &lt;code&gt;kill -9&lt;/code&gt;) on a bunch of PIDs one by one until
finally the application shut down (cases where &lt;code&gt;killall&lt;/code&gt; didn&amp;rsquo;t work for
one reason or other).&lt;/p&gt;
&lt;p&gt;We can instead use our process lister (&lt;code&gt;ps -ef&lt;/code&gt;) with piping to
&lt;code&gt;pkill&lt;/code&gt;. E.g., like this in the case of killing all processes named
&amp;ldquo;emacs&amp;rdquo;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;ps -ef &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; pkill -f emacs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Careful, because, especially if the &amp;ldquo;name&amp;rdquo; is short, it might be a
substring of other running processes. (I.e., you probably &lt;strong&gt;don&amp;rsquo;t&lt;/strong&gt; want to
try something like &lt;code&gt;ps -ef | pkill -f e&lt;/code&gt;. It would kill &lt;code&gt;emacs --daemon&lt;/code&gt;,
true, but it would also kill any other process with an &lt;code&gt;e&lt;/code&gt; in it.)&lt;/p&gt;
&lt;p&gt;You can check first by piping &lt;code&gt;ps -ef&lt;/code&gt; through &lt;a href=&#34;https://en.wikipedia.org/wiki/Pgrep&#34;&gt;&lt;code&gt;pgrep&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;ps -ef &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; pgrep -l emacs &lt;span class=&#34;c1&#34;&gt;# show the list of all the processes (and their names) to be killed first&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;to see a list of the names of the processes that would be killed (for
our &lt;code&gt;emacs&lt;/code&gt; example).&lt;/p&gt;
&lt;p&gt;Or, if you need a bit more information, do instead:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;ps -ef &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; pgrep -a emacs &lt;span class=&#34;c1&#34;&gt;# show the list of all the processes (and their full command line, not just name) to be killed first&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;to see the full command line (including but not limited to the
process&amp;rsquo;s name).&lt;/p&gt;
&lt;p&gt;And, just like &lt;code&gt;kill&lt;/code&gt; above, &lt;code&gt;pkill&lt;/code&gt; is by default the &amp;ldquo;polite kill&amp;rdquo;. If
you&amp;rsquo;re dealing with stubborn processes, you can add a &lt;code&gt;-9&lt;/code&gt; to order
&lt;code&gt;SIGKILL&lt;/code&gt;, e.g.:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;ps -ef &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; pkill -9 -f emacs
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(If you had a completely hung Emacs, say.)&lt;/p&gt;
&lt;h2 id=&#34;what-if-you-need-to-do-something-other-than-killing-a-bunch-of-things&#34;&gt;What if you need to do something other than killing a bunch of things?&lt;/h2&gt;
&lt;p&gt;This is all well and good if all you need to do is &lt;code&gt;kill&lt;/code&gt;, but sometimes
there are other things to do.&lt;/p&gt;
&lt;p&gt;For instance, I finally got &lt;a href=&#34;https://en.wikipedia.org/wiki/Mullvad&#34;&gt;Mullvad VPN&lt;/a&gt;&amp;lsquo;s own &lt;a href=&#34;https://github.com/mullvad/mullvadvpn-app&#34;&gt;graphical client&lt;/a&gt; to work
on Guix,&lt;sup id=&#34;fnref:6&#34;&gt;&lt;a href=&#34;#fn:6&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;6&lt;/a&gt;&lt;/sup&gt; but for some reason the graphical interface &lt;a href=&#34;https://en.wikipedia.org/wiki/Split_tunneling&#34;&gt;split
tunnelling&lt;/a&gt; doesn&amp;rsquo;t work for me on Guix (usually the Mullvad interface
would allow you open a specific application outside of the VPN tunnel
(i.e. on your regular connection)). Fortunately, Mullvad also has
a command-line interface and one can add currently running
applications to be excluded from the VPN tunnel (this is also useful
even if your Mullvad GUI split-tunnelling is working for not having to
shut down and re-open applications if you want them excluded from your
VPN tunnel). But it does it by PID, e.g.:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;mullvad split-tunnel add &lt;span class=&#34;m&#34;&gt;26384&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(if we were excluding the &lt;code&gt;emacs --daemon&lt;/code&gt; PID from the above example
from the VPN tunnel, say.)&lt;/p&gt;
&lt;p&gt;One of the obvious things one might want to exclude from a VPN tunnel
is a particular browser (e.g., there&amp;rsquo;s a site that doesn&amp;rsquo;t like the
VPN, so you open up a second browser outside of the VPN to use to
access that site).&lt;/p&gt;
&lt;p&gt;But browsers often involve a number of processes, and I found myself
having to manually run the &lt;code&gt;mullvad split-tunnel add&lt;/code&gt; command on ten
different PIDs, and check mullvad.net each time to see if that was the
one I needed or not.&lt;/p&gt;
&lt;p&gt;This is both time-consuming and frustrating and, just like &lt;code&gt;kill&lt;/code&gt;&#39;ing, we
can instead do it at scale.&lt;/p&gt;
&lt;p&gt;Now, the &lt;code&gt;mullvad split-tunnel&lt;/code&gt; command itself doesn&amp;rsquo;t have a built-in
facility to either add processes by name or more than one in a single
shot, but we can write a loop over a list of PIDs and have the loop
execute &lt;code&gt;mullvad split tunnel add ...&lt;/code&gt; for each one.&lt;/p&gt;
&lt;p&gt;In &lt;a href=&#34;https://en.wikipedia.org/wiki/Bash_(Unix_shell)&#34;&gt;Bash&lt;/a&gt; (&amp;ldquo;the Bourne Again SHell&amp;rdquo;), if you wanted to exclude Firefox
from the Mullvad VPN tunnel, you could do:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; pid in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;pgrep -u &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;id -u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; -f &lt;span class=&#34;s2&#34;&gt;&amp;#34;firefox&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt; mullvad split-tunnel add &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Just like for &lt;code&gt;pkill&lt;/code&gt;, you can double-check before what would be added
to the tunnel exclusion by doing one of:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;ps -ef &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; pgrep -l firefox &lt;span class=&#34;c1&#34;&gt;# show the list of all the processes (and their names) to be killed first&lt;/span&gt;
ps -ef &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; pgrep -a firefox &lt;span class=&#34;c1&#34;&gt;# show the list of all the processes (and their full command line, not just name) to be killed first&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you&amp;rsquo;re using &lt;a href=&#34;https://fishshell.com&#34;&gt;Fish shell&lt;/a&gt; (&amp;ldquo;FInally, a command line SHell for the
90s&amp;rdquo;), instead of the Bash line above, you would use:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; pid in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;pgrep -u &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;id -u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; -f &lt;span class=&#34;s2&#34;&gt;&amp;#34;firefox&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; mullvad split-tunnel add &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;;&lt;/span&gt; end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;h3 id=&#34;but-what-if-you-don-t-want-to-remember-arcane-incantations&#34;&gt;But what if you don&amp;rsquo;t want to remember arcane incantations?&lt;/h3&gt;
&lt;p&gt;I don&amp;rsquo;t, or, well, won&amp;rsquo;t. I can probably find it in my shell history
once I&amp;rsquo;ve run it on a machine, but we can do better than that.&lt;/p&gt;
&lt;p&gt;We can instead add a function to the shell.&lt;/p&gt;
&lt;p&gt;For Bash, you would add to your &lt;code&gt;~/.bash_profile&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-split-tunnel-by-name&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; pid in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;pgrep -u &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;id -u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -f &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
      mullvad split-tunnel add &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
      &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;added to split tunnel: %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $1}&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(You don&amp;rsquo;t need the &lt;code&gt;printf&lt;/code&gt; bit if you don&amp;rsquo;t want, but this way you&amp;rsquo;ll see a
proper list of the names of all of the excluded processes, which the
&lt;code&gt;mullvad split-tunnel add&lt;/code&gt; command doesn&amp;rsquo;t do by itself.)&lt;/p&gt;
&lt;p&gt;Then (once your &lt;code&gt;.bash_profile&lt;/code&gt; is &lt;code&gt;source&lt;/code&gt;&#39;ed)&lt;sup id=&#34;fnref:7&#34;&gt;&lt;a href=&#34;#fn:7&#34; class=&#34;footnote-ref&#34; role=&#34;doc-noteref&#34;&gt;7&lt;/a&gt;&lt;/sup&gt;, you could just
enter the following in the terminal to have all &lt;code&gt;firefox&lt;/code&gt; processes
excluded from the Mullvad VPN tunnel:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;mullvad-split-tunnel-by-name firefox
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(You can choose a shorter name for your function than
&lt;code&gt;mullvad-split-tunnel-by-name&lt;/code&gt; of course, but for me such is fine with
TAB completion.)&lt;/p&gt;
&lt;p&gt;And similarly for other things you wanted to exclude from the VPN
tunnel (e.g., &lt;code&gt;mullvad-split-tunnel-by-name chromium&lt;/code&gt;).&lt;/p&gt;
&lt;p&gt;For Fish, you would add a new file to your &lt;code&gt;~/.config/fish/functions/&lt;/code&gt;
directory (say
&lt;code&gt;~/.config/fish/functions/mullvad-functions.fish&lt;/code&gt;) with the
following content:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-split-tunnel-by-name --description &lt;span class=&#34;s1&#34;&gt;&amp;#39;adds all matching instances to mullvads split tunnel&amp;#39;&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; pid in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;pgrep -u &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;id -u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; -f &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
      mullvad split-tunnel add &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
      &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;added to split tunnel: %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $1}&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
  end
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(Again, the &lt;code&gt;printf&lt;/code&gt; line is optional. And again you should &lt;code&gt;source&lt;/code&gt; it or
restart your shell.)&lt;/p&gt;
&lt;h4 id=&#34;a-couple-of-other-useful-mullvad-split-tunnel-functions&#34;&gt;A couple of other useful mullvad split-tunnel functions&lt;/h4&gt;
&lt;p&gt;These can be defined in similar fashion to the above
&lt;code&gt;mullvad-split-tunnel-by-name&lt;/code&gt;: one for removing things from the VPN
excluded list, and for one for showing what&amp;rsquo;s currently on the list by
name. (since &lt;code&gt;mullvad split-tunnel list&lt;/code&gt; just spits back a list of raw
PIDs, which isn&amp;rsquo;t very helpful for identifying what&amp;rsquo;s actually being
split tunnelled&amp;hellip;.)&lt;/p&gt;
&lt;!--list-separator--&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;removing processes from exclude list&lt;/p&gt;
&lt;p&gt;Like &lt;code&gt;mullvad-split-tunnel-by-name&lt;/code&gt;, but for removing excluded processes
(i.e., re-including them in VPN tunnel):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;In Bash:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-remove-process-by-name&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
   &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; pid in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;pgrep -u &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;id -u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -f &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$1&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
   &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
       mullvad split-tunnel delete &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
       &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;removed from split tunnel: %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $1}&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
   &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In Fish:&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
 &lt;!--listend--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-remove-process-by-name --description &lt;span class=&#34;s1&#34;&gt;&amp;#39;remove all matching instances to mullvads split tunnel&amp;#39;&lt;/span&gt;
  &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; pid in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;pgrep -u &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;id -u&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; -f &lt;span class=&#34;nv&#34;&gt;$argv&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
      mullvad split-tunnel delete &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
      &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;removed from split tunnel: %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;nv&#34;&gt;$pid&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;|&lt;/span&gt; awk &lt;span class=&#34;s1&#34;&gt;&amp;#39;{print $1}&amp;#39;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
  end
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;!--list-separator--&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;listing processes in exclude list by name rather than PID&lt;/p&gt;
&lt;p&gt;Checking on what&amp;rsquo;s currently split out from the VPN tunnel: this
provide a listing of processes currently excluded from the VPN tunnel
by name (in a couple of options):&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;In Bash:&lt;/li&gt;
&lt;/ul&gt;
 &lt;!--listend--&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;&lt;span class=&#34;c1&#34;&gt;# list full command line info associated with each PID in list&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-list-excluded-processes-by-long-name&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;mullvad split-tunnel list&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
    &lt;span class=&#34;nv&#34;&gt;mvre&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;^[0-9]+$&amp;#39;&lt;/span&gt;
    &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Processes excluded from VPN tunnel:\n\n&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; key in &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;!mullvad_vpn_exclude_array[@]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;  &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;~ &lt;span class=&#34;nv&#34;&gt;$mvre&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
            &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;PID %s = %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;

&lt;span class=&#34;c1&#34;&gt;# list just process name info associated with each PID in list&lt;/span&gt;
&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-list-excluded-processes-by-short-name&lt;span class=&#34;o&#34;&gt;()&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;{&lt;/span&gt;
    &lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=(&lt;/span&gt; &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;mullvad split-tunnel list&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;)&lt;/span&gt;
    &lt;span class=&#34;nv&#34;&gt;mvre&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;s1&#34;&gt;&amp;#39;^[0-9]+$&amp;#39;&lt;/span&gt;
    &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Processes excluded from VPN tunnel:\n\n&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; key in &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;!mullvad_vpn_exclude_array[@]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;do&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt;  &lt;span class=&#34;o&#34;&gt;[[&lt;/span&gt; &lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;~ &lt;span class=&#34;nv&#34;&gt;$mvre&lt;/span&gt; &lt;span class=&#34;o&#34;&gt;]]&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;then&lt;/span&gt;
            &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;PID %s = %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;${&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;mullvad_vpn_exclude_array&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;[&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;]&lt;/span&gt;&lt;span class=&#34;si&#34;&gt;}&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;comm&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;fi&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;done&lt;/span&gt;
&lt;span class=&#34;o&#34;&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;Similarly for Fish:
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-list-excluded-processes-by-long-name --description &lt;span class=&#34;s1&#34;&gt;&amp;#39;lists excluded processes in mullvads split tunnel by long command name&amp;#39;&lt;/span&gt;
    &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Processes excluded from VPN tunnel:\n&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; key in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;mullvad split-tunnel list&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; string match -qr &lt;span class=&#34;s1&#34;&gt;&amp;#39;^[0-9]+$&amp;#39;&lt;/span&gt; -- &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
             &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;PID %s: %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;command&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        end
    end
end

&lt;span class=&#34;k&#34;&gt;function&lt;/span&gt; mullvad-list-excluded-processes-by-short-name --description &lt;span class=&#34;s1&#34;&gt;&amp;#39;lists excluded processes in mullvads split tunnel by short process name&amp;#39;&lt;/span&gt;
    &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;Processes excluded from VPN tunnel:&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;k&#34;&gt;for&lt;/span&gt; key in &lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;mullvad split-tunnel list&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;
        &lt;span class=&#34;k&#34;&gt;if&lt;/span&gt; string match -qr &lt;span class=&#34;s1&#34;&gt;&amp;#39;^[0-9]+$&amp;#39;&lt;/span&gt; -- &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
             &lt;span class=&#34;nb&#34;&gt;printf&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;PID %s: %s\n&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt; &lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;$(&lt;/span&gt;ps -p &lt;span class=&#34;nv&#34;&gt;$key&lt;/span&gt; -o &lt;span class=&#34;nv&#34;&gt;comm&lt;/span&gt;&lt;span class=&#34;o&#34;&gt;=&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;)&lt;/span&gt;&lt;span class=&#34;s2&#34;&gt;&amp;#34;&lt;/span&gt;
        end
    end
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;beyond-tunnelling-and-killing&#34;&gt;Beyond tunnelling and killing&lt;/h2&gt;
&lt;p&gt;These techniques — including defining various named speciality
functions (in whatever shell) — could obviously be adapted for other
similar cases of wanting to run a command on multiple processes
sharing (all or part of) a name, whenever you find you&amp;rsquo;re tired of
wasting time manually mucking about with heaps of PIDs.&lt;/p&gt;
&lt;section class=&#34;footnotes&#34; role=&#34;doc-endnotes&#34;&gt;
&lt;hr&gt;
&lt;ol&gt;
&lt;li id=&#34;fn:1&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;For list of good Linux system &lt;code&gt;top&lt;/code&gt;&#39;s and related, see, e.g.,
&lt;a href=&#34;https://github.com/luong-komorebi/Awesome-Linux-Software#system-info--monitoring&#34;&gt;https://github.com/luong-komorebi/Awesome-Linux-Software#system-info--monitoring&lt;/a&gt; &lt;a href=&#34;#fnref:1&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:2&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;The &lt;a href=&#34;https://en.wikipedia.org/wiki/Xkill&#34;&gt;Wikipedia page&lt;/a&gt; for &lt;code&gt;xkill&lt;/code&gt; notes: &amp;lsquo;Xkill has been cited as
an example of a program with a simple and appealing user
interface. Its mode of operation has been summed up as &amp;ldquo;Just click the
bad thing with the skull and it dies.&amp;quot;&amp;rsquo; &lt;a href=&#34;#fnref:2&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:3&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;A Scheme-based package manager+Linux distribution (&lt;a href=&#34;https://en.wikipedia.org/wiki/GNU_Guix&#34;&gt;Wikipedia:
Guix&lt;/a&gt;). See elsewhere on this blog: &lt;a href=&#34;https://babbagefiles.xyz/categories/guix/&#34;&gt;#guix&lt;/a&gt;. &lt;a href=&#34;#fnref:3&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:4&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;The PPID is the Process ID of parent process. You can see that
the PID we&amp;rsquo;re looking at here is &lt;code&gt;26384&lt;/code&gt;, if you look at the longer list
of the output of &lt;code&gt;ps -ef | grep -i emacs&lt;/code&gt; above, you can see that this
is the PPID of a number of the other listed processes, because they
were started by this &lt;code&gt;emacs --daemon&lt;/code&gt; process. (—which itself has a PPID
of &lt;code&gt;1&lt;/code&gt; because I started it from the terminal myself, and that seems to
count as being started by Process 1, the first process started during
the booting of the system, which is usually the &lt;a href=&#34;https://en.wikipedia.org/wiki/Init&#34;&gt;init system&lt;/a&gt;,
presumably because it&amp;rsquo;s the ancestor of all other processes and
&amp;ldquo;adopts&amp;rdquo; any &amp;ldquo;orphaned&amp;rdquo; or otherwise apparently unsupervised
processes.) &lt;a href=&#34;#fnref:4&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:5&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;Quote from:
&lt;a href=&#34;https://stackoverflow.com/a/43725403/570251&#34;&gt;https://stackoverflow.com/a/43725403/570251&lt;/a&gt;. &lt;code&gt;-9&lt;/code&gt; is equivalent to
&lt;code&gt;-SIGKILL&lt;/code&gt;, on which see &lt;a href=&#34;https://en.wikipedia.org/wiki/Signal_(IPC)#SIGKILL&#34;&gt;here&lt;/a&gt;, whereas the plain &lt;code&gt;kill&lt;/code&gt; or &lt;code&gt;kill -15&lt;/code&gt; is
&lt;code&gt;-SIGTERM&lt;/code&gt;, on which see &lt;a href=&#34;https://en.wikipedia.org/wiki/Signal_(IPC)#SIGTERM&#34;&gt;here&lt;/a&gt;. &lt;a href=&#34;#fnref:5&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:6&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;A working package definition for the Mullvad VPN desktop
client on Guix is &lt;a href=&#34;https://gitlab.com/emacsomancer/guix-awesomejit/-/blob/main/awesomejit/packages/mullvad.scm&#34;&gt;here&lt;/a&gt;. Using Mullvad on Guix has been a longtime
bugbear for me — so much so that I once wrote my frontend for it in
Common Lisp: &lt;a href=&#34;https://gitlab.com/emacsomancer/volemad&#34;&gt;Volemad&lt;/a&gt;. &lt;a href=&#34;#fnref:6&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li id=&#34;fn:7&#34; role=&#34;doc-endnote&#34;&gt;
&lt;p&gt;I.e., &lt;code&gt;source ~/.bash_profile&lt;/code&gt;. &lt;a href=&#34;#fnref:7&#34; class=&#34;footnote-backref&#34; role=&#34;doc-backlink&#34;&gt;&amp;#x21a9;&amp;#xfe0e;&lt;/a&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/section&gt;
</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/linux">linux</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/shell">shell</category>
                                
                            
                        
                     
                        
                     
                        
                    
                
                <guid>https://babbagefiles.xyz/you-need-to-kill-or-do-something-in-linux/</guid>
                <pubDate>Sat, 15 Feb 2025 23:02:00 -0600</pubDate>
            </item>
        
            
            <item>
                <title>Dealing with possessed TrackPoints on later model ThinkPads</title>
                <link>https://babbagefiles.xyz/possessed-trackpoint/</link>
                
                
                <description>&lt;p&gt;On a new-to-me ThinkPad T440p, I&amp;rsquo;ve had the worst time with the
TrackPoint.&lt;/p&gt;
&lt;p&gt;First, the stock configuration has a horrible touchpad -
which shouldn&amp;rsquo;t matter if you don&amp;rsquo;t use the touchpad, but the
horribleness of it is that the physical buttons that should be on the
top of the touchpad, and are on the touchpads of models preceding and
following the **40 line, are not there. But one &lt;a href=&#34;https://octoperf.com/blog/2018/11/07/thinkpad-t440p-buyers-guide/#trackpad&#34;&gt;can replace it&lt;/a&gt;, and so
I did.&lt;/p&gt;
&lt;p&gt;The T440p is nice in that servicing the fan and other internals of the
machine is a relatively easy affair compared to say an X230. Just undo
two screws on the bottom of the laptop and slide off the back panel,
and you have access to memory, drives, the CPU, and so on. And so
swapping in a different CPU was really easy and painless.&lt;/p&gt;
&lt;p&gt;On the other hand, changing the touchpad was a very involved
affair. But it &lt;a href=&#34;https://www.youtube.com/watch?v=7wM4Kqdy3_E&#34;&gt;can be done&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;However, still the mouse-cursor experience for the machine continued
to be horrible. Firstly, there was significant &amp;ldquo;drift&amp;rdquo; of the
TrackPoint. I.e., even once pressure is released, it keeps moving, for
a long time.&lt;/p&gt;
&lt;p&gt;However, this ends up being solvable via&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;sudo -s &lt;span class=&#34;nb&#34;&gt;echo&lt;/span&gt;  &lt;span class=&#34;s1&#34;&gt;&amp;#39;ACTION==&amp;#34;add&amp;#34;,SUBSYSTEM==&amp;#34;input&amp;#34;,ATTR{name}==&amp;#34;TPPS/2 IBM TrackPoint&amp;#34;,ATTR{device/drift_time}=&amp;#34;30&amp;#34;&amp;#39;&lt;/span&gt;  &amp;gt; /etc/udev/rules.d/10-trackpoint.rules
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(If you&amp;rsquo;re trying to do this in Guix, something like:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scheme&#34; data-lang=&#34;scheme&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;define &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;%trackpoint-drift-rule&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;udev-rule&lt;/span&gt;
    &lt;span class=&#34;s&#34;&gt;&amp;#34;10-trackpoint.rules&amp;#34;&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;string-append &lt;/span&gt;&lt;span class=&#34;s&#34;&gt;&amp;#34;ACTION==\&amp;#34;add\&amp;#34;,SUBSYSTEM==\&amp;#34;input\&amp;#34;,ATTR{name}==\&amp;#34;TPPS/2 IBM TrackPoint\&amp;#34;,ATTR{device/drift_time}=\&amp;#34;25\&amp;#34;&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scheme&#34; data-lang=&#34;scheme&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;k&#34;&gt;define &lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;%my-desktop-services&lt;/span&gt;
   &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;cons &lt;/span&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;udev-rules-service&lt;/span&gt; &lt;span class=&#34;ss&#34;&gt;&amp;#39;trackpoint-drift&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;%trackpoint-drift-rule&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
         &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;modify-services&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;%desktop-services&lt;/span&gt;
                          &lt;span class=&#34;o&#34;&gt;....&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;c1&#34;&gt;; other modifications here&lt;/span&gt;
         &lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scheme&#34; data-lang=&#34;scheme&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;operating-system&lt;/span&gt;
  &lt;span class=&#34;o&#34;&gt;....&lt;/span&gt;
  &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;services&lt;/span&gt;
    &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;append&lt;/span&gt;
     &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;list&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;service&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;openssh-service-type&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;service&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;cups-service-type&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
      &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;service&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;nix-service-type&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
      &lt;span class=&#34;o&#34;&gt;....&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
     &lt;span class=&#34;nv&#34;&gt;%my-desktop-services&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
  &lt;span class=&#34;o&#34;&gt;....&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;instead.)&lt;/p&gt;
&lt;p&gt;But, unfortunately, this doesn&amp;rsquo;t solve what is actually the most horrible issue:
the mouse cursor sometimes, when in use, just teleports around the edges
of the screen and starts randomly clicking on things.&lt;/p&gt;
&lt;p&gt;I finally turned up some discussion of this issue (though not for the
T440p specifically) at: &lt;a href=&#34;https://bugzilla.kernel.org/show_bug.cgi?format=multiple&amp;amp;id=209167&#34;&gt;https://bugzilla.kernel.org/show_bug.cgi?format=multiple&amp;amp;id=209167&lt;/a&gt;
(The discussion suggests that it should somehow be solved in the
kernel, but that is not my experience, even running kernel 5.17.13.)&lt;/p&gt;
&lt;p&gt;And found that adding &lt;code&gt;psmouse.proto=imps&lt;/code&gt; to the kernel arguments and
disabling the touchpad in the stock BIOS solves the &amp;ldquo;possessed mouse
cursor&amp;rdquo; issue. For better or worse, it seem to make the TrackPoint be
detected as a generic PS/2 mouse. Which means that &lt;code&gt;drift_time&lt;/code&gt; can no
longer be set, and I do get a little bit of drift from time to time,
but it&amp;rsquo;s not too bad and certainly is far less maddening than the
&amp;ldquo;possessed mouse cursor&amp;rdquo; behaviour.&lt;/p&gt;
&lt;p&gt;For Guix, the way to implement this is something along the lines of:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-scheme&#34; data-lang=&#34;scheme&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;operating-system&lt;/span&gt;
 &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;
 &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;kernel-arguments&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nf&#34;&gt;cons*&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;modprobe.blacklist=pcspkr,snd_pcsp&amp;#34;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;psmouse.proto=imps&amp;#34;&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;acpi_osi=Linux&amp;#34;&lt;/span&gt; &lt;span class=&#34;nv&#34;&gt;%default-kernel-arguments&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;))&lt;/span&gt;
 &lt;span class=&#34;o&#34;&gt;...&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;(The other kernel arguments are simply the other ones I use, and are
not directly connected with this issue.)&lt;/p&gt;
&lt;p&gt;Depending on the model of ThinkPad and/or the environment, using
&lt;code&gt;psmouse.proto=bare&lt;/code&gt; instead may work better (see discussion at:
&lt;a href=&#34;https://www.reddit.com/r/thinkpad/comments/v7vn0o/thinkpad_t440p_trackpoint_occasionally_going_crazy/icjkk0o/&#34;&gt;https://www.reddit.com/r/thinkpad/comments/v7vn0o/thinkpad_t440p_trackpoint_occasionally_going_crazy/icjkk0o/&lt;/a&gt;
).&lt;/p&gt;
&lt;p&gt;So, perhaps not an entirely satisfactory solution, this impish
exorcism, but better than alternatives.&lt;/p&gt;
</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/thinkpad">thinkpad</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/linux">linux</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/guix">guix</category>
                                
                            
                        
                     
                        
                     
                        
                    
                
                <guid>https://babbagefiles.xyz/possessed-trackpoint/</guid>
                <pubDate>Sat, 18 Jun 2022 19:51:00 -0600</pubDate>
            </item>
        
            
            <item>
                <title>Guix, Nix: You are in a maze of twisty little $PATHs, some undefined</title>
                <link>https://babbagefiles.xyz/guix-nix-maze-of-twisty-little-paths-undefined/</link>
                
                
                <description>&lt;p&gt;Some notes on interactive fiction/text adventure games and PATHs in
Guix, and StumpWM.&lt;/p&gt;
&lt;h2 id=&#34;maze-no-dot-1&#34;&gt;Maze no. 1&lt;/h2&gt;
&lt;p&gt;There may (likely is) some way of programmatically setting the X
Windows PATH variable in Guix System (née GuixSD) via the base
configuration (e.g. &lt;code&gt;config.scm&lt;/code&gt;), but I haven&amp;rsquo;t been able to uncover
anything that works. This is relevant for being able to use locally
installed static binaries or local shell scripts via the window
manager.&lt;/p&gt;
&lt;p&gt;As a window-manager-specific workaround, in StumpWM, one can
programmatically set PATH variables via &lt;code&gt;(setf (getenv &amp;quot;VARIABLE_NAME&amp;quot;) &amp;quot;variable-value&amp;quot;)&lt;/code&gt;. Thus, if you store local static
binaries and shell scripts in &lt;code&gt;~/bin&lt;/code&gt;, the following (which you could
include in StumpWM&amp;rsquo;s &lt;code&gt;init.lisp&lt;/code&gt;) will add that to your PATH variable:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setf&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;PATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;concat&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;/home/YOURUSERNAME/bin:&amp;#34;&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;PATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;I use this with a static Haskell binary &lt;a href=&#34;https://github.com/erebe/greenclip&#34;&gt;greenclip&lt;/a&gt;, which adds clipboard
functionality to &lt;a href=&#34;https://github.com/davatorium/rofi/&#34;&gt;rofi&lt;/a&gt;, and with shell scripts that give &amp;ldquo;pretty names&amp;rdquo;
to Flatpak run commands.&lt;/p&gt;
&lt;p&gt;For example, the literate/natural-language-based programming
interactive fiction design language &lt;a href=&#34;http://inform7.com/&#34;&gt;Inform7&lt;/a&gt; (which is due to be
&lt;a href=&#34;http://inform7.com/talks/2019/06/14/narrascope.html&#34;&gt;open-sourced sometime this year&lt;/a&gt;) is now conveniently &lt;a href=&#34;https://flathub.org/apps/details/com.inform7.IDE&#34;&gt;available as a
Flatpak&lt;/a&gt;. But the run command after installing is &lt;code&gt;flatpak run com.inform7.IDE&lt;/code&gt;, which is non-ideal. So I made a simple shell script
named &lt;code&gt;inform7&lt;/code&gt; placed in &lt;code&gt;~/bin&lt;/code&gt;:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-shell&#34; data-lang=&#34;shell&#34;&gt;&lt;span class=&#34;cp&#34;&gt;#!/bin/sh
&lt;/span&gt;&lt;span class=&#34;cp&#34;&gt;&lt;/span&gt;flatpak run com.inform7.IDE
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;


&lt;figure&gt;
    
        &lt;img src=&#34;https://babbagefiles.xyz/ox-hugo/inform7-guix.png&#34;/&gt; &lt;/figure&gt;

&lt;h2 id=&#34;maze-no-dot-2&#34;&gt;Maze no. 2&lt;/h2&gt;
&lt;p&gt;&lt;a href=&#34;https://nixos.org/&#34;&gt;Nix&lt;/a&gt; can be &lt;a href=&#34;https://nixos.org/releases/nix/nix-1.9/manual/#ch-installing-binary&#34;&gt;installed as a standalone package manage on top of other
distros&lt;/a&gt;, including Guix System, which is useful for be able to obtain
software currently lacking in Guix System (including, ironically,
&lt;a href=&#34;https://en.wikipedia.org/wiki/Hugo_(software)&#34;&gt;Hugo&lt;/a&gt;, used by this blog, which is present in Nix). Packages available
in Nix but not in Guix include &lt;a href=&#34;http://ccxvii.net/gargoyle/&#34;&gt;Gargoyle&lt;/a&gt;, a very nice interactive
fiction front-end client that supports a number of different backends,
including Frotz and Glulxe. One of the benefits of Gargoyle is that it
&amp;ldquo;cares about typography&amp;rdquo;. However, Nix applications by default seem to
have trouble finding/seeing fonts, including system fonts, local
fonts, and even fonts installed via Nix.&lt;/p&gt;
&lt;p&gt;This can be fixed by (1) setting the &lt;code&gt;FONTCONFIG_PATH&lt;/code&gt; and
&lt;code&gt;FONTCONFIG_FILE&lt;/code&gt;, e.g. in StumpWM this can be done with:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre class=&#34;chroma&#34;&gt;&lt;code class=&#34;language-lisp&#34; data-lang=&#34;lisp&#34;&gt;&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setf&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;FONTCONFIG_PATH&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;/home/YOURUSERNAME/.config/fontconfig/&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nb&#34;&gt;setf&lt;/span&gt; &lt;span class=&#34;p&#34;&gt;(&lt;/span&gt;&lt;span class=&#34;nv&#34;&gt;getenv&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;FONTCONFIG_FILE&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt; &lt;span class=&#34;s&#34;&gt;&amp;#34;fonts.conf&amp;#34;&lt;/span&gt;&lt;span class=&#34;p&#34;&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;And (2) forcing Nix to look in the right places by manual
specification in &lt;code&gt;~/.config/fontconfig/fonts.conf&lt;/code&gt;, adding right
before the final &lt;code&gt;&amp;lt;/fontconfig&amp;gt;&lt;/code&gt; (as appropriate):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-nil&#34; data-lang=&#34;nil&#34;&gt;&amp;lt;cachedir prefix=&amp;quot;xdg&amp;quot;&amp;gt;fontconfig&amp;lt;/cachedir&amp;gt;
&amp;lt;dir&amp;gt;/home/YOURUSERNAME/.local/share/fonts/&amp;lt;/dir&amp;gt;
&amp;lt;dir&amp;gt;/home/YOURUSERNAME/.nix-profile/share/fonts/&amp;lt;/dir&amp;gt;
&amp;lt;dir&amp;gt;/home/YOURUSERNAME/.guix-profile/share/fonts/&amp;lt;/dir&amp;gt;
&amp;lt;dir&amp;gt;/usr/share/fonts&amp;lt;/dir&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;And regenerating the font cache (via &lt;code&gt;fc-cache -fv&lt;/code&gt;) [possibly you may
need to install Nix&amp;rsquo;s &lt;code&gt;fontconfig&lt;/code&gt; package].&lt;/p&gt;



&lt;figure&gt;
    
        &lt;img src=&#34;https://babbagefiles.xyz/ox-hugo/counterfeit-gargoyle-screenshot.png&#34;/&gt; &lt;/figure&gt;

</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/lisp">lisp</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/guix">guix</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/linux">linux</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/stumpwm">stumpwm</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/intfic">intfic</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/fonts">fonts</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/inform">inform</category>
                                
                            
                        
                     
                        
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/tags/nix">nix</category>
                                 
                                    <category domain="https://babbagefiles.xyz/tags/gargoyle">gargoyle</category>
                                
                            
                        
                    
                
                <guid>https://babbagefiles.xyz/guix-nix-maze-of-twisty-little-paths-undefined/</guid>
                <pubDate>Wed, 24 Jul 2019 00:48:00 -0600</pubDate>
            </item>
        
            
            <item>
                <title>Semi-automated installation of Void Linux on pure ZFS with full LUKS disk encryption</title>
                <link>https://babbagefiles.xyz/full-zfs-full-luks-on-void-linux/</link>
                
                
                <description>&lt;p&gt;After spending too much time repeatedly trying to set up a Void Linux
installation using &amp;lsquo;pure ZFS&amp;rsquo; and full-disk LUKS encryption, I ended
up writing up a set of BASH scripts to automate (and, effectively,
document) the installation process, and prevent me from forgetting
steps along the way. There&amp;rsquo;s quite a number of potential stumbling
block along the way (such as &lt;code&gt;grub-probe&lt;/code&gt; not knowing how to properly
find the root drive) which I figured out ways around, as well as
discovering that Void&amp;rsquo;s &lt;code&gt;zfs-0.8.0&lt;/code&gt; package was
&lt;a href=&#34;https://github.com/void-linux/void-packages/issues/12465&#34;&gt;missing a
&lt;code&gt;python3&lt;/code&gt; dependency which caused ZFS DKMS builds to fail&lt;/a&gt;.&lt;/p&gt;



&lt;figure&gt;
    
        
            &lt;img src=&#34;https://gitlab.com/emacsomancer/full-zfs-and-full-luks-encryption-on-void-linux/raw/master/misc/void-on-zfs.png&#34; alt=&#34;Void Linux on ZFS&#34; width=&#34;300&#34;/&gt; &lt;/figure&gt;

&lt;p&gt;The scripts are more or less automated if you&amp;rsquo;re installing in a
particular fashion. They&amp;rsquo;ll ask for user input along the way for
configuring/customising certain things.  What isn&amp;rsquo;t covered is a setup
with multiple vdevs or UEFI or musl, but if you want these things
you&amp;rsquo;ll probably be able to patch the scripts accordingly and perhaps
these options could be accommodated in a future version.&lt;/p&gt;
&lt;p&gt;The scripts live here:
&lt;a href=&#34;https://gitlab.com/emacsomancer/full-zfs-and-full-luks-encryption-on-void-linux&#34;&gt;https://gitlab.com/emacsomancer/full-zfs-and-full-luks-encryption-on-void-linux&lt;/a&gt;
, where you&amp;rsquo;ll find additional instructions and information.&lt;/p&gt;
&lt;p&gt;(I do recommend using the &lt;a href=&#34;https://ubuntu.com/download/desktop&#34;&gt;Ubuntu Live ISO&lt;/a&gt; as your installer &amp;lsquo;host&amp;rsquo; for
ease and reduction of the installation time: the &amp;lsquo;host&amp;rsquo; for the
installation doesn&amp;rsquo;t really matter: basically it&amp;rsquo;s just being used to
run the initial &lt;code&gt;cryptsetup&lt;/code&gt; for the LUKS partition and initial ZFS
pool creation and the host for the Void chroot. The Ubuntu Live CD has
ZFS baked in, so you don&amp;rsquo;t have to wait twice(!) for DKMS to build ZFS
modules.)&lt;/p&gt;
&lt;p&gt;Using ZFS for the entire system, from &lt;code&gt;/&lt;/code&gt; to &lt;code&gt;/home&lt;/code&gt; to &lt;code&gt;/boot&lt;/code&gt; also
has the advantage of not requiring you to decide how much space to
allocation ahead of time. With &lt;code&gt;/boot&lt;/code&gt; on a separate partition, I&amp;rsquo;ve
sometimes encountered issues of running out of space on &lt;code&gt;/boot&lt;/code&gt;
because of maintaining multiple kernels, or else having to massively
overshoot in terms of how much space to give to &lt;code&gt;/boot&lt;/code&gt;. A full ZFS
install avoids this issue, &lt;strong&gt;and&lt;/strong&gt; allows for easy snapshots of the
&lt;code&gt;/boot&lt;/code&gt; directory.&lt;/p&gt;
&lt;p&gt;ZFS is a great file-system if you care about your data. ZFS is most
impressive file-system, and it has a number of other wonderful
features aside from data-integrity, and once you&amp;rsquo;re used to it, you&amp;rsquo;ll
want it everywhere.  For instance, the &amp;lsquo;default&amp;rsquo; lz4 compression is
effectively &amp;lsquo;free&amp;rsquo;, in terms of CPU usage (minor CPU hit for dealing
with compression is offset by the need to process smaller chunks of
data), and can be significant: on my root dataset
(&lt;code&gt;dozer/ROOT/system&lt;/code&gt;) I&amp;rsquo;m currently getting 1.79x compression: so 22.7G
of logical data is written in 13.6G, and even my dataset full of PDFs
has a more modest 1.03x compression ratio, but this means I save over
3G.&lt;/p&gt;
&lt;p&gt;ZFS 0.8.0 also brings with it native encryption. I&amp;rsquo;ve not chosen to
use this at the moment, as LUKS makes a full-disk setup easier at
this point, but native encryption could be used in conjunction with
LUKS encryption (potentially useful if, say, you want to backup up
particular ZFS datasets to a remote and not entirely trusted
machine:– natively encrypted ZFS snapshots can be sent without
decrypting the data).&lt;/p&gt;
&lt;p&gt;All of these various features, such as compression and encryption can
be enabled per dataset, which allows for great flexibility. After
suffering bit rot, which filtered through and rendered pointless my
carefully maintained versioned backups, I really don&amp;rsquo;t like trusting
my data to any other file-system.&lt;/p&gt;
</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/zfs">zfs</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/linux">linux</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/automation">automation</category>
                                
                            
                        
                     
                        
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/tags/encryption">encryption</category>
                                 
                                    <category domain="https://babbagefiles.xyz/tags/luks">luks</category>
                                
                            
                        
                    
                
                <guid>https://babbagefiles.xyz/full-zfs-full-luks-on-void-linux/</guid>
                <pubDate>Mon, 17 Jun 2019 15:53:01 -0600</pubDate>
            </item>
        
            
            <item>
                <title>Guix: You are in a maze of lispy little passages, (map equal? ′(′all ′alike) ′(′all ′alike))</title>
                <link>https://babbagefiles.xyz/guix_maze_of_lispy_little_passages/</link>
                
                
                <description>&lt;p&gt;So I finally made a serious go of running &lt;a href=&#34;https://www.gnu.org/software/guix/&#34;&gt;GuixSD&lt;/a&gt;, a GNU Linux distro
which is largely built on &lt;a href=&#34;https://en.wikipedia.org/wiki/GNU_Guile&#34;&gt;GNU Guile Scheme&lt;/a&gt; (a dialect of Lisp) on one
of my machines (one I had actually put together with GuixSD in mind:
an X200 Thinkpad, which I &lt;a href=&#34;https://libreboot.org/&#34;&gt;Libreboot&lt;/a&gt;&amp;lsquo;ed and put a Atheros Wi-Fi card
in), and, to increase both the quantity and variety of Lisps involved,
am trying to use with &lt;a href=&#34;https://stumpwm.github.io/&#34;&gt;StumpWM&lt;/a&gt; (which is written in Common Lisp).&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s a fascinating distro, modelled on &lt;a href=&#34;https://nixos.org/&#34;&gt;Nix&lt;/a&gt;, but implemented in
Guile. It&amp;rsquo;s not been exactly easy to get running (&lt;a href=&#34;https://www.gnu.org/software/guix/blog/2017/back-from-fosdem-2017/&#34;&gt;one of the videos on
GuixSD from Fosdem 2017&lt;/a&gt; included the line &amp;ldquo;[GuixSD] is like Gentoo for
grown ups&amp;rdquo;), in part because its architecture is rather different from what
I&amp;rsquo;ve experienced with other Linux distros, which use different package
managers perhaps and sometimes even different libc&amp;rsquo;s, but generally
follow a similar design philosophy. Rather than spreading out
configuration across lots of different pieces, GuixSD seems to largely
try to concentrate it in specific configuration files which are
transactional in that they can be rolled back (and thus the system can
be rolled back to known working states).&lt;/p&gt;
&lt;p&gt;It is a GNU-blessed distro, and does take the FSF&amp;rsquo;s hard line (and to
my eyes sometimes weird line) approach to software. So no proprietary
software is included in the Guix repos, including firmware (and it
runs on the linux-libre kernel). That by itself is fine, but it means
the state of affairs for Guix-packaged browsers is pretty poor. No
Chromium, no Firefox. IceCat 52 is essentially what&amp;rsquo;s currently
available (if IceCat were up to the latest Firefox ESR 60, it might be
easier) in terms of browsers which might be considered secure.&lt;/p&gt;
&lt;p&gt;This led me to try to use the Nix installer by itself&lt;sup&gt;&lt;a href=&#34;#org-target--0b&#34;&gt;*&lt;/a&gt;&lt;/sup&gt;&lt;span class=&#34;org-target&#34; id=&#34;org-target--0t&#34;&gt;&lt;/span&gt; to try to
install Firefox and Chromium. Sadly, I can&amp;rsquo;t get Nix&amp;rsquo;s Chromium to
work at all on GuixSD, and while Firefox works fine, I can&amp;rsquo;t get it to
see my locally installed fonts (or other fonts I&amp;rsquo;ve installed via
Nix).&lt;/p&gt;
&lt;p&gt;Hopefully at some point &lt;a href=&#34;http://next-browser.com/&#34;&gt;Next Browser&lt;/a&gt; will be packaged for Guix, to
bring in another major component written in (Common) Lisp. And when
(if?) IceCat 60 comes out, that will alleviate the pain somewhat. (I
was a long-time &lt;a href=&#34;http://conkeror.org/&#34;&gt;Conkeror&lt;/a&gt; user, and I briefly tried it again in GuixSD,
but I&amp;rsquo;m not certain of its security and uBlock Origin no long works
with it, which I believe is why I stopped using it in the first
place).&lt;/p&gt;
&lt;p&gt;Other interesting Lispy pieces include &lt;a href=&#34;https://www.gnu.org/software/mcron/&#34;&gt;mcron&lt;/a&gt;, a cron which accepts (as
well as Vixie cron style, I think) Guile config files. The &lt;a href=&#34;https://www.gnu.org/software/guix/manual/en/html_node/Scheduled-Job-Execution.html&#34;&gt;examples in
Guix manual&lt;/a&gt; I couldn&amp;rsquo;t really get to work. But via the &lt;code&gt;help-guix&lt;/code&gt;
listserv I found that one can put simple guile scripts in
&lt;code&gt;~/.config/cron/job.guile&lt;/code&gt;. Working out how to do a &amp;lsquo;run this every N
minutes&amp;rsquo; was not immediately obvious, but I figured out how to do it,
e.g.:&lt;/p&gt;
&lt;pre&gt;&lt;code class=&#34;language-guile&#34; data-lang=&#34;guile&#34;&gt;; execute run_me every 5 minutes
(job &#39;(next-minute (range 0 60 5)) &amp;quot;run_me&amp;quot;)
; run execute_me every 2 hours
(job &#39;(next-hour (range 0 24 2)) &amp;quot;execute_me&amp;quot;)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;One of the other great things about GuixSD is that its init manager,
&lt;a href=&#34;https://www.gnu.org/software/shepherd/&#34;&gt;GNU Shepherd&lt;/a&gt;, is also written in Guile Scheme. I&amp;rsquo;ve only had a chance
to play with it a little bit, but it seems very nice and it&amp;rsquo;s good to
find other innovative init managers (I would mention here also &lt;a href=&#34;http://smarden.org/runit/&#34;&gt;runit&lt;/a&gt;
and &lt;a href=&#34;https://skarnet.org/software/s6/&#34;&gt;s6&lt;/a&gt;) which take very different approaches to &lt;a href=&#34;https://www.freedesktop.org/wiki/Software/systemd/&#34;&gt;systemd&lt;/a&gt; (another
innovative init, or perhaps init+, but one that creates more problems
than it solves in the end, in my experience).&lt;/p&gt;
&lt;p&gt;On the Guix package manager itself: I learned the hard way that
searching for packages in Guix is really only comfortable within
Emacs: so do &lt;code&gt;guix package -i guix-emacs&lt;/code&gt; and then do everything else
from guix-emacs within Emacs ( &lt;code&gt;M-x guix-search-by-name&lt;/code&gt; to search
package names by regex; and &lt;code&gt;M-x guix-search-by-regex&lt;/code&gt; to search
names+descriptions by regex). The results returned by &lt;code&gt;guix package -s ....&lt;/code&gt; in a terminal are not very browseable (though I tried valiantly
for some time). But if you&amp;rsquo;re interested in Guix, you&amp;rsquo;ll likely
interested in Emacs anyway.&lt;/p&gt;
&lt;p&gt;What I&amp;rsquo;m trying to build on this machine is something with lots of
Lisp. Of course the kernel is still a kernel written in C, as are lots
of the other pieces like the terminal &amp;amp;c., but much of the user-facing
things: the package manager, the windows manager, the init, the job
scheduler (=cron), and (most importantly perhaps) the &amp;lsquo;text editor&amp;rsquo;
(read: document composer, email interface, irc interface, twitter
interface, blog post interface, code editor &amp;hellip;) are all largely
written in and interacted with using some form of Lisp (Guile Scheme,
Common Lisp, Emacs Lisp).&lt;/p&gt;
&lt;p&gt;Guix is a bit like Emacs, I think. It&amp;rsquo;s an incredibly powerful tool
with lots of interesting possibilities, but when you start using it
you&amp;rsquo;re presented with an empty screen with little indication of what
you can do. I&amp;rsquo;ll be sticking with it, I think. Now I&amp;rsquo;ve got to get to
grips with StumpWM and figure out how to configure &lt;a href=&#34;https://github.com/jaagr/polybar&#34;&gt;polybar&lt;/a&gt;&amp;hellip;&lt;/p&gt;
&lt;p&gt;[And if you&amp;rsquo;re curious about why Guix is pronounced like &amp;ldquo;geeks&amp;rdquo;, have
a look at &lt;a href=&#34;https://slade.jnanam.net/post/scheming-french-geeks-with-guile/&#34;&gt;this post over on my linguistics blog&lt;/a&gt;.]&lt;/p&gt;
&lt;p&gt;&lt;a href=&#34;#org-target--0t&#34;&gt;*&lt;/a&gt;&lt;span class=&#34;org-target&#34; id=&#34;org-target--0b&#34;&gt;&lt;/span&gt; As well as being the package managers of both of their
respective distros, both the Nix and Guix package managers can be used
&lt;strong&gt;on top of&lt;/strong&gt; other distros. Nix doesn&amp;rsquo;t have quite the same hard line
approach to software licences as Guix.&lt;/p&gt;
</description>
                
                        <author>Benjamin.Slade@fakeEmailToMakeValidatorHappy.com (Benjamin Slade)</author>
                
                     
                        
                             
                            
                                
                                 
                                    <category domain="https://babbagefiles.xyz/categories/lisp">lisp</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/guix">guix</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/linux">linux</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/stumpwm">stumpwm</category>
                                 
                                    <category domain="https://babbagefiles.xyz/categories/emacs">emacs</category>
                                
                            
                        
                     
                        
                     
                        
                    
                
                <guid>https://babbagefiles.xyz/guix_maze_of_lispy_little_passages/</guid>
                <pubDate>Sat, 04 Aug 2018 21:47:00 -0500</pubDate>
            </item>
        
    </channel>
</rss>


