<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Desktop on DevOps OPf</title><link>https://buck.zone/en/tags/desktop/</link><description>Recent content in Desktop on DevOps OPf</description><generator>Hugo -- gohugo.io</generator><language>en</language><copyright>Daniel 'Tealk' Buck</copyright><lastBuildDate>Thu, 20 Mar 2025 00:00:00 +0000</lastBuildDate><atom:link href="https://buck.zone/en/tags/desktop/index.xml" rel="self" type="application/rss+xml"/><item><title>Set up autostart</title><link>https://buck.zone/en/p/set-up-autostart/</link><pubDate>Thu, 20 Mar 2025 00:00:00 +0000</pubDate><guid>https://buck.zone/en/p/set-up-autostart/</guid><description>&lt;p&gt;GNOME uses &lt;strong&gt;&lt;code&gt;.desktop&lt;/code&gt; files&lt;/strong&gt; to launch applications. If you want an application to start automatically when the system boots, you need to place a &lt;strong&gt;&lt;code&gt;.desktop&lt;/code&gt; file&lt;/strong&gt; in the &lt;code&gt;~/.config/autostart/&lt;/code&gt; directory. Follow these steps:&lt;/p&gt;
&lt;h2 id="create-the-directory-if-it-doesnt-exist"&gt;Create the Directory (if it doesn’t exist)
&lt;/h2&gt;&lt;p&gt;The directory &lt;code&gt;~/.config/autostart/&lt;/code&gt; is where GNOME looks for autostart files. If this directory doesn’t already exist, you can create it with the following command:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;mkdir -p ~/.config/autostart
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;The &lt;code&gt;-p&lt;/code&gt; flag ensures that the directory is created, even if parent directories are missing.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="copy-the-desktop-file"&gt;Copy the &lt;code&gt;.desktop&lt;/code&gt; File
&lt;/h2&gt;&lt;p&gt;Many applications already provide &lt;code&gt;.desktop&lt;/code&gt; files, which are located in the &lt;code&gt;/usr/share/applications/&lt;/code&gt; directory. These files contain all the necessary information to start the application. You can copy the &lt;code&gt;.desktop&lt;/code&gt; file of the desired application to the autostart directory:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp /usr/share/applications/&amp;lt;application&amp;gt;.desktop ~/.config/autostart/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Replace &lt;code&gt;&amp;lt;application&amp;gt;&lt;/code&gt; with the name of the desired application. For example, to start Firefox at boot, you would enter:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;cp /usr/share/applications/firefox.desktop ~/.config/autostart/
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;hr&gt;
&lt;h2 id="edit-the-desktop-file-optional"&gt;Edit the &lt;code&gt;.desktop&lt;/code&gt; File (Optional)
&lt;/h2&gt;&lt;p&gt;If you want to customize the startup parameters of the application, you can edit the copied &lt;code&gt;.desktop&lt;/code&gt; file using a text editor. For example, open the file with &lt;code&gt;nano&lt;/code&gt;:&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;div class="chroma"&gt;
&lt;table class="lntable"&gt;&lt;tr&gt;&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code&gt;&lt;span class="lnt"&gt;1
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;
&lt;td class="lntd"&gt;
&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;nano ~/.config/autostart/&amp;lt;application&amp;gt;.desktop
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;p&gt;Here, you can make changes like adding additional startup options or configuring the autostart for specific conditions. Be sure to save the file after editing.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id="test-the-autostart"&gt;Test the Autostart
&lt;/h2&gt;&lt;p&gt;To verify that the application starts automatically on the next boot, you can log out and log back in or restart the system. The application should now start automatically.&lt;/p&gt;</description></item></channel></rss>