<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>hi, it&#39;s mike</title>
    <link>https://mike.puddingtime.org/tags/pdxtst/</link>
    <description>Recent content on hi, it&#39;s mike</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    <managingEditor>mike@puddingtime.org (mike)</managingEditor>
    <webMaster>mike@puddingtime.org (mike)</webMaster>
    <copyright>© 2026, mike</copyright>
    <lastBuildDate>Sun, 14 Jan 2024 00:00:00 +0000</lastBuildDate>
    <atom:link href="https://mike.puddingtime.org/tags/pdxtst/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Daily Notes for 2024-01-14</title>
      <link>https://mike.puddingtime.org/posts/2024-01-14-daily-notes/</link>
      <pubDate>Sun, 14 Jan 2024 00:00:00 +0000</pubDate><author>mike@puddingtime.org (mike)</author>
      <guid>https://mike.puddingtime.org/posts/2024-01-14-daily-notes/</guid>
      <description>Junction, xdg-open, mutt, and html attachments. Launching Chrome directly into a profile.</description>
      <content:encoded><![CDATA[<h2 id="pdxtst">#pdxtst</h2>
<p>Wow, yesterday was nerve-wracking. Listening to the wind howl wasn&rsquo;t great before we lost power, and it was awful after we did around 2:30 in the afternoon. Plus there are all the things that start making noise once the power is out, like the UPS and smoke detectors. And because of the extreme cold, one of the motorcycle disc locks started going off every ten minutes or so until I went out and got it loose and brought it inside to thaw.</p>
<p>Due to whatever local peculiarities in the grid, we could look out any window and see lights on around us after the sun went down, and when the Portland General map was willing to load we could see the outage reports disappearing all around us until we were part of a little island clustered around the neighborhood park.</p>
<p>Power outages aren&rsquo;t rare in this neighborhood. I think before this one we&rsquo;ve never gone more than eight hours or so. This time the lights stayed out until 5:30. It got down to 44 in the house overnight, and would have been worse if not for the gas fireplace holding the line until we went to bed.</p>
<p>Anyhow &hellip; no, it wasn&rsquo;t great, but it was also not life in the RV across the street, or a tent a block away. We could still sleep in a bed, keep the phones charged, or take one of several friends up on an offer to come over if we needed to.</p>
<h2 id="junction-xdg-open-mutt-and-html-mail">Junction, xdg-open, mutt and HTML mail</h2>
<p>The whole &ldquo;I want to use a plaintext mail client on a GUI desktop thing&rdquo; has been messy for a super long time. Excavating my mutt mailcap, I can see a bunch of swings at it going back 15 years. I thiiiink I might have finally figured out a setup that&rsquo;s still got a few rough edges but seems stable.</p>
<p>I&rsquo;ve got <a href="https://github.com/sonnyp/Junction">Junction</a> installed from a flatpak, and I&rsquo;ve got it set as the default browser (in GNOME that&rsquo;s <code>Settings -&gt; Default Apps -&gt; Web</code>), and as the default for the HTML file type (<code>xdg-mime default re.sonny.Junction.desktop text/html</code>).</p>
<p>In my <code>~/.mutt/mailcap</code> I&rsquo;ve got:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">text/html; xdg-open %s &amp;&gt; /dev/null &amp;; nametemplate=%s.html
</span></span><span class="line"><span class="cl">application/*; xdg-open %s &amp;&gt; /dev/null &amp;;
</span></span><span class="line"><span class="cl">image/*; xdg-open %s &amp;&gt; /dev/null &amp;;</span></span></code></pre></div>
<p>mutt defaults to the plaintext version of a message when I open it, but I can tap <code>v</code> and select the <code>text/html</code> part to bring up Junction.</p>
<p>I tried living with <a href="https://w3m.sourceforge.net/">w3m</a> as my default text-mode browser for reading HTML mail inline, but once I started counting the number of times I went ahead and bailed to a GUI browser I realized it&rsquo;s not a great experience. So I just let it display the plaintext version first, which is usually more readable than whatever w3m is going to render.</p>
<p>I also tried using Firefox as my default GUI browser for HTML mail, but I use Firefox for personal stuff and Chrome for work stuff, so it&rsquo;s helpful to open an HTML mail in the browser that&rsquo;ll have the right cookies.</p>
<p>So the net of it is:</p>
<ul>
<li>Junction can grab links from apps and pop up a selector, so a link from work Slack can open in Chrome and a link from a personal email can open in Firefox.</li>
<li>Junction can send HTML mail to a chosen browser.</li>
</ul>
<h2 id="making-chrome-profiles-available-from-gnome-launcher-and-junction">Making Chrome profiles available from GNOME launcher and Junction</h2>
<p>When launched from Junction or the GNOME launcher Google Chrome will launch with a profile selector, which is fine: I have two profiles, but usually only use the work-related one. So as a matter of curiosity I wanted to see if I could get Junction to offer profiles instead of a generic Chrome icon. You just need to make <code>.desktop</code> files for each profile and tell Chrome the directory to launch from.</p>
<p>Running from Flatpak as I do, I don&rsquo;t think Chrome&rsquo;s quite &ldquo;normal&rdquo; so I made data directories for each of my profiles and then made a pair of <code>.desktop</code> files. They look like this:</p>






<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-fallback" data-lang="fallback"><span class="line"><span class="cl">[Desktop Entry]
</span></span><span class="line"><span class="cl">Version=1.0
</span></span><span class="line"><span class="cl">Name=Personal Chrome
</span></span><span class="line"><span class="cl"># Only KDE 4 seems to use GenericName, so we reuse the KDE strings.
</span></span><span class="line"><span class="cl"># From Ubuntu&#39;s language-pack-kde-XX-base packages, version 9.04-20090413.
</span></span><span class="line"><span class="cl">GenericName=Web Browser
</span></span><span class="line"><span class="cl"># Gnome and KDE 3 uses Comment.
</span></span><span class="line"><span class="cl">Comment=Access the Internet
</span></span><span class="line"><span class="cl">Exec= flatpak run com.google.Chrome %U --user-data-dir=/home/mph/.config/google-chrome/pdxmph
</span></span><span class="line"><span class="cl">StartupNotify=true
</span></span><span class="line"><span class="cl">Terminal=false
</span></span><span class="line"><span class="cl">Icon=/home/mph/.local/share/icons/google-chrome.png
</span></span><span class="line"><span class="cl">Type=Application
</span></span><span class="line"><span class="cl">Categories=Network;WebBrowser;
</span></span><span class="line"><span class="cl">MimeType=application/pdf;application/rdf+xml;application/rss+xml;application/xhtml+xml;application/xhtml_xml;application/xml;image/gif;image/jpeg;image/png;image/webp;text/html;text/xml;x-scheme-handler/ftp;x-scheme-handler/http;x-scheme-handler/https;
</span></span><span class="line"><span class="cl">Actions=new-window;new-private-window;
</span></span><span class="line"><span class="cl">
</span></span><span class="line"><span class="cl">[Desktop Action new-window]
</span></span><span class="line"><span class="cl">Name=New Window
</span></span><span class="line"><span class="cl">Exec= flatpak run com.google.Chrome %U --user-data-dir=/home/mph/.config/google-chrome/pdxmph
</span></span><span class="line"><span class="cl">[Desktop Action new-private-window]
</span></span><span class="line"><span class="cl">Name=New Incognito Window
</span></span><span class="line"><span class="cl">Exec= flatpak run com.google.Chrome %U --user-data-dir=/home/mph/.config/google-chrome/pdxmph</span></span></code></pre></div>
<p>The &ldquo;Exec&rdquo; lines are the pertinent ones.</p>
<p>Once set up, and after running  <code>update-desktop-database ~/.local/share/applications</code>, Junction will pick them up as a pair of distinct browsers.</p>
<p>It&rsquo;s a little hacky, and I think if you are running Chrome from outside Flatpak your approach will vary &ndash; there may be proper data directories in your <code>.config</code> hierarchy somewhere.</p>
<h2 id="vampire-survivors">Vampire Survivors</h2>
<p>Still playing. When you get to the late levels (approaching 100) or late into the round (approaching 30 minutes) and your weapons and powerups are maxed, it is almost psychedelic: Just thousands of creatures all running into this whirling, swirling vortex of destruction. The sound of all the weapons and powerups and exploding bad guys reminds me of being in the slots section of a busy casino.</p>
]]></content:encoded>
    </item>
  </channel>
</rss>
