Home > System Tutorial > LINUX > How to quickly launch applications on CentOS 7?

How to quickly launch applications on CentOS 7?

WBOY
Release: 2024-01-13 18:54:12
forward
959 people have browsed it

Just switched from windows to linux system, generally you need to make the transition through the graphical interface. As the number of installed software increases, especially some programming IDEs, such as JB's software, you have to cd xx/xx/xx/bin every time and then run the script, so it is very troublesome. So I was thinking about whether I could start the application quickly without so much trouble? Programmers who are not lazy are not easy to attack. The following is my idea of ​​​​solving the problem. Let’s go and see it together!

environment

Any installation tutorial that does not mention the version is just a rogue TT

System: CentOS 7

How to quickly launch applications on CentOS 7?

Desktop system version: gnome 3.14

How to quickly launch applications on CentOS 7?

Method 1: Shortcut

First of all, I will definitely think of desktop shortcuts similar to Windows, and then I will start to google a lot of tutorials

Create Launcher

Right-click Desktop and click "Create Launcher".

Tutorial link

However, any installation tutorial that does not mention the version is just a rogue TT

Yes, the "Create Launcher" option does not appear for the elderly.

So, this road will not work.

Modify .desktop file

1. Terminal input: sudo vim /usr/share/applications/datagrip.desktop

Edit .desktop file

How to quickly launch applications on CentOS 7?

Exec, Icon should be changed to the installation path of datagrip

How to quickly launch applications on CentOS 7?

2. Then give the file authority and run the "chmod u x eclipse.desktop" command.

This is also very important! ! ! Must be an executable file.

Explain that I installed it by decompression. If it is installed with deb package (/usr/share/applications/ has datagrip.desktop, I have not installed it, I don’t know if it is this name), steps 1 and 2 are both

can be omitted

3. Copy the file to the desktop directory.

How to quickly launch applications on CentOS 7?

Method 2: Start directly in the terminal

The most recommended method: simple, fast and convenient

Method steps

Enter the command directly in the terminal:

How to quickly launch applications on CentOS 7?

Enter the command again

rehash

If the hash table is not updated, the current terminal saves the previous hash table, and the soft connection will not take effect on the current terminal.

The official explanation is as follows,

Typically, compinit will not automatically find new executables in the $PATH. For example, after you install a new package, the files in /usr/bin would not be immediately or automatically included in the completion. Thus, to have these new exectuables included, one would run: rehash

You will find that the soft link was successfully established

How to quickly launch applications on CentOS 7?

From now on, you can directly enter datagrip in the terminal to start datagrip.

Principle explanation

/usr/bin places some executable files, such as sh files, which are executable files.

In fact, it is similar to turning datagrip into commands like ls and cat. Then when you enter the datagrip command, the execution process is as follows: first search in the path of the environment variable (via the command $PATH) to see if there is an executable file for datagrip. If not, continue to search in the folder of the path. Here we are It is in the /usr/bin folder.

Summary

Method 1 actually took many attempts before I succeeded, but method 2 is very fast, so method 2 is highly recommended.

The above is the detailed content of How to quickly launch applications on CentOS 7?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:jb51.net
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template