Desktop file Linux

If you use Ubuntu 19.04 or GNOME 3.32, you the . desktop file may not launch at all. You should right click on the . desktop file and select “Allow Launching”.

How do I open a desktop file in Terminal?

For example, to change into the Desktop directory type cd Desktop . Now type pwd to confirm you are within the Desktop directory and ls to view the files and folders on your Desktop.

Where do I put desktop files in Ubuntu?

Alternatively, you can place your . desktop file at /usr/share/applications/ or at ~/. local/share/applications/. After moving your file there, search for it in the Dash (Windows key -> type the name of the application) and drag and drop it to the Unity Launcher.

How do I open a file system in Ubuntu?

Accessing the File Manager from the Files icon in the Ubuntu Dock/Activities panel. The File Manager opens in your Home folder by default. In Ubuntu you can open your required folder by double-clicking it, or by choosing one of the options from the right-click menu: Open.

How do I open Ubuntu desktop?

Use the arrow key to scroll down the list and find Ubuntu desktop. Use the Space key to select it, press Tab to select OK at the bottom, then press Enter. The system will install the software and reboot, giving you a graphical login screen generated by your default display manager. In our case, it’s SLiM.

How do I open a desktop file?

To open a file:

  1. Find the file on your computer and double-click it. This will open the file in its default application. …
  2. Open the application, then use the application to open the file. Once the application is open, you can go to the File menu at the top of the window and select Open.

How do I open a desktop file in Linux?

Adding desktop shortcut in Ubuntu

  1. Step 1: Locate the . desktop files of applications. Go to Files -> Other Location -> Computer. …
  2. Step 2: Copy the . desktop file to desktop. …
  3. Step 3: Run the desktop file. When you do that, you should see a text file kind of icon on the desktop instead of the logo of the application.

29 окт. 2020 г.

Where do you put desktop files?

desktop files, are generally a combination of meta information resources and a shortcut of an application. These files usually reside in /usr/share/applications/ or /usr/local/share/applications/ for applications installed system-wide, or ~/. local/share/applications/ for user-specific applications.

How do I put an app on my desktop?

Touch and hold the app, then lift your finger. If the app has shortcuts, you’ll get a list. Touch and hold the shortcut. Slide the shortcut to where you want it.…

Add to Home screens


GNOME 2.2 Desktop on Linux System Administration Guide

  • Previous: Vfolders and Menus
  • Next: Directory Entry Files

A desktop entry file is a data file that provides information about an item in a menu. The desktop entry file specifies the details for the item such as a name, a command to run, an icon, and so on. The desktop entry file also contains keywords which determine the location of the item in the menu hierarchy. Desktop entry files have a .desktop file extension.

The following is a sample desktop entry file:

[Desktop Entry] Encoding=UTF-8 Name=Calculator Comment=Perform calculations Exec=gcalctool Icon=gcalctool.png Terminal=false Type=Application Categories=GNOME;Application;Utility; X-GNOME-DocPath=gcalctool/gcalctool.xml

Table 2–3 describes the most important keys in desktop entry files.

Table 2–3 Desktop Entry Keys

Desktop Entry Key 

Description 

Encoding

Specifies the encoding of the desktop entry file.  

Name

Specifies the name of the item. This name is displayed on the item in the menu.  

Comment

Specifies a short description of the item. The comment is displayed as a tooltip when you point to the item in the menu.  

Exec

Specifies a command to execute when you choose the item from the menu.  

Icon

Specifies the filename of an icon that represents the item. Does not specify the path to the filename, or the file extension.  

Terminal

Specifies whether the command in the Exec key runs in a terminal window. If the value is true the command runs in a terminal window.

If the command does not create a window in which to run, the value of this key must be true.

Type

Specifies the type of item. This value is one of the following:  

  • Application: Enter this option for an item that starts an application.

  • Link: Enter this option for an item that links to a file, folder, or FTP site.

Categories

Specifies the keywords that describe the item. The keywords are separated with semicolons (;). To see a list of the standard category keywords, see the desktop menu specification at the following URL:  

http://www.freedesktop.org

The vfolder information files map the keywords to menus. 

X-GNOME-DocPath

Specifies the help file to display when you choose Help on application-name from the menu item popup menu.

For more information on the keys in desktop entry files, see the desktop entry specification at the following URL:

http://www.freedesktop.org Note –

