An analysis of the "turn" Ubuntu 12.04 right-click menu

Source: Internet
Author: User

This article only analyzes the open programs section of the Ubuntu 12.04 right-click menu, including new, delete, and change open with options.

Take the. csv file as an example (the first four lines of the menu below):

There is a split line below the first line, indicating that this is the default way to open the file, if the file has an executable property here will not show the default program, but a simple open a word, click will be prompted to run or view.

The next three lines (depending on how many affiliate programs you set up) are associated with the program. Clicking on the last line "open with other application ..." will open the list of selectors, which is similar to Windows.

Can't find the program you're looking for? Add a file that ends in. Desktop under/usr/share/applications/. Details about Google.

When an associated program is greater than or equal to three (excluding the default program), the menu is stacked.

The key is, how to modify these menu items?

The main and 3 documents, respectively, are

/usr/share/applications/default.list

/usr/share/applications/mimeinfo.cache

~/.local/share/applications/mimeapps.list

The first two of the system files require root permissions to change (not recommended), the third is a user file, can be directly modified.

The default program for file format in Default.list, which is displayed in the first line of the menu.

Mimeinfo.cache in the file format for the associated program, you can set multiple.

The settings in Mimeapps.list overwrite the first two files.

Mimeapps.list [Default applications], [Added associations], respectively, corresponding to the first two files.

The demo is as follows:

123456789101112 [Default Applications]text/html=google-chrome.desktopx-scheme-handler/http=google-chrome.desktopx-scheme-handler/https=google-chrome.desktopx-scheme-handler/about=google-chrome.desktopx-scheme-handler/unknown=google-chrome.desktopapplication/x-trash=gedit.desktop[Added Associations]application/x-trash=sublime.desktop;application/x-php=sublime.desktop;application/javascript=sublime.desktop;

If the default program and associated programs repeat, only the default programs are displayed. (If a file has an executable property, the right-click menu will only show Open/open with other application ...) Two options , other feature options are of course in the ^_^)

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

An analysis of the "turn" Ubuntu 12.04 right-click 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.