summaryrefslogtreecommitdiff
path: root/scripts/man/xdg-icon-resource.1
blob: e89afb59c1f65ca9d32402cdc217c7dcbb5350a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
.\" ** You probably do not want to edit this file directly **
.\" It was generated using the DocBook XSL Stylesheets (version 1.69.1).
.\" Instead of manually editing it, you probably should edit the DocBook XML
.\" source for it and then use the DocBook XSL Stylesheets to regenerate it.
.TH "XDG\-ICON\-RESOURCE" "1" "06/24/2007" "xdg\-utils 1.0" ""
.\" disable hyphenation
.nh
.\" disable justification (adjust text to left margin only)
.ad l
.SH "NAME"
xdg\-icon\-resource \- command line tool for (un)installing icon resources
.SH "SYNOPSIS"
.HP 18
\fBxdg\-icon\-resource\fR install [\fB\-\-noupdate\fR] [\fB\-\-novendor\fR] [\fB\-\-theme\ \fR\fB\fItheme\fR\fR] [\fB\-\-context\ \fR\fB\fIcontext\fR\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fB\-\-size\ \fR\fB\fIsize\fR\fR \fIicon\-file\fR [\fIicon\-name\fR]
.HP 18
\fBxdg\-icon\-resource\fR uninstall [\fB\-\-noupdate\fR] [\fB\-\-theme\ \fR\fB\fItheme\fR\fR] [\fB\-\-context\ \fR\fB\fIcontext\fR\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR] \fB\-\-size\ \fR\fB\fIsize\fR\fR \fIicon\-name\fR
.HP 18
\fBxdg\-icon\-resource\fR forceupdate [\fB\-\-theme\ \fR\fB\fItheme\fR\fR] [\fB\-\-mode\ \fR\fB\fImode\fR\fR]
.HP 18
\fBxdg\-icon\-resource\fR {\fB\-\-help\fR \fB\-\-manual\fR \fB\-\-version\fR}
.SH "DESCRIPTION"
.PP
The xdg\-icon\-resource program can be used to install icon resources into the desktop icon system in order to illustrate menu entries, to depict desktop icons or to graphically represent file types.
.PP
The desktop icon system identifies icons by name. Depending on the required size, the choice of icon theme and the context in which the icon is used, the desktop icon system locates an appropriate icon resource to depict an icon. Icon resources can be XPM files or PNG files.
.PP
The desktop icon system works according to the XDG Icon Theme Specification at http://www.freedesktop.org/Standards/icon\-theme\-spec
.SH "COMMANDS"
.TP
install
Installs the icon file indicated by
\fIicon\-file\fR
to the desktop icon system under the name
\fIicon\-name\fR. Icon names do not have an extension. If
\fIicon\-name\fR
is not provided the name is derived from
\fIicon\-file\fR. The icon file must have
\fI.png\fR
or
\fI.xpm\fR
as extension. If a corresponding
\fI.icon\fR
file exists in the same location as
\fIicon\-file\fR
it will be installed as well.
.TP
uninstall
Removes the icon indicated by
\fIicon\-name\fR
from the desktop icon system. Note that icon names do not have an extension.
.TP
forceupdate
Force an update of the desktop icon system. This is only useful if the last call to xdg\-icon\-resource included the
\fB\-\-noupdate\fR
option.
.SH "OPTIONS"
.TP
\fB\-\-noupdate\fR
Postpone updating the desktop icon system. If multiple icons are added in sequence this flag can be used to indicate that additional changes will follow and that it is not necassery to update the desktop icon system right away.
.TP
\fB\-\-novendor\fR
Normally, xdg\-icon\-resource checks to ensure that an icon file to be installed in the
\fIapps\fR
context has a proper vendor prefix. This option can be used to disable that check.
.sp
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 phrase, 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.
.TP
\fB\-\-theme\fR \fItheme\fR
Installs or removes the icon file as part of
\fItheme\fR. If no theme is specified the icons will be installed as part of the default
\fIhicolor\fR
theme. Applications may install icons under multiple themes but should at least install icons for the default
\fIhicolor\fR
theme.
.TP
\fB\-\-context\fR \fIcontext\fR
Specifies the context for the icon. Icons to be used in the application menu and as desktop icon should use
\fIapps\fR
as context which is the default context. Icons to be used as file icons should use
\fImimetypes\fR
as context. Other common contexts are
\fIactions\fR,
\fIdevices\fR,
\fIemblems\fR,
\fIfilesystems\fR
and
\fIstock\fR.
.TP
\fB\-\-size\fR \fIsize\fR
Specifies the size of the icon. All icons must be square. Common sizes for icons in the apps context are: 16, 22, 32, 48, 64 and 128. Common sizes for icons in the mimetypes context are: 16, 22, 32, 48, 64 and 128
.TP
\fB\-\-mode\fR \fImode\fR
\fImode\fR
can be
\fIuser\fR
or
\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 only root is allowed to install in system mode.
.sp
The default is to use system mode when called by root and to use user mode when called by a non\-root user.
.TP
\fB\-\-help\fR
Show command synopsis.
.TP
\fB\-\-manual\fR
Show this manualpage.
.TP
\fB\-\-version\fR
Show the xdg\-utils version information.
.SH "ENVIRONMENT VARIABLES"
.PP
xdg\-icon\-resource honours the following environment variables:
.TP
XDG_UTILS_DEBUG_LEVEL
Setting this environment variable to a non\-zero numerical value makes xdg\-icon\-resource do more verbose reporting on stderr. Setting a higher value increases the verbosity.
.TP
XDG_UTILS_INSTALL_MODE
This environment variable can be used by the user or administrator to override the installation mode. Valid values are
\fIuser\fR
and
\fIsystem\fR.
.SH "EXIT CODES"
.PP
An exit code of 0 indicates success while a non\-zero exit code indicates failure. The following failure codes can be returned:
.TP
\fB1\fR
Error in command line syntax.
.TP
\fB2\fR
One of the files passed on the command line did not exist.
.TP
\fB3\fR
A required tool could not be found.
.TP
\fB4\fR
The action failed.
.TP
\fB5\fR
No permission to read one of the files passed on the command line.
.SH "SEE ALSO"
.PP
\fBxdg\-desktop\-icon\fR(1),
\fBxdg\-desktop\-menu\fR(1),
\fBxdg\-mime\fR(1)
.SH "EXAMPLES"
.PP
To install an icon resource to depict a launcher for the application myfoobar, the company ShinyThings Inc. can use:
.sp
.nf
xdg\-icon\-resource install \-\-size 64 shinythings\-myfoobar.png
.fi
.sp
.PP
To install an icon for a new application/x\-foobar file type one can use:
.sp
.nf
xdg\-icon\-resource install \-\-context mimetypes \-\-size 48 ./mime\-foobar\-48.png application\-x\-foobar
xdg\-icon\-resource install \-\-context mimetypes \-\-size 64 ./mime\-foobar\-64.png application\-x\-foobar
.fi
.sp
This will install two icons with the name application\-x\-foobar but with different sizes.
.SH "AUTHOR"
Kevin Krammer, Jeremy White. 
.br
<kevin.krammer@gmx.at>
.br
<jwhite@codeweavers.com>