Panel launchers and desktop objects also use desktop entry files. The desktop entry files for launchers and desktop objects provide the same information as for items in a menu. For example, the desktop entry files provide the command to run when a user chooses the launcher or object.

  • Previous: Vfolders and Menus
  • Next: Directory Entry Files

In this quick tutorial, you’ll learn how to add application shortcuts on desktop in Ubuntu and other distributions that use GNOME desktop.

A classic desktop operating systems always have icons on the ‘desktop screen’. These desktop icons could include the file manager, the trash bin and the shortcut to applications.

While installing applications in Windows, some of the programs ask if you want to create a shortcut on the desktop. That’s not the case in Linux though.

But if you are a fan of this feature, let me show you how you can add desktop shortcuts to your favorite applications in Ubuntu and other Linux distributions.

Desktop file Linux
Application Shortcuts on Desktop in Ubuntu with GNOME desktop

In case you are wondering about the looks of my desktop, I am using Ant theme with Tela icons. You can also get some GTK themes and icons for Ubuntu and change them as you like.

Adding desktop shortcut in Ubuntu

Desktop file Linux

Personally I prefer the Ubuntu launcher for application shortcuts. If I use a program frequently, I add it to the launcher. But I know not everyone has the same preference and a few people prefer the shortcuts on the desktop.

Let’s see the simplest way of creating an application shortcut on the desktop.

This tutorial has been tested on Ubuntu 18.04 LTS with GNOME desktop. It may work in other distributions and desktop environments but you have to try it on your own. Some GNOME specific steps may change so please pay attention while trying it on other desktop environments.

Subscribe to our YouTube Channel for More Linux Videos

Prerequisite

First and foremost thing is to make sure that you have icons allowed on the GNOME desktop.

If you followed the Ubuntu 18.04 customization tips, you know how to install GNOME Tweak tool. In this tool, make sure that you have ‘Show Icons’ option enabled.

Desktop file Linux
Allow icons on desktop in GNOME

Once you have made sure of that, it’s time to add some application shortcuts on the desktop.

Step 1: Locate the .desktop files of applications

Go to Files -> Other Location -> Computer.

Desktop file Linux
Go to Other Locations -> Computer

From here, go to the directory usr -> share -> applications. You’ll see icons of several Ubuntu applications you have installed here. Even if you don’t see the icons, you should see the .desktop files that are named as application.desktop.

Desktop file Linux
Application Shortcuts

Step 2: Copy the .desktop file to desktop

Now all you have to do here is to look for the application icon (or its desktop file). When you find it, either drag-drop the file to the desktop or copy the file (using Ctrl+C shortcut) and paste it on the desktop (using Ctrl+V shortcut).

Desktop file Linux
Add .desktop file to the desktop

Step 3: Run the desktop file

When you do that, you should see a text file kind of icon on the desktop instead of the logo of the application. Don’t worry, things will be different in a moment.

Option 1: In newer Ubuntu versions, you may right click on the .desktop file and click on “Properties“. In here, give the file execute permission.

Desktop file Linux

Now if you right click on the file, you’ll find find an “allow launching” option. Select it and you’ll see that the file has turned into an application shortcut.

Desktop file Linux
add apps desktop ubuntu permission

Option 2: On the older Ubuntu versions like 18.04, things were pretty straightforward. What you have to do is to double click on that file on the desktop. It will warn you that it’s an ‘untrusted application launcher’ so click on Trust and Launch.

Desktop file Linux
Launch Desktop Shortcut

The application will launch as usual but the good thing that you’ll notice that the .desktop file has now turned into the application icon. I believe you like the application shortcuts this way, don’t you?

Desktop file Linux
Application shortcut on the desktop

Troubleshoot for Ubuntu 19.04 or GNOME 3.32 users

If you use Ubuntu 19.04 or GNOME 3.32, you the .desktop file may not launch at all. You should right click on the .desktop file and select “Allow Launching”.

After this, you should be able to launch the application and the application shortcut should be displayed properly on the desktop.

Conclusion

If you don’t like a certain application launcher on the desktop, just select it and delete it. It will delete the shortcut but the application will remain safely in your system.

I hope you found this quick tip helpful and now you can enjoy the application shortcuts on Ubuntu desktop.

If you have questions or suggestions, please let me know in the comments below.


  • Facebook 145
  • Twitter 6
  • LinkedIn 1
  • Reddit 2