Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(836)

Side by Side Diff: third_party/xdg-utils/scripts/man/xdg-mime.1

Issue 151098: Patch from mdm@google.com... (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 .\" ** You probably do not want to edit this file directly **
2 .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
3 .\" Instead of manually editing it, you probably should edit the DocBook XML
4 .\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
5 .TH "XDG\-MIME" "1" "06/24/2007" "xdg\-utils 1.0" ""
6 .\" disable hyphenation
7 .nh
8 .\" disable justification (adjust text to left margin only)
9 .ad l
10 .SH "NAME"
11 xdg\-mime \- command line tool for querying information about file type handling and adding descriptions for new file types
12 .SH "SYNOPSIS"
13 .HP 9
14 \fBxdg\-mime\fR query {filetype default} ...
15 .HP 9
16 \fBxdg\-mime\fR default \fIapplication\fR \fImimetype(s)\fR
17 .HP 9
18 \fBxdg\-mime\fR install [\fB\-\-mode\ \fR\fB\fImode\fR\fR] [\fB\-\-novendor\fR] \fImimetypes\-file\fR
19 .HP 9
20 \fBxdg\-mime\fR uninstall [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fImimetypes\-file\ fR
21 .HP 9
22 \fBxdg\-mime\fR {\fB\-\-help\fR \fB\-\-manual\fR \fB\-\-version\fR}
23 .SH "DESCRIPTION"
24 .PP
25 The xdg\-mime program can be used to query information about file types and to a dd descriptions for new file types.
26 .SH "COMMANDS"
27 .TP
28 query
29 Returns information related to file types.
30 .sp
31 The
32 \fIquery\fR
33 option is for use inside a desktop session only. It is not recommended to use xd g\-mime query as root.
34 .sp
35 The following queries are supported:
36 .sp
37 query filetype
38 \fIFILE\fR: Returns the file type of
39 \fIFILE\fR
40 in the form of a MIME type.
41 .sp
42 query default
43 \fImimetype\fR: Returns the default application that the desktop environment use s for opening files of type
44 \fImimetype\fR. The default application is identified by its *.desktop file.
45 .TP
46 default
47 Ask the desktop environment to make
48 \fIapplication\fR
49 the default application for opening files of type
50 \fImimetype\fR. An application can be made the default for several file types by specifying multiple mimetypes.
51 .sp
52 \fIapplication\fR
53 is the desktop file id of the application and has the form vendor\-name.desktop
54 \fIapplication\fR
55 must already be installed in the desktop menu before it can be made the default handler. The aplication's desktop file must list support for all the MIME types that it wishes to be the default handler for.
56 .sp
57 Requests to make an application a default handler may be subject to system polic y or approval by the end\-user. xdg\-mime query can be used to verify whether an application is the actual default handler for a specific file type.
58 .sp
59 The
60 \fIdefault\fR
61 option is for use inside a desktop session only. It is not recommended to use xd g\-mime default as root.
62 .TP
63 install
64 Adds the file type descriptions provided in
65 \fImimetypes\-file\fR
66 to the desktop environment.
67 \fImimetypes\-file\fR
68 must be a XML file that follows the freedesktop.org Shared MIME\-info Database s pecification and that has a mime\-info element as its document root. For each ne w file type one or more icons with name
69 \fImajor\fR\-\fIminor\fR
70 must be installed with the
71 \fBxdg\-icon\-resource\fR
72 command in the
73 \fImimetypes\fR
74 context. For example the application/vnd.oasis.opendocument.text filetype requir es an icon by the name of application\-vnd.oasis.opendocument.text to be install ed.
75 .TP
76 uninstall
77 Removes the file type descriptions provided in
78 \fImimetypes\-file\fR
79 and previously added with
80 \fBxdg\-mime install\fR
81 from the desktop environment.
82 \fImimetypes\-file\fR
83 must be a XML file that follows the freedesktop.org Shared MIME\-info Database s pecification and that has a mime\-info element as its document root.
84 .SH "OPTIONS"
85 .TP
86 \fB\-\-mode\fR \fImode\fR
87 \fImode\fR
88 can be
89 \fIuser\fR
90 or
91 \fIsystem\fR. In user mode the file is (un)installed for the current user only. In system mode the file is (un)installed for all users on the system. Usually on ly root is allowed to install in system mode.
92 .sp
93 The default is to use system mode when called by root and to use user mode when called by a non\-root user.
94 .TP
95 \fB\-\-novendor\fR
96 Normally, xdg\-mime checks to ensure that the
97 \fImimetypes\-file\fR
98 to be installed has a proper vendor prefix. This option can be used to disable t hat check.
99 .sp
100 A vendor prefix consists of alpha characters ([a\-zA\-Z]) and is terminated with a dash ("\-"). Companies and organizations are encouraged to use a word or phra se, preferably the organizations name, for which they hold a trademark as their vendor prefix. The purpose of the vendor prefix is to prevent name conflicts.
101 .TP
102 \fB\-\-help\fR
103 Show command synopsis.
104 .TP
105 \fB\-\-manual\fR
106 Show this manualpage.
107 .TP
108 \fB\-\-version\fR
109 Show the xdg\-utils version information.
110 .SH "ENVIRONMENT VARIABLES"
111 .PP
112 xdg\-mime honours the following environment variables:
113 .TP
114 XDG_UTILS_DEBUG_LEVEL
115 Setting this environment variable to a non\-zero numerical value makes xdg\-mime do more verbose reporting on stderr. Setting a higher value increases the verbo sity.
116 .TP
117 XDG_UTILS_INSTALL_MODE
118 This environment variable can be used by the user or administrator to override t he installation mode. Valid values are
119 \fIuser\fR
120 and
121 \fIsystem\fR.
122 .SH "EXIT CODES"
123 .PP
124 An exit code of 0 indicates success while a non\-zero exit code indicates failur e. The following failure codes can be returned:
125 .TP
126 \fB1\fR
127 Error in command line syntax.
128 .TP
129 \fB2\fR
130 One of the files passed on the command line did not exist.
131 .TP
132 \fB3\fR
133 A required tool could not be found.
134 .TP
135 \fB4\fR
136 The action failed.
137 .TP
138 \fB5\fR
139 No permission to read one of the files passed on the command line.
140 .SH "SEE ALSO"
141 .PP
142 \fBxdg\-icon\-resource\fR(1),
143 \fBxdg\-desktop\-menu\fR(1)
144 .SH "EXAMPLES"
145 .PP
146 .nf
147 xdg\-mime query filetype /tmp/foobar.png
148 .fi
149 .sp
150 Prints the MIME type of the file /tmp/foobar.png, in this case image/png
151 .PP
152 .nf
153 xdg\-mime query default image/png
154 .fi
155 .sp
156 Prints the .desktop filename of the application which is registered to open PNG files.
157 .PP
158 .nf
159 xdg\-mime install shinythings\-shiny.xml
160 .fi
161 .sp
162 Adds a file type description for "shiny"\-files. "shinythings\-" is used as the vendor prefix. The file type description could look as folows.
163 .sp
164 .nf
165 shinythings\-shiny.xml:
166
167 <?xml version="1.0"?>
168 <mime\-info xmlns='http://www.freedesktop.org/standards/shared\-mime\-info'>
169 <mime\-type type="text/x\-shiny">
170 <comment>Shiny new file type</comment>
171 <glob pattern="*.shiny"/>
172 <glob pattern="*.shi"/>
173 </mime\-type>
174 </mime\-info>
175 .fi
176 .sp
177 An icon for this new file type must also be installed, for example with:
178 .sp
179 .nf
180 xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 shiny\-file\-icon. png text\-x\-shiny
181 .fi
182 .sp
183 .SH "AUTHOR"
184 Kevin Krammer, Jeremy White.
185 .br
186 <kevin.krammer@gmx.at>
187 .br
188 <jwhite@codeweavers.com>
OLDNEW
« no previous file with comments | « third_party/xdg-utils/scripts/man/xdg-icon-resource.1 ('k') | third_party/xdg-utils/scripts/man/xdg-open.1 » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698