Software & AppsOperating SystemLinux

Adding a Launcher for .sh Applications in Gnome

Ubuntu 1

In this article, we will explore the process of adding a launcher for .sh applications in Gnome. This can be useful when you have a shell script that you use frequently, and you want to have a convenient shortcut to it in your Gnome Shell. We will cover four different methods for achieving this, including creating a launcher using the “Create Desktop Entry” feature in PhpStorm, manually creating a .desktop file, using the Alacarte application, and using the MyLauncher Gnome Shell extension.

Creating a Launcher Using the “Create Desktop Entry” Feature in PhpStorm

If you’re using PhpStorm, it provides a handy feature to create a desktop entry for your .sh applications. Here’s how to do it:

  1. Open PhpStorm and navigate to “Tools -> Create Desktop Entry…”
  2. This will create a launcher for PhpStorm and add it to the system menu for the current user or all users. The launcher is compatible with Gnome Shell.

Manually Creating a .desktop File

If you prefer to do things manually, or if you’re not using PhpStorm, you can create a .desktop file yourself. Here’s how:

  1. Open a terminal. You can do this by pressing Ctrl + Alt + T.
  2. Run the command gedit ~/.local/share/applications/<Your App Name>.desktop. Replace <Your App Name> with the name of your application.
  3. In the text editor that opens, paste the following code:
[Desktop Entry]
Version=1.0
Name=My Awesome App
GenericName=Awesome App
Comment=This app is awesome!
Exec=/path/to/sh/file/file.sh
Terminal=false
Icon=/opt/PhpStorm-103.243/bin/webide.png
Type=Application
Categories=Network;WebBrowser;
MimeType=text/html;
Name[en_NZ]=My Awesome App
GenericName[en_NZ]=Awesome App
Comment[en_NZ]=This app is awesome!
  • Exec is the path to your .sh file.
  • Icon is the path to the icon you want to use for your application. You can leave this as is, or replace it with the path to your own icon.
  • Type should be Application for an application launcher.
  • Categories helps Gnome Shell categorize your application. You can find a list of possible categories here.
  • MimeType is the type of files your application can handle. You can leave this as is, or replace it with the correct MIME type for your application.
  1. Save the file. Your application should now show up in searches.

Using the Alacarte Application

Alacarte is a menu editor for Gnome that can also be used to create launchers for .sh applications. Here’s how:

  1. Install Alacarte by running sudo apt-get install alacarte in the terminal.
  2. Open Alacarte. You can do this from the Software Center, or by running alacarte in the terminal.
  3. Choose a folder and click “New Item”.
  4. Provide a name for the launcher, browse to the location of your .sh file, and select an icon.
  5. Save the launcher. It should now appear in the menu.

Using the MyLauncher Gnome Shell Extension

MyLauncher is a Gnome Shell extension that allows you to create a menu on the panel where you can add links, folders, shell scripts, etc. Here’s how to use it:

  1. Install the MyLauncher extension from here.
  2. The extension allows you to create a menu on the panel where you can add links, folders, shell scripts, etc.

These are four methods to add a launcher for .sh applications in Gnome. Depending on your specific setup and version of Ubuntu, some methods may work better than others. However, all of them should provide you with a convenient way to run your .sh applications from the Gnome Shell.

How do I create a launcher using the “Create Desktop Entry” feature in PhpStorm?

To create a launcher using the "Create Desktop Entry" feature in PhpStorm, open PhpStorm and navigate to "Tools -> Create Desktop Entry…". This will create a launcher for PhpStorm and add it to the system menu for the current user or all users. The launcher is compatible with Gnome Shell.

How do I manually create a .desktop file for a .sh application?

To manually create a .desktop file for a .sh application, open a terminal using Ctrl + Alt + T and run the command gedit ~/.local/share/applications/<Your App Name>.desktop. Replace <Your App Name> with the name of your application. In the text editor that opens, paste the provided code and modify the necessary fields such as Exec (path to your .sh file) and Icon (path to the icon you want to use). Save the file, and your application should now show up in searches.

How can I use the Alacarte application to create a launcher for .sh applications?

To use the Alacarte application to create a launcher for .sh applications, start by installing Alacarte using the command sudo apt-get install alacarte in the terminal. Open Alacarte either from the Software Center or by running alacarte in the terminal. Choose a folder, click "New Item," provide a name for the launcher, browse to the location of your .sh file, and select an icon. Save the launcher, and it should now appear in the menu.

What is the MyLauncher Gnome Shell extension and how can I use it to create a launcher for .sh applications?

The MyLauncher Gnome Shell extension allows you to create a menu on the panel where you can add links, folders, shell scripts, etc. To use it, first install the MyLauncher extension from the provided link. The extension will enable you to create a menu on the panel where you can add various items, including shell scripts.

Leave a Comment

Your email address will not be published. Required fields are marked *