How Ubuntu creates the launcher (shortcut)

Source: Internet
Author: User

Decompression. Tar.gz's navicat later found that the initiator could not be automatically generated, and studied the discovery:

While many programs with graphical interfaces will automatically create shortcuts on the desktop during installation, there are some graphical interface programs or command-line programs that may require you to manually create shortcuts such as. tar.gz and other downloaded software.

Two methods are available for pro-testing:

Method One:

1. Search into "Launch application"

2. Select "Add" in the Startup program preferences

3. After setting the name and command (path), click "Add" and the launcher will be added to the list.

4. Select the launcher you just added with your mouse and drag it to the desktop, and you'll notice that a. desktop file with the same name is created

5. Right-click the new Starter, select Properties, tick on the Permissions tab-execute: Allow the program to execute the file

6. Click the icon in the Basic tab to set the launcher's desktop icon. (It feels a bit of a hole here, Navicat did not find the icon, himself under a)

7, want to put in the start bar directly dragged past it, do not open after the point "lock to the launcher"


Method Two:

Each icon corresponds to one of the configuration files in the/usr/share/applications (file suffix. Desktop). So to add a custom program launcher to the dash home, you need to create the corresponding configuration file in the file directory. The syntax of the configuration file, refer to the configuration file under this directory to understand:

1. Open the terminal, switch to the root account, and then create the appropriate boot configuration file under the/usr/share/applications directory (note: Be sure to have the same name as the startup item)

2. Format:

[Desktop entry]//file header
	encoding=utf-8  //encoding method
	name=xxx//application name
	comment=comment//hint
	exec=// The menu executes the command or program path
	icon=//the icon displayed in the menu item, which can be empty
	terminal=false//Whether to  use terminal
	type=application//Classification
	categories=//Menu category, you can determine the location of the menu


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.