<?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>Linux on Idle Daylight</title><link>https://blog.kiserai.net/tags/linux/</link><description>Recent content in Linux on Idle Daylight</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Feb 2024 00:00:00 +0000</lastBuildDate><atom:link href="https://blog.kiserai.net/tags/linux/index.xml" rel="self" type="application/rss+xml"/><item><title>Elite Dangerous Hud Mod UI on Linux</title><link>https://blog.kiserai.net/posts/elite-dangerous-hud-mod-ui-on-linux/</link><pubDate>Wed, 21 Feb 2024 00:00:00 +0000</pubDate><guid>https://blog.kiserai.net/posts/elite-dangerous-hud-mod-ui-on-linux/</guid><description>&lt;p&gt;&lt;strong&gt;2025 update&lt;/strong&gt;: With the &lt;a href="https://github.com/BlueMystical/EDHM_UI/releases"&gt;release of version 3&lt;/a&gt;, none of the below is necessary.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;a href="https://bluemystical.github.io/edhm-api/"&gt;EDHM+UI&lt;/a&gt; is a tool that lets you change the colors and lighting of the HUD in Elite: Dangerous. Does it work on Linux? Yes!&lt;/p&gt;
&lt;p&gt;tl;dr: Install EDHM+UI in its &lt;em&gt;own&lt;/em&gt; WINE prefix, then point it at your E:D install.&lt;/p&gt;</description><content:encoded><![CDATA[<p><strong>2025 update</strong>: With the <a href="https://github.com/BlueMystical/EDHM_UI/releases">release of version 3</a>, none of the below is necessary.</p>
<hr>
<p><a href="https://bluemystical.github.io/edhm-api/">EDHM+UI</a> is a tool that lets you change the colors and lighting of the HUD in Elite: Dangerous.  Does it work on Linux? Yes!</p>
<p>tl;dr: Install EDHM+UI in its <em>own</em> WINE prefix, then point it at your E:D install.</p>
<p>Long version:</p>
<ol>
<li>Download the EDHM+UI installer (<code>EDHM_UI_Setup.msi</code>) from <a href="https://github.com/BlueMystical/EDHM_UI/releases/latest">GitHub</a>.</li>
<li>Choose a name for a new WINE prefix: <code>export WINEPREFIX=&quot;$HOME/.wine_edhmui&quot;</code></li>
<li>Initialize the prefix with: <code>wine wineboot</code></li>
<li>Install .NET to the prefix: <code>winetricks dotnet48</code>. This will take you through a couple installers. Just continue through any warnings the installers show.</li>
<li>Make sure the Windows version is set to one supported by EDHM+UI: <code>winetricks win10</code></li>
<li>Install EDHM+UI to the prefix (replace with the path to the .msi if it is not in the current folder): <code>wine msiexec /i ./EDHM_UI_Setup.msi</code></li>
<li>(Optional) Download an icon for a shortcut: <code>wget https://bluemystical.github.io/edhm-api/assets/img/logo.png -O &quot;${WINEPREFIX}/logo.png&quot;</code></li>
<li>Set up a .desktop file to put EDHM in your menu.  Create <code>~/.local/share/applications/edhm-ui.desktop</code> with a text editor and put the following in. Replace NAME with your username.</li>
</ol>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-sh" data-lang="sh"><span style="display:flex;"><span><span style="color:#f92672">[</span>Desktop Entry<span style="color:#f92672">]</span>
</span></span><span style="display:flex;"><span>Name<span style="color:#f92672">=</span>EDHM UI
</span></span><span style="display:flex;"><span>Comment<span style="color:#f92672">=</span>E:D HUD Mod UI
</span></span><span style="display:flex;"><span>Exec<span style="color:#f92672">=</span>env WINEDEBUG<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;-all&#34;</span> WINEPREFIX<span style="color:#f92672">=</span><span style="color:#e6db74">&#34;/home/NAME/.wine_edhmui&#34;</span> <span style="color:#e6db74">&#34;/home/NAME/.wine_edhmui/drive_c/users/NAME/AppData/Local/EDHM_UI/EDHM_UI_mk2.exe&#34;</span>
</span></span><span style="display:flex;"><span>Icon<span style="color:#f92672">=</span>/home/NAME/.wine_edhmui/logo.png
</span></span><span style="display:flex;"><span>Terminal<span style="color:#f92672">=</span>false
</span></span><span style="display:flex;"><span>Type<span style="color:#f92672">=</span>Application
</span></span><span style="display:flex;"><span>Categories<span style="color:#f92672">=</span>Game
</span></span></code></pre></div><ol start="8">
<li>Start EDHM+UI. Point it at your Elite Dangerous install(s). In the following picture it references my Steam install. You can likely find your install with: <code>find ~ -name elite-dangerous-odyssey-64</code>, but be sure to use the Windows-style path like I do, usually under <code>Z:\</code>. <strong>To make the box editable/browsable, CTRL+LEFT-CLICK the pi (π) symbol first.</strong>
<img alt="image" loading="lazy" src="https://dabor.kiserai.net/i/fcd388e2-095f-4c41-87ff-69676bae4246.jpg"></li>
<li>You can then use EDHM+UI like on Windows. Select a premade theme, tweak it, add third-party plugins, and apply it. And just like Windows, you can use a hotkey (F11 by default) to reload a changed theme <em>while the game is running</em>.</li>
</ol>
<p><strong>Note</strong>: I was getting frequent crashes from EDHM UI, but I was still able to apply a theme and add a third-party plugin.</p>
<hr>
<p>References:</p>
<ol>
<li><a href="https://discord.com/channels/773552741632180224/773553131568889916/1171209291856883773">EDHM+UI Discord MrVaad</a></li>
<li><a href="https://discord.com/channels/773552741632180224/773553131568889916/1016666369774858240">EDHM+UI Discord Thorned Rose</a></li>
<li><a href="https://github.com/BlueMystical/EDHM_UI/issues/36#issuecomment-1595329861">GitHub issue</a></li>
</ol>
<hr>
<p>Tested versions:</p>
<ul>
<li>Arch Linux as of 2024-02-19</li>
<li>wine 9.2-1</li>
<li>winetricks 20240105-1</li>
<li>EDHM+UI v2.2.19</li>
</ul>]]></content:encoded></item><item><title>Scheduled Game Save Backups With Ludusavi on Linux</title><link>https://blog.kiserai.net/posts/scheduled-game-save-backups-with-ludusavi-on-linux/</link><pubDate>Mon, 04 Dec 2023 00:00:00 +0000</pubDate><guid>https://blog.kiserai.net/posts/scheduled-game-save-backups-with-ludusavi-on-linux/</guid><description>&lt;p&gt;&lt;a href="https://github.com/mtkennerly/ludusavi"&gt;Ludusavi&lt;/a&gt; is a cross-platform tool for backing up game saves and configuration. Currently, it does not have a built-in way to schedule backups, but we can use system tools to do so instead. In the post, we will use &lt;strong&gt;systemd user timers&lt;/strong&gt;.&lt;/p&gt;</description><content:encoded><![CDATA[<p><a href="https://github.com/mtkennerly/ludusavi">Ludusavi</a> is a cross-platform tool for backing up game saves and configuration.  Currently, it does not have a built-in way to schedule backups, but we can use system tools to do so instead. In the post, we will use <strong>systemd user timers</strong>.</p>
<p>The following steps make a couple assumptions:</p>
<ol start="0">
<li>You are running Linux and using systemd</li>
<li>The ludusavi command is available at <code>/usr/bin/ludusavi</code>, which it is at least for the Arch Linux <a href="https://aur.archlinux.org/packages/ludusavi">AUR package</a>.  You may need to adjust it when using another distribution or package.</li>
<li>The timer is set to run daily, or 5-10 minutes after boot. You can <a href="https://www.freedesktop.org/software/systemd/man/latest/systemd.timer.html">adjust it if you want</a>.</li>
</ol>
<h2 id="steps">Steps</h2>
<p>1. Set Ludusavi up in the GUI as you wish. Test with the Preview and Back Up buttons.
2. Create a service with <code>systemctl edit --user --force --full ludusavi-backup.service</code> and put the following text in it:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#66d9ef">[Unit]</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">Description</span><span style="color:#f92672">=</span><span style="color:#e6db74">Back up game saves</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">After</span><span style="color:#f92672">=</span><span style="color:#e6db74">network.target</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[Service]</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">Type</span><span style="color:#f92672">=</span><span style="color:#e6db74">oneshot</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">ExecStart</span><span style="color:#f92672">=</span><span style="color:#e6db74">/usr/bin/ludusavi backup --force</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[Install]</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">WantedBy</span><span style="color:#f92672">=</span><span style="color:#e6db74">default.target</span>
</span></span></code></pre></div><p>3. Create a timer with <code>systemctl edit --user --force --full ludusavi-backup.timer</code> and put the following text in it:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-ini" data-lang="ini"><span style="display:flex;"><span><span style="color:#66d9ef">[Unit]</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">Description</span><span style="color:#f92672">=</span><span style="color:#e6db74">Back up game saves</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">RefuseManualStart</span><span style="color:#f92672">=</span><span style="color:#e6db74">no</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">RefuseManualStop</span><span style="color:#f92672">=</span><span style="color:#e6db74">no</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[Timer]</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">OnCalendar</span><span style="color:#f92672">=</span><span style="color:#e6db74">daily</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">RandomizedDelaySec</span><span style="color:#f92672">=</span><span style="color:#e6db74">5min</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">OnBootSec</span><span style="color:#f92672">=</span><span style="color:#e6db74">5min</span>
</span></span><span style="display:flex;"><span>
</span></span><span style="display:flex;"><span><span style="color:#66d9ef">[Install]</span>
</span></span><span style="display:flex;"><span><span style="color:#a6e22e">WantedBy</span><span style="color:#f92672">=</span><span style="color:#e6db74">timers.target</span>
</span></span></code></pre></div><p>4. Enable the timer and run the backup with: <code>systemctl --user enable --now ludusavi-backup.timer</code></p>
<h2 id="other-commands">Other Commands</h2>
<ul>
<li>List timers: <code>systemctl --user list-timers --all</code></li>
<li>Run a backup manually: <code>systemctl --user start ludusavi-backup.service</code></li>
<li>Check logs: <code>journalctl --user -u ludusavi-backup.service</code></li>
</ul>]]></content:encoded></item><item><title>Hardening Tailscale on Arch Linux With Polkit &gt;= 106</title><link>https://blog.kiserai.net/posts/hardening-tailscale-on-arch-linux-polkit-106/</link><pubDate>Tue, 24 Oct 2023 00:00:00 +0000</pubDate><guid>https://blog.kiserai.net/posts/hardening-tailscale-on-arch-linux-polkit-106/</guid><description>&lt;p&gt;&lt;a href="https://tailscale.com/"&gt;Tailscale&lt;/a&gt; is an easy and free service for creating your own mesh VPN, built on &lt;a href="https://www.wireguard.com/"&gt;Wireguard&lt;/a&gt; and easier to scale. Tailscale does provide &lt;a href="https://tailscale.com/kb/1279/security-node-hardening/"&gt;instructions&lt;/a&gt; for hardening it - reducing its privileges to the minimum necessary to run. However, the instructions don&amp;rsquo;t fully work for Linux distributions running &lt;a href="https://discourse.ubuntu.com/t/use-of-javascript-rules-in-polkit/13892"&gt;polkit &amp;gt;= 106&lt;/a&gt;, like Arch Linux.&lt;/p&gt;</description><content:encoded><![CDATA[<p><a href="https://tailscale.com/">Tailscale</a> is an easy and free service for creating your own mesh VPN, built on <a href="https://www.wireguard.com/">Wireguard</a> and easier to scale.  Tailscale does provide <a href="https://tailscale.com/kb/1279/security-node-hardening/">instructions</a> for hardening it - reducing its privileges to the minimum necessary to run.  However, the instructions don&rsquo;t fully work for Linux distributions running <a href="https://discourse.ubuntu.com/t/use-of-javascript-rules-in-polkit/13892">polkit &gt;= 106</a>, like Arch Linux.</p>
<h1 id="solution">Solution</h1>
<p>The solution I came up with is, instead of using the Tailscale-provided polkit configuration, create <code>/etc/polkit-1/rules.d/99-tailscaled-dns.rules</code> with the following content:</p>
<div class="highlight"><pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;-webkit-text-size-adjust:none;"><code class="language-javascript" data-lang="javascript"><span style="display:flex;"><span><span style="color:#a6e22e">polkit</span>.<span style="color:#a6e22e">addRule</span>(<span style="color:#66d9ef">function</span>(<span style="color:#a6e22e">action</span>, <span style="color:#a6e22e">subject</span>) {
</span></span><span style="display:flex;"><span>    <span style="color:#66d9ef">if</span> (<span style="color:#a6e22e">action</span>.<span style="color:#a6e22e">id</span>.<span style="color:#a6e22e">startsWith</span>(<span style="color:#e6db74">&#34;org.freedesktop.resolve1.&#34;</span>) <span style="color:#f92672">&amp;&amp;</span>
</span></span><span style="display:flex;"><span>        <span style="color:#a6e22e">subject</span>.<span style="color:#a6e22e">user</span> <span style="color:#f92672">==</span> <span style="color:#e6db74">&#34;tailscaled&#34;</span>)
</span></span><span style="display:flex;"><span>    {
</span></span><span style="display:flex;"><span>        <span style="color:#66d9ef">return</span> <span style="color:#a6e22e">polkit</span>.<span style="color:#a6e22e">Result</span>.<span style="color:#a6e22e">YES</span>;
</span></span><span style="display:flex;"><span>    }
</span></span><span style="display:flex;"><span>});
</span></span></code></pre></div><p>Then restart it with <code>sudo systemctl restart polkit.service</code> .</p>
<p>I have filed <a href="https://github.com/tailscale/tailscale/issues/9344">#9344</a> and hope the official documentation will be updated soon, as Ubuntu 23.10 and later have finally updated polkitd.</p>]]></content:encoded></item></channel></rss>