How to Manually Register Any Desktop App in Linux
This article explains in details how to register desktop applications on Linux-based operating systems. Registering a desktop application, means that you can access the application from the list of your Linux-distribution’s applications, or by just searching for the application.
NOTE:// The applicability of this article is PC applications that you download and run directly without having to use the install script, probably because the install shell script is not available. Normally, when you use the “install” or “install.sh” files, the application at hand is automatically registered as a desktop application, and at the right category or in some cases categories (because some applications could belong to several categories, though its purpose still remains the same).
To register any desktop application, follow the following steps:
For the purpose of understanding the process, “Firefox ESR Browser” is used as an example!
Step 1: Downloading the desired PC Application
(If you have downloaded and extracted the application already, skip to Step 3)
Download the application you want to register!
Let’s say you downloaded it to the location “/home/Downloads/”. Most likely, your downloaded Firefox-ESR will be in a compressed format, e.g., Firefox-ESR.tar.gz, which means that the firefox executable cannot be run directly.
Step 2: Unarchiving/Uncompressing firefox
You need to open the compressed file (Firefox-ESR.tar.gz) using an Archive Manager, and extract it to your desired location (e.g., “home/Downloads/”, so that the extracted Firefox-ESR files are in the folder “/home/Downloads/Firefox-ESR/”).
Alternatively, you could extract Firefox-ESR.tar.gz files using Terminal. To achieve this, follow the following tutorial “ How to unarchive/extract files in Linux using Terminal!”
Step 3: Locating the Executable file
Now that the files are accessible directly, we need to locate the executable file. This file could be named “firefox” or “firefox-esr” in case of this article’s, Firefox-ESR example.
In your case, locate the executable file, which should have a “Run” option, upon right-clicking it. To further make sure you are dealing with the right file, the file properties should include the Type as “executable (application/x-executable)”!
More simply even, you could locate your executable by double-clicking on the file you think is the executable, and this should open the actual application.
NOTE:// If the executable file doesn’t run on double-clicking it, then it will definitely not run after registering it as a desktop application. So make sure you’ve got the right file before proceeding to the next step!
Step 4: Creating a .desktop file manually
All registered desktop applications are contained in “.desktop” files that are stored somewhere in your Linux-distribution file system.
Now to register our application (firefox-esr), we need to create a “.desktop” file for it. We can name it “firefox-esr.desktop“. This file can be created anywhere, but I suggest creating it at the root directory of your downloaded, extracted application.
Step 5: Editing the .desktop file
Now, using your favorite editor, open the .desktop file (e.g., firefox-esr.desktop). Enter the following parameters, only replacing the application details (on the right side of the equals sign) with those that match your application’s:
Comment=Customized Firefox ESR by thetqweb.com
NOTE:// For an application registration to work, the following parameters are a must:
Also note that the “Name” and “Comment” can be custom as shown in the example above, and you could therefore name and/or comment your application as you wish.
Save the file and close the editor once you have confirmed that everything is alright.
Step 6: Registering the Application
All the applications that come by default with your Linux OS/Distribution are registered on your PC Applications’ list using .desktop files stored in the location “/usr/share/applications/“!
This for us means that to register our application, we need to place the .desktop file we created and edited for our application exactly here.
Copy the .desktop file you created and edited (firefox-esr.desktop) to the location “usr/share/applications/“. This should register your application with immediate effect!
Congratulations! You now possess the knowledge to register any desktop application! Subscribe to thetqweb’s mail list to receive more informative articles on Technology, Hacking and Computers, as soon as they are posted!
Consider buying thetqweb.com a coffee [buymeacoffee.com/thetqweb.com] if this information was helpful. Even the least is most significant! This site is supported by generous donations such as yours! Click on the floating Purple Coffee Cup on the bottom-right side, or click on the “Buy me a Coffee” tab on the site! Thank You in Advance!
How to Manually Register Any Desktop App in Linux
Hacking | thetqweb