<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Harsh Sharma</title>
    <description>The latest articles on DEV Community by Harsh Sharma (@ha7shu).</description>
    <link>https://dev.to/ha7shu</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1144765%2F0deae3f2-ac85-46d0-914b-69a52efca2b0.png</url>
      <title>DEV Community: Harsh Sharma</title>
      <link>https://dev.to/ha7shu</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ha7shu"/>
    <language>en</language>
    <item>
      <title>How to create a desktop entry in linux?</title>
      <dc:creator>Harsh Sharma</dc:creator>
      <pubDate>Fri, 25 Aug 2023 00:27:21 +0000</pubDate>
      <link>https://dev.to/ha7shu/how-to-create-a-desktop-entry-in-linux-23p9</link>
      <guid>https://dev.to/ha7shu/how-to-create-a-desktop-entry-in-linux-23p9</guid>
      <description>&lt;p&gt;If you use Linux, you might often find yourself using the terminal to run programs and scripts for your daily tasks. But it can be a bit of a hassle. Luckily, there's a alternative – creating something called a "Desktop Entry." A desktop entry lets you start programs from your start menu with just a few clicks. All you have to do is follow these simple steps, and you're good to go:&lt;/p&gt;

&lt;p&gt;To start with creating Desktop Entry for a program , you have to mess up with terminal for a while.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All the desktop entries have &lt;code&gt;.desktop&lt;/code&gt; as extension.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Create a new .desktop file
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Open your terminal or press &lt;code&gt;Ctrl+Alt+T&lt;/code&gt; &lt;/li&gt;
&lt;li&gt;Create a new desktop file using a text editor. You can use &lt;code&gt;nano&lt;/code&gt; or &lt;code&gt;vim&lt;/code&gt; or any text editor you like.&lt;/li&gt;
&lt;li&gt;The syntax of the command should be something like this :
```
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;vim application_name.desktop&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
### Define Entry Properties
- `[Desktop Entry]` - Every desktop entry starts with this keyword.
- `Name` : Name of the application.
- `Exec` : Path of the executable file.
- `Type` : Set it to `application`
- `Icon` : Path of the application logo.

### Add optional information
- `Comment` : A brief description of the application.
- `Categories` : Categories that describe the application(e.g., **Development**, **Office**)
- `Terminal` : Set it to `false` if the application doesn't require terminal.
- `StartupNotify` : Set it to `true` to show a notification when the application starts.

### Set permissions
- Make the `.desktop` file executable using the `chmod` command: 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;chmod +x application_name.desktop&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
### Move the file
- **For system-wide access** : Move the file from current directory to `/usr/share/applications`
- **For user-specific access** : Move the file from current directy to `~/.local/share/applications`

### Refresh Desktop Environment
- If needed, refresh the desktop environment.
 Typically the command to refresh desktop is : 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;sudo update-desktop-database&lt;/p&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
Finally, your `application_name.desktop` would look like this:
![Desktop Entry Properties](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nhcirbal53mzfkfbnonu.png)
And there you have it! By following these steps, you'll have your very own application shortcut in the start menu using the magic of .desktop files.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>linux</category>
      <category>desktop</category>
      <category>application</category>
    </item>
  </channel>
</rss>
