Introduction to menu and file association in linux desktop

Source: Internet
Author: User
The introduction to menu and file association in linux desktop has never understood the problem of linux desktop menu and file association. now I have studied and written a summary. Accessing a linux desktop is related to menus and files. how can this problem be manually modified. Menu: first, the menu includes three... information about the association between menus and files on linux desktops has never understood the problems of linux desktop menus and file associations. now I have studied and summarized the issues. Accessing a linux desktop is related to menus and files. how can this problem be manually modified. Menu: it includes three parts. The menu file is used to combine desktop files to form menu styles.
Directory files are used to describe the directory hierarchy of menus, because only desktop files do not have a directory hierarchy. The position of the menu file is global:/etc/xdg/menus/person :~ /. Config/menus/www.2cto.com directory file location:/usr/share/desktop-directories/individual :~ /. Local/share/desktop-directories/desktop file location:/usr/share/applications/personal :~ /. Local/share/applications/for example, xfce4 menu file/etc/xdg/menus/xfce-applications.menu explanation: Find the desktop file in the default path, that is, the directory listed above. Find the directory file in the default path You can insert a desktop file entry directly. You can directly insert a menu with a specified name. Merge all other menus It is a category that scans all desktop files (you can view a desktop file,
Generally, a variable specifies the category of the program ). Include it in Between identifiers is here
All programs whose Category is specified are to be inserted. File Association: by http://forum.ubuntu.org.cn/search.php? Search_id = egosearch [+],/etc/gnome/defaults. list stores the global open mode ~ /. Local/share/applications/defaults. list stores the personal opening method. when there are two inconsistencies, local personal settings are preferred. /Usr/share/applications/mimeinfo. cache ~ /. Local/share/applications/mimeinfo. cache: These two are global and local open methods respectively to cache defaults. list is not available in every desktop environment and xfce4 is unavailable. Mimeinfo. cache
It is cache, so it will be refreshed after a period of time, and changing it does not work. In fact, you need to modify the desktop file. Www.2cto.com for opera, opera. the last few lines of the desktop file are as follows... exec = opera % u Terminal = false Categories = Application; Qt; Network; WebBrowser; X-Ximian-Main; X-Ximian-Toplevel icon1_opera.png MimeType = text/html; text/xml; application/xhtml + xml; application/x-mimearchive; application/xml; application/rss + xml; application/rdf + xml; image/svg + xml;
Image/gif; image/jpeg; image/png; image/x-bmp; image/x-xbm; application/mime Comment = Web Browser Type = Application check its MimeType attribute, we can see that it has too many associations. Generally, I will remove the image Association.
We can also see which Categories opera belongs to, so we can generally see it in the Network directory. Changelog ============================ by default, in the Linux Gnome desktop environment, there will be three top-level drop-down menus as a shortcut for applications and system tools.
(Note: a file with the suffix "desktop". This type of file has a fixed format. for the specific format, refer to the directory listed below.
In the file and the document pointed to by the link given in the reference), the three menus are respectively: Application, location, system. "Application"
The menu is the shortcut menu for applications grouped by category. the "location" menu is the user directory and other mounted or deployable partitions,
The "system" menu is a shortcut for user configuration tools and system configuration tools. Generally, applications installed by users usually create corresponding applications in a category under these three top-level menus.
Quick portal, but there is always an exception in everything. What's more, linux versions may also make some adjustments to gnome, desktop
File, character encoding format, or even the application icon specified in the desktop file does not exist.
It is not surprising that the created menu cannot be displayed normally. Taking Ubuntu 10.04 LTS amd64-bit as an example, the location of the saved app shortcut is roughly two: www.2cto.com; the saved app shortcut ~ /. Local/share/applications; save the global application shortcut/usr/share/applications programs installed with root permissions, most of the shortcut entries are created in the/usr/share/applications directory, or in ~ /. Local/share/applications Directory. for programs installed with user permissions, you can only create quick portals in ~ /. Local/share/applications Directory. Use the system-preferences-Main menu tool (program name alacarte) to create a shortcut for the application ~ /. Local/share/applications directory, which is named in alacarte-made [-X]. desktop format by default. X
Is a number. you can rename the file later, and the content displayed on the menu will not change. The shortcut menu that is deleted from the main menu tool,
The corresponding desktop file is not deleted, but the value of the Hide field in the corresponding file is changed to true. Once you know this, if an abnormal shortcut is displayed, you can find the corresponding file and compare it with other
If the file is normal, you can modify the error and make the menu display normal. In addition to the two directories that store the app shortcut entry above, there are also several files used to store the default open program for the specified type of files,
That is, the file association program. these files are/etc/gnome/defaults. list www.2cto.com/usr/share/applications/defaults. list/usr/share/applications/mimeinfo. cache ~ /. Local/share/applications/mimeapps. list ~ /. Local/share/applications/mimeinfo. cache save the global settings for the first three files, and the other two save the user settings. If you want to modify the program associated with a type of file, you can
Directly modify these files. Author Start-up
Related Article

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.