Creating .desktop files
<p>
This is a quick tutorial on how to create
<code>
.desktop
</code>
files for
<code>
AppImage
</code>
programs so that you can have a shortcut in the activities panel, can pin it to the sidebar, etc, on
<a class="wikilink" href="/gnome/">
gnome
</a>
-based computers.
</p>
<p>
I use
<a class="wikilink" href="/zettlr/">
Zettlr
</a>
as an example, but it works with any other program.
</p>
<ol>
<li>
Create a file like zettlr.desktop in ~/.local/share/application with the following::
</li>
</ol>
<pre class="codehilite"><code>[Desktop Entry]
Type=Application
Name=Zettlr
Icon=/usr/share/icons/zettlr.png
Exec=/home/aquiles/Programs/Zettlr.AppImage
Terminal=false
StartupWMClass=zettlr
</code></pre>
<ol>
<li>
To know the StartupWMClass, you need to run
<code>
xprop WM_CLASS
</code>
and click on the window. This is very important, or Ubuntu fails at knowing that it is actually a window running
</li>
<li>
To extract the icon from man AppImage:
<code>
./Zettlr.AppImage --appimage-extract
</code>
Where to put it is not that important.
</li>
</ol>
<p>
Tags:
<a href="/tags/linux">
#linux
</a>
<a href="/tags/AppImage">
#AppImage
</a>
<a href="/tags/desktop-shortcuts">
#desktop-shortcuts
</a>
<a href="/tags/ubuntu">
#ubuntu
</a>
</p>
Comment
Share your thoughts on this note. Comments are not public, they are
messages sent directly to my inbox.