Linux how to create shortcut

How to Add Application Shortcuts on Ubuntu Desktop

Last updated June 27, 2021 By Abhishek Prakash 44 Comments

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.

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

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.

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.

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.

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.

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).

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.

Читайте также:  Как разогнать процессор 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.

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.

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?

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.

Like what you read? Please share it with others.

Источник

How To Create Shortcuts On Linux Desktop

Ever had a problem creating a folder, application, file, etc shortcuts on your Linux desktop and end up not creating one at all? Good news! There is a way to get around that using a terminal program. In Linux, you create symbolic links or soft links to point to the linked file using this utility program called ln. Let’s get down to it, shall we?

Create a folder named ‘Ryan’ under your home directory for this tutorial. Suppose Ryan is a regular user and has basic computer knowledge on creating and saving documents only, you’d want to create a shortcut to his folder on your desktop for him to navigate easily.

Open up your terminal emulator program, assuming Ryan’s situation, the below command would create a symbolic link to his folder on your desktop:

After executing that command you will notice a new folder icon on your desktop that looks like a shortcut.

And suppose, in your case, you wish to create a shortcut to your Document directory on your Linux desktop. Similar to that above command, you’d have done it this way:

You can also create a shortcut to almost any type of file. Try creating one yourself for audio files, custom applications, word documents, etc.

A lil’ tad bit advanced

What if you wish to create a symbolic link to a file or folder that is stored in another partition? There is a way I can show you how to achieve that. Mount the appropriate partition in /mnt or /media during computer startup, by editing the /etc/fstab file. Then create a symbolic link to the required folder or file on your home directory.

​Below is a screenshot of an edited fstab file that mounts my “work partition” to /media/hub on computer starts up.

Technical detail

ln is a utility program, succeeding it -s is the argument that tells ln to create a symbolic (or soft) link. The tilde symbol and forward slash

/ is used to indicate the given program to start navigating from the user’s root directory (home directory).

An advantage

There is an advantage in using this symbolic link and that is… ahem, you can create a symbolic link to a directory that exists in another partition. So in the event your Linux partition fails, you can rest assured that your documents, stored and linked from, in another partition stay intact. That’s how I take measure to keep my important directories and files safe, and easy to recover.

Читайте также:  Как загрузить linux с usb

What about GNOME?

GNOME is a very unique desktop environment that keeps its design goals on “simplicity”. So there is no such thing as “desktop icons” on GNOME, only free workspace. Creating a symbolic link on its Desktop directory is possible but expect no shortcut icon at all. I recommend creating links on your home directory and navigating it using a file manager program which is efficient.

Conclusion

Do not create symbolic links to removable storage media like your pen drive or portable hard disk. It’s impractical (with broken links lying around your desktop or home directory) though there’s no danger in that 🙂 Have a great alternative idea on how to create shortcuts on Linux desktop? Please share your thoughts in the comment section below. ​

Источник

How to Create Shortcut Commands using Alias in Linux

In this tutorial you will learn, how to create shortcut commands on Linux. This is you can say a short name of any command. In you daily work, you use multiple commands very frequently. You can create a shortcut of those commands, which help you to use easier.

Alias is an Linux command provides ability to create customized commands. Using this you can create a sort name for a big command as an alias, which is easier to remember. When we uses a single command very frequently, we can alias them to a very short name. You can understand it as create shortcut commands on Linux.

Create Shortcut Command

For example, we use below command frequently to view the directory listing in human readable format.

Now, make it short with alias command.

All done, You have created the alias successfully. To verify the newly created alias, just type below command on terminal

You will see the results on screen similar to command “ls -lh”.

Make Shortcut Permanent

When you create an alias on terminal, it is not available permanently. Once the terminal is closed, the aliase are lost. To make the aliases permanently you can write in login or non login shell script.

Add the aliases in /etc/profile.d/bash_aliases.sh (Use any name for this script) to make them available for all users. To configure aliases for specific user only, add them in

Create More Shortcut Commands

You can create multiple shortcut commands as much you need. Here is the aliases of some frequently used commands. Add these commands to shell script.

View all Shortcuts (Aliases)

You can simply type the “alias” command without any parameter to print all available aliases on your system.

Remove Shortcuts

You can use unalias command to disable any shortcut on your system. For example to disable ‘lh’ alias use following command.

You also need to remove any entry made in login or non login shell scripts.

Источник

How To Create Application Menu Shortcuts On Linux

Aug 15, 2018
Comment

Users start programs on Linux with “launchers”. These files contain specific instructions for how the Linux operating system should run the program and how the icon should look, among other things. On Linux, if you want to create application menu shortcuts, you’ll find that it’s a bit more difficult, compared to Mac or Windows, as users can’t just right-click on a program and select the “create shortcut” option. Instead, if you’d like to create application menu shortcuts on the Linux desktop, it’s an involved process that takes a bit of know-how.

SPOILER ALERT: Scroll down and watch the video tutorial at the end of this article.

Application Menu Shortcuts – Terminal

Perhaps the quickest way to create application menu shortcuts on the Linux desktop is to create one in the terminal. Going the terminal route is less user-friendly, as there’ isn’t a nice GUI editor to assign app categories, and no icon chooser, etc.

Читайте также:  Драйвера qualcomm bluetooth для windows 10

The first step to creating a new application shortcut in Linux is to create an empty Desktop file. In the terminal, use the touch command to create a new shortcut.

The new shortcut icon is on the desktop, but it has no program instructions. Let’s fix this by editing the new file in the Nano text editor.

The first line for any application shortcut is “Name”. This line will give the application shortcut its name in the menus. In Nano text editor, give your shortcut a name.

Following “Name,” the next line in the shortcut to add is “Comment.” This line is optional but very useful as it allows the menu to display some information about the shortcut.

With “Name” and “Comment” out of the way, we can get to the real meat of the launcher. In the Nano text editor, add the “Exec” line.

The “Exec” line tells your Linux OS where the program is, and how it should start.

Exec is very versatile and can launch Python, Bash, and just about anything else you can think of. For example, to run a shell or bash script via the shortcut, do:

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

Once the “Exec” line is set to your liking, add the “Type” line.

Need to set your custom shortcut up with an icon? Use the “Icon” line.

Now that Name, Comment, Exec, and Icon are set, it’s safe to save the custom shortcut. Using the Ctrl + O keyboard combination, save the app shortcut. Then, exit Nano with Ctrl + X.

Install your custom app shortcut system-wide with:

Application Menu Shortcuts – Alacarte

There are many menu editors on Linux. For the most part, they all work similarly and do the same thing. For best results, we recommend using the Alacarte app. It’s easy to use, works on everything and can be installed on even the most obscure Linux distributions (due to it’s relationship to the Gnome project).

Alacarte may already be installed on your Linux PC. Check and see by pressing Alt + F2, typing “alacarte” and clicking enter. If the app launches, you’ve already got it installed. If nothing happens, you’ll need to install it. Follow the instructions below to get it working.

Ubuntu

Debian

Arch Linux

Fedora

OpenSUSE

Generic Linux

Not able to find the Alacarte menu editor app on your Linux distribution? Visit the souce code site and build it yourself!

Make Shortcuts

Making shortcuts with the Alacarte menu editor is refreshingly simple. To start off, click on a category. In this example, we’ll make a new shortcut in the “Internet” category.

In the “Internet” category, click the “New Item” button. Selecting the “New Item” option will open up “Launcher Properties”.

In the “Launcher Properties” windows, there are a few things to fill out. The first thing to fill out is “Name”. Write in the name of the launcher in the “Name” section. Then, move on to “Command.”

The “Command” section is where the user specifies what the shortcut will do. Click the “browse” button to search for a shell script, binary, python app, etc and load it in. Alternatively, write in a command, like one of the following:

When the launcher’s “Command” section is set, write a comment in the “Comment” section and then select “OK” to finish. After clicking the “OK” button, Alacarte will instantly save and enable your new app shortcut on the Linux desktop!

Источник

Оцените статью