<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Gui on Notebook</title><link>http://blog.cmac4603.dev/tags/gui/</link><description>Recent content in Gui on Notebook</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Mon, 17 Aug 2026 21:37:22 +0100</lastBuildDate><atom:link href="http://blog.cmac4603.dev/tags/gui/index.xml" rel="self" type="application/rss+xml"/><item><title>Adding Environment Variables to Linux GUI Apps</title><link>http://blog.cmac4603.dev/posts/adding-environment-variables-to-linux-gui-apps/</link><pubDate>Mon, 17 Aug 2026 21:37:22 +0100</pubDate><guid>http://blog.cmac4603.dev/posts/adding-environment-variables-to-linux-gui-apps/</guid><description>&lt;p&gt;Find the app your looking for:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;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;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;sudo find / -type f -iname &lt;span style="color:#e6db74"&gt;&amp;#34;*myapp*&amp;#34;&lt;/span&gt;
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Edit the file:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;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;"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span style="display:flex;"&gt;&lt;span&gt;nvim /usr/share/applications/org.myapp.MyApp.desktop
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;You&amp;rsquo;ll want to look for the &lt;code&gt;Exec&lt;/code&gt; key, and prepend the env vars to the app command:&lt;/p&gt;
&lt;pre tabindex="0"&gt;&lt;code&gt;Exec=env MY_ENV_VAR=hello my-app-cmd %U
&lt;/code&gt;&lt;/pre&gt;</description></item></channel></rss>