Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to create desktop shortcuts similar to those in Windows in Linux system

2025-03-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "how to create desktop shortcuts similar to Windows in Linux system". In daily operation, I believe many people have doubts about how to create desktop shortcuts similar to Windows in Linux system. Xiaobian consulted all kinds of materials and sorted out simple and easy to use operation methods. I hope to answer your doubts about "how to create desktop shortcuts similar to Windows in Linux system"! Next, please follow the small series to learn together!

Take installing WeChat in Ubuntu as an example

The same is true for CentOS.

After installing the software on Ubuntu, his shortcut icon is not automatically placed in our desktop Desktop, he will automatically put this shortcut in the/usr/share/applications/folder. So what we need to do is copy this shortcut to the desktop.

Of course, some software may not create shortcuts, at this time we have to write their own shortcut content, so fixed a few lines. If you have some software installed in Linux, you can open these shortcuts with vim and copy the contents, changing the executable path, icon path, and name.

Step 1: Find out if the shortcut to your installed software is under the applications folder

As shown above, match grep to possible keywords. If you can't find them here, it's probably because they didn't create shortcuts for you when you installed the software.

Step 2: Copy this shortcut from the applications folder to your desktop

As shown above, copy the shortcut to your desktop folder using the cp command (you can actually copy it to other folders, and eventually the shortcut will be displayed as an icon).

You can also see from the picture that the copied shortcut is below my Netease cloud icon. At this point you double click it and can not open its corresponding software (WeChat), because it has no executable permissions, with ls -l command you can view the details of the file, as shown below

As you can see, the current owner of this shortcut file only has read and write permissions and no executable permissions.

Step 3: Give this shortcut executable permissions

As shown above, use chmod command to change the permissions of the shortcut file. Since this shortcut is copied from/usr, its owner is root, and the current modifier's identity is ordinary user, so you have to use sudo to modify it. After modification, you can use ls command to see that the shortcut file has executable permissions. Then you can double click it to open it.

Step 4: Double-click the shortcut file

After clicking Trust and enabling, this shortcut will become the icon of the software (WeChat), as shown in the figure below.

That's the one under Netease Cloud.

How do I write a.desktop file for an executable program

Below is the content of my Matlab shortcut in Ubuntu

[Desktop Entry]

Encoding=UTF-8

Name=Matlab 2016b

Comment=MATLAB

Exec=/usr/local/MATLAB/R2016b/bin/matlab

Icon=/usr/local/MATLAB/R2016b/toolbox/shared/dastudio/resources/MatlabIcon.png

Terminal=true

StartupNotify=true

Type=Application

Categories=Application,Development;

In fact, the content of.desktop in general software can be set according to the above content.

Change the Name value,

Comment value, these two values are freely written by yourself,

Exec specifies the full path to the executable file

Icon Specifies the full path to this shortcut icon,

Terminal generally choose false, but for me this pirated matlab seems to have to be true, that is, when you open this MATLAB will open a command line window, close this command line window, the software will also be closed at the same time

The latter Categories are generally applied.

Just apply the rest.

At this point, the study of "how to create desktop shortcuts similar to Windows in Linux system" is over, hoping to solve everyone's doubts. Theory and practice can better match to help you learn, go and try it! If you want to continue learning more relevant knowledge, please continue to pay attention to the website, Xiaobian will continue to strive to bring more practical articles for everyone!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report