Customers begin applications on Linux with “launchers”. These information include particular directions for the way the Linux working system ought to run this system and the way the icon ought to look, amongst different issues. On Linux, if you wish to create software menu shortcuts, you’ll discover that it’s a bit harder, in comparison with Mac or Home windows, as customers can’t simply right-click on a program and choose the “create shortcut” choice. As an alternative, in the event you’d prefer to create software menu shortcuts on the Linux desktop, it’s an concerned course of that takes a little bit of know-how.

SPOILER ALERT: Scroll down and watch the video tutorial on the finish of this text.

Application Menu Shortcuts – Terminal

Maybe the quickest approach to create software menu shortcuts on the Linux desktop is to create one within the terminal. Going the terminal route is much less user-friendly, as there’ isn’t a pleasant GUI editor to assign app classes, and no icon chooser, and so on.

Step one to creating a brand new software shortcut in Linux is to create an empty Desktop file. Within the terminal, use the contact command to create a brand new shortcut.

contact ~/Desktop/instance.desktop
chmod +x ~/Desktop/instance.desktop
echo '[Desktop Entry]' >> ~/Desktop/instance.desktop

The brand new shortcut icon is on the desktop, but it surely has no program directions. Let’s repair this by enhancing the brand new file within the Nano textual content editor.

nano ~/Desktop/instance.desktop

The primary line for any software shortcut is “Name”. This line will give the applying shortcut its identify within the menus. In Nano textual content editor, give your shortcut a reputation.

Title=Instance Shortcut

Following “Name,” the subsequent line within the shortcut so as to add is “Comment.” This line is elective however very helpful because it permits the menu to show some details about the shortcut.

Remark=That is an instance launcher

With “Name” and “Comment” out of the way in which, we will get to the actual meat of the launcher. Within the Nano textual content editor, add the “Exec” line.

The “Exec” line tells your Linux OS the place this system is, and the way it ought to begin.

Exec=command arguments

Exec may be very versatile and might launch Python, Bash, and absolutely anything else you’ll be able to consider. For instance, to run a shell or bash script through the shortcut, do:

Exec= sh /path/to/sh/script.sh

Alternatively, set your app shortcut to run a Python program with:

Exec=python /path/to/python/app

As soon as the “Exec” line is ready to your liking, add the “Type” line.

Kind=Application

Must set your customized shortcut up with an icon? Use the “Icon” line.

Icon=/path/to/customized/icon

Now that Title, Remark, Exec, and Icon are set, it’s protected to avoid wasting the customized shortcut. Utilizing the Ctrl + O keyboard mixture, save the app shortcut. Then, exit Nano with Ctrl + X.

Set up your customized app shortcut system-wide with:

sudo mv ~/Desktop/instance.desktop /usr/share/purposes

Application Menu Shortcuts – Alacarte

There are lots of menu editors on Linux. For essentially the most half, all of them work equally and do the identical factor. For finest outcomes, we advocate utilizing the Alacarte app. It’s simple to make use of, works on every thing and will be put in on even essentially the most obscure Linux distributions (as a consequence of it’s relationship to the Gnome undertaking).

Alacarte could already be put in in your Linux PC. Examine and see by urgent Alt + F2, typing “alacarte” and clicking enter. If the app launches, you’ve already obtained it put in. If nothing occurs, you’ll want to put in it. Observe the directions under to get it working.

Ubuntu

sudo apt set up alacarte

Debian

sudo apt-get set up alacarte

Arch Linux

sudo pacman -S alacarte

Fedora

sudo dnf set up alacarte -y

OpenSUSE

sudo zypper set up alacarte

Generic Linux

Not capable of finding the Alacarte menu editor app in your Linux distribution? Visit the souce code site and construct it your self!

Make Shortcuts

Making shortcuts with the Alacarte menu editor is refreshingly easy. To begin off, click on on a class. On this instance, we’ll make a brand new shortcut within the “Internet” class.

Within the “Internet” class, click on the “New Item” button. Deciding on the “New Item” choice will open up “Launcher Properties”.

Within the “Launcher Properties” home windows, there are some things to fill out. The very first thing to fill out is “Name”. Write within the identify of the launcher within the “Name” part. Then, transfer on to “Command.”

The “Command” part is the place the person specifies what the shortcut will do. Click on the “browse” button to seek for a shell script, binary, python app, and so on and cargo it in. Alternatively, write in a command, like one of many following:

python /path/to/python/app.py

or

sh /path/to/shell/script/app.sh

or

wine /path/to/wine/app.exe

When the launcher’s “Command” part is ready, write a remark within the “Comment” part after which choose “OK” to complete. After clicking the “OK” button, Alacarte will immediately save and allow your new app shortcut on the Linux desktop!



Source link

Share.
Leave A Reply

Exit mobile version