Linux Desktop shortcuts Create instances

Source: Internet
Author: User
Tags sublime text

Today to search the Internet to create desktop shortcuts, found that there are some irresponsible, problematic tutorials, so I also send a tutorial

Create a new Xxx.desktop file under your Home/desktop folder, plus Execute permissions

Copy Code

The code is as follows:

chmod +x Xxx.desktop

The specific contents refer to the following template, by the way the installation method of software under Linux, take sublime text 2 as an example

Download Sublime Linux installation package, in your home directory to create a new directory name, you can call the app, or MyApps What, you know on the line, is the software installation directory, the sublime text 2 extract into the inside, so the overall directory structure as follows

The code is as follows:

--homeyournam

----Apps

------Sublime Text 2

The following explains the contents of the template, the first line of which is a prerequisite comment for a script that is marked with an executable tag, which is the interpreter address for executing the script, which is used to explain desktop shortcuts.

The second line starts with the exact content.

Explain two important places, the ground one is exec, this is the address of your executable file, if the middle contains spaces, then use quotation marks to expand

icon, this is your application icons, or the default icon is very difficult to see

The code is as follows:

#!/usr/bin/env Xdg-open

[Desktop Entry]

Categories=development;

comment[zh_cn]=

Comment=

exec= "/home/bowman/apps/sublime Text 2/sublime_text"

Genericname[zh_cn]=sublime Texe 2

Genericname=sublime Texe 2

icon= "/home/bowman/apps/sublime Text 2/icon/256x256/sublime_text.png"

Mimetype=

Name[zh_cn]=sublime Texe 2

Name=sublime Texe 2

Path=

Startupnotify=true

Terminal=false

Type=application

X-dbus-servicename=

X-dbus-startuptype=

X-kde-substituteuid=false

X-kde-username=owen

For category, here's a main list to choose from.

He table below lists all Main Categories.

Main Category Description Notes

Audiovideo application for presenting, creating, or processing multimedia (Audio/video)

Audio an Audio application Desktop entry must include Audiovideo as

Video A video application Desktop entry must include Audiovideo as

Development an application for Development

Education educational Software

Game A Game

Graphics application for viewing, creating, or processing Graphics

Network Network application such as a Web browser

Office an Office type application

Science Scientific Software

Settings settings Applications Entries may appear in a separate menu or as part of a ' control Center '

System System Application, "system Tools" such as say a log viewer or Network Monitor

Utility Small Utility Application, "accessories"

References

Http://standards.freedesktop.org/menu-spec/latest/apa.html#main-category-registry

Http://standards.freedesktop.org/desktop-entry-spec/desktop-entry-spec-latest.html

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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.