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

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

Issue 6737007: Update xdg-utils to the latest version available in git. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/
Patch Set: Created 9 years, 8 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
1 .\" ** You probably do not want to edit this file directly ** 1 '\" t
2 .\" It was generated using the DocBook XSL Stylesheets (version 1.69.1). 2 .\" Title: xdg-mime
3 .\" Instead of manually editing it, you probably should edit the DocBook XML 3 .\" Author: Kevin Krammer
4 .\" source for it and then use the DocBook XSL Stylesheets to regenerate it. 4 .\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/>
5 .TH "XDG\-MIME" "1" "06/24/2007" "xdg\-utils 1.0" "" 5 .\" Date: 12/31/2010
6 .\" Manual: xdg-mime Manual
7 .\" Source: xdg-utils 1.0
8 .\" Language: English
9 .\"
10 .TH "XDG\-MIME" "1" "12/31/2010" "xdg-utils 1.0" "xdg-mime Manual"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
6 .\" disable hyphenation 23 .\" disable hyphenation
7 .nh 24 .nh
8 .\" disable justification (adjust text to left margin only) 25 .\" disable justification (adjust text to left margin only)
9 .ad l 26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
10 .SH "NAME" 30 .SH "NAME"
11 xdg\-mime \- command line tool for querying information about file type handling and adding descriptions for new file types 31 xdg-mime \- command line tool for querying information about file type handling and adding descriptions for new file types
12 .SH "SYNOPSIS" 32 .SH "SYNOPSIS"
13 .HP 9 33 .HP \w'\fBxdg\-mime\fR\ 'u
14 \fBxdg\-mime\fR query {filetype default} ... 34 \fBxdg\-mime\fR query {filetype | default} \&.\&.\&.
15 .HP 9 35 .HP \w'\fBxdg\-mime\fR\ 'u
16 \fBxdg\-mime\fR default \fIapplication\fR \fImimetype(s)\fR 36 \fBxdg\-mime\fR default \fIapplication\fR \fImimetype(s)\fR
17 .HP 9 37 .HP \w'\fBxdg\-mime\fR\ 'u
18 \fBxdg\-mime\fR install [\fB\-\-mode\ \fR\fB\fImode\fR\fR] [\fB\-\-novendor\fR] \fImimetypes\-file\fR 38 \fBxdg\-mime\fR install [\fB\-\-mode\ \fR\fB\fImode\fR\fR] [\fB\-\-novendor\fR] \fImimetypes\-file\fR
19 .HP 9 39 .HP \w'\fBxdg\-mime\fR\ 'u
20 \fBxdg\-mime\fR uninstall [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fImimetypes\-file\ fR 40 \fBxdg\-mime\fR uninstall [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fImimetypes\-file\ fR
21 .HP 9 41 .HP \w'\fBxdg\-mime\fR\ 'u
22 \fBxdg\-mime\fR {\fB\-\-help\fR \fB\-\-manual\fR \fB\-\-version\fR} 42 \fBxdg\-mime\fR {\fB\-\-help\fR | \fB\-\-manual\fR | \fB\-\-version\fR}
23 .SH "DESCRIPTION" 43 .SH "DESCRIPTION"
24 .PP 44 .PP
25 The xdg\-mime program can be used to query information about file types and to a dd descriptions for new file types. 45 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" 46 .SH "COMMANDS"
27 .TP 47 .PP
28 query 48 query
29 Returns information related to file types. 49 .RS 4
50 Returns information related to file types\&.
30 .sp 51 .sp
31 The 52 The
32 \fIquery\fR 53 \fIquery\fR
33 option is for use inside a desktop session only. It is not recommended to use xd g\-mime query as root. 54 option is for use inside a desktop session only\&. It is not recommended to use xdg\-mime query as root\&.
34 .sp 55 .sp
35 The following queries are supported: 56 The following queries are supported:
36 .sp 57 .sp
37 query filetype 58 query filetype
38 \fIFILE\fR: Returns the file type of 59 \fIFILE\fR: Returns the file type of
39 \fIFILE\fR 60 \fIFILE\fR
40 in the form of a MIME type. 61 in the form of a MIME type\&.
41 .sp 62 .sp
42 query default 63 query default
43 \fImimetype\fR: Returns the default application that the desktop environment use s for opening files of type 64 \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. 65 \fImimetype\fR\&. The default application is identified by its *\&.desktop file\ &.
45 .TP 66 .RE
67 .PP
46 default 68 default
69 .RS 4
47 Ask the desktop environment to make 70 Ask the desktop environment to make
48 \fIapplication\fR 71 \fIapplication\fR
49 the default application for opening files of type 72 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. 73 \fImimetype\fR\&. An application can be made the default for several file types by specifying multiple mimetypes\&.
51 .sp 74 .sp
75
52 \fIapplication\fR 76 \fIapplication\fR
53 is the desktop file id of the application and has the form vendor\-name.desktop 77 is the desktop file id of the application and has the form vendor\-name\&.deskto p
54 \fIapplication\fR 78 \fIapplication\fR
55 must already be installed in the desktop menu before it can be made the default handler. The application's desktop file must list support for all the MIME types that it wishes to be the default handler for. 79 must already be installed in the desktop menu before it can be made the default handler\&. The aplication\*(Aqs desktop file must list support for all the MIME types that it wishes to be the default handler for\&.
56 .sp 80 .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. 81 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 82 .sp
59 The 83 The
60 \fIdefault\fR 84 \fIdefault\fR
61 option is for use inside a desktop session only. It is not recommended to use xd g\-mime default as root. 85 option is for use inside a desktop session only\&. It is not recommended to use xdg\-mime default as root\&.
62 .TP 86 .RE
87 .PP
63 install 88 install
89 .RS 4
64 Adds the file type descriptions provided in 90 Adds the file type descriptions provided in
65 \fImimetypes\-file\fR 91 \fImimetypes\-file\fR
66 to the desktop environment. 92 to the desktop environment\&.
67 \fImimetypes\-file\fR 93 \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 94 must be a XML file that follows the freedesktop\&.org Shared MIME\-info Database specification and that has a mime\-info element as its document root\&. For eac h new file type one or more icons with name
69 \fImajor\fR\-\fIminor\fR 95 \fItype\fR\-\fIsubtype\fR
70 must be installed with the 96 must be installed with the
71 \fBxdg\-icon\-resource\fR 97 \fBxdg\-icon\-resource\fR
72 command in the 98 command in the
73 \fImimetypes\fR 99 \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. 100 context\&. For example the filetype application/vnd\&.oasis\&.opendocument\&.tex t requires an icon named application\-vnd\&.oasis\&.opendocument\&.text to be in stalled (unless the file type recommends another icon name)\&.
75 .TP 101 .RE
102 .PP
76 uninstall 103 uninstall
104 .RS 4
77 Removes the file type descriptions provided in 105 Removes the file type descriptions provided in
78 \fImimetypes\-file\fR 106 \fImimetypes\-file\fR
79 and previously added with 107 and previously added with
80 \fBxdg\-mime install\fR 108 \fBxdg\-mime install\fR
81 from the desktop environment. 109 from the desktop environment\&.
82 \fImimetypes\-file\fR 110 \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. 111 must be a XML file that follows the freedesktop\&.org Shared MIME\-info Database specification and that has a mime\-info element as its document root\&.
112 .RE
84 .SH "OPTIONS" 113 .SH "OPTIONS"
85 .TP 114 .PP
86 \fB\-\-mode\fR \fImode\fR 115 \fB\-\-mode\fR \fImode\fR
116 .RS 4
87 \fImode\fR 117 \fImode\fR
88 can be 118 can be
89 \fIuser\fR 119 \fIuser\fR
90 or 120 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. 121 \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\&. Usua lly only root is allowed to install in system mode\&.
92 .sp 122 .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. 123 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 124 .RE
125 .PP
95 \fB\-\-novendor\fR 126 \fB\-\-novendor\fR
127 .RS 4
96 Normally, xdg\-mime checks to ensure that the 128 Normally, xdg\-mime checks to ensure that the
97 \fImimetypes\-file\fR 129 \fImimetypes\-file\fR
98 to be installed has a proper vendor prefix. This option can be used to disable t hat check. 130 to be installed has a proper vendor prefix\&. This option can be used to disable that check\&.
99 .sp 131 .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. 132 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 ph rase, preferably the organizations name, for which they hold a trademark as thei r vendor prefix\&. The purpose of the vendor prefix is to prevent name conflicts \&.
101 .TP 133 .RE
134 .PP
102 \fB\-\-help\fR 135 \fB\-\-help\fR
103 Show command synopsis. 136 .RS 4
104 .TP 137 Show command synopsis\&.
138 .RE
139 .PP
105 \fB\-\-manual\fR 140 \fB\-\-manual\fR
106 Show this manualpage. 141 .RS 4
107 .TP 142 Show this manualpage\&.
143 .RE
144 .PP
108 \fB\-\-version\fR 145 \fB\-\-version\fR
109 Show the xdg\-utils version information. 146 .RS 4
147 Show the xdg\-utils version information\&.
148 .RE
110 .SH "ENVIRONMENT VARIABLES" 149 .SH "ENVIRONMENT VARIABLES"
111 .PP 150 .PP
112 xdg\-mime honours the following environment variables: 151 xdg\-mime honours the following environment variables:
113 .TP 152 .PP
114 XDG_UTILS_DEBUG_LEVEL 153 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. 154 .RS 4
116 .TP 155 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 ver bosity\&.
156 .RE
157 .PP
117 XDG_UTILS_INSTALL_MODE 158 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 159 .RS 4
160 This environment variable can be used by the user or administrator to override t he installation mode\&. Valid values are
119 \fIuser\fR 161 \fIuser\fR
120 and 162 and
121 \fIsystem\fR. 163 \fIsystem\fR\&.
164 .RE
122 .SH "EXIT CODES" 165 .SH "EXIT CODES"
123 .PP 166 .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: 167 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 168 .PP
126 \fB1\fR 169 \fB1\fR
127 Error in command line syntax. 170 .RS 4
128 .TP 171 Error in command line syntax\&.
172 .RE
173 .PP
129 \fB2\fR 174 \fB2\fR
130 One of the files passed on the command line did not exist. 175 .RS 4
131 .TP 176 One of the files passed on the command line did not exist\&.
177 .RE
178 .PP
132 \fB3\fR 179 \fB3\fR
133 A required tool could not be found. 180 .RS 4
134 .TP 181 A required tool could not be found\&.
182 .RE
183 .PP
135 \fB4\fR 184 \fB4\fR
136 The action failed. 185 .RS 4
137 .TP 186 The action failed\&.
187 .RE
188 .PP
138 \fB5\fR 189 \fB5\fR
139 No permission to read one of the files passed on the command line. 190 .RS 4
191 No permission to read one of the files passed on the command line\&.
192 .RE
140 .SH "SEE ALSO" 193 .SH "SEE ALSO"
141 .PP 194 .PP
142 \fBxdg\-icon\-resource\fR(1), 195 \fBxdg-icon-resource\fR(1),
143 \fBxdg\-desktop\-menu\fR(1) 196 \fBxdg-desktop-menu\fR(1)
144 .SH "EXAMPLES" 197 .SH "EXAMPLES"
145 .PP 198 .PP
146 .nf 199
147 xdg\-mime query filetype /tmp/foobar.png 200 .sp
148 .fi 201 .if n \{\
149 .sp 202 .RS 4
150 Prints the MIME type of the file /tmp/foobar.png, in this case image/png 203 .\}
151 .PP 204 .nf
205 xdg\-mime query filetype /tmp/foobar\&.png
206 .fi
207 .if n \{\
208 .RE
209 .\}
210 .sp
211 Prints the MIME type of the file /tmp/foobar\&.png, in this case image/png
212 .PP
213
214 .sp
215 .if n \{\
216 .RS 4
217 .\}
152 .nf 218 .nf
153 xdg\-mime query default image/png 219 xdg\-mime query default image/png
154 .fi 220 .fi
155 .sp 221 .if n \{\
156 Prints the .desktop filename of the application which is registered to open PNG files. 222 .RE
157 .PP 223 .\}
158 .nf 224 .sp
159 xdg\-mime install shinythings\-shiny.xml 225 Prints the \&.desktop filename of the application which is registered to open PN G files\&.
160 .fi 226 .PP
161 .sp 227
162 Adds a file type description for "shiny"\-files. "shinythings\-" is used as the vendor prefix. The file type description could look as folows. 228 .sp
163 .sp 229 .if n \{\
164 .nf 230 .RS 4
165 shinythings\-shiny.xml: 231 .\}
166 232 .nf
167 <?xml version="1.0"?> 233 xdg\-mime install shinythings\-shiny\&.xml
168 <mime\-info xmlns='http://www.freedesktop.org/standards/shared\-mime\-info'> 234 .fi
235 .if n \{\
236 .RE
237 .\}
238 .sp
239 Adds a file type description for "shiny"\-files\&. "shinythings\-" is used as th e vendor prefix\&. The file type description could look as folows\&.
240 .sp
241 .if n \{\
242 .RS 4
243 .\}
244 .nf
245 shinythings\-shiny\&.xml:
246
247 <?xml version="1\&.0"?>
248 <mime\-info xmlns=\*(Aqhttp://www\&.freedesktop\&.org/standards/shared\-mime\-in fo\*(Aq>
169 <mime\-type type="text/x\-shiny"> 249 <mime\-type type="text/x\-shiny">
170 <comment>Shiny new file type</comment> 250 <comment>Shiny new file type</comment>
171 <glob pattern="*.shiny"/> 251 <glob pattern="*\&.shiny"/>
172 <glob pattern="*.shi"/> 252 <glob pattern="*\&.shi"/>
173 </mime\-type> 253 </mime\-type>
174 </mime\-info> 254 </mime\-info>
175 .fi 255 .fi
256 .if n \{\
257 .RE
258 .\}
176 .sp 259 .sp
177 An icon for this new file type must also be installed, for example with: 260 An icon for this new file type must also be installed, for example with:
178 .sp 261 .sp
179 .nf 262 .if n \{\
180 xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 shiny\-file\-icon. png text\-x\-shiny 263 .RS 4
181 .fi 264 .\}
182 .sp 265 .nf
183 .SH "AUTHOR" 266 xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 shiny\-file\-icon\ &.png text\-x\-shiny
184 Kevin Krammer, Jeremy White. 267 .fi
268 .if n \{\
269 .RE
270 .\}
271 .sp
272 .SH "AUTHORS"
273 .PP
274 \fBKevin Krammer\fR
275 .RS 4
276 Author.
277 .RE
278 .PP
279 \fBJeremy White\fR
280 .RS 4
281 Author.
282 .RE
283 .SH "COPYRIGHT"
185 .br 284 .br
186 <kevin.krammer@gmx.at> 285 Copyright \(co 2006
187 .br 286 .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