OLD | NEW |
(Empty) | |
| 1 <?xml version="1.0"?> |
| 2 <?xml-stylesheet type="text/xsl" |
| 3 href="http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl
"?> |
| 4 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
| 5 "http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [ |
| 6 ]> |
| 7 <refentry id="xdg-desktop-menu"> |
| 8 <refentryinfo> |
| 9 <title>xdg-desktop-menu Manual</title> |
| 10 <copyright> |
| 11 <year>2006</year> |
| 12 </copyright> |
| 13 <author> |
| 14 <firstname>Kevin</firstname> |
| 15 <surname>Krammer</surname> |
| 16 </author> |
| 17 <address><email>kevin.krammer@gmx.at</email></address> |
| 18 <author> |
| 19 <firstname>Jeremy</firstname> |
| 20 <surname>White</surname> |
| 21 </author> |
| 22 <address><email>jwhite@codeweavers.com</email></address> |
| 23 <releaseinfo>xdg-utils 1.0</releaseinfo> |
| 24 </refentryinfo> |
| 25 |
| 26 <refmeta> |
| 27 <refentrytitle>xdg-desktop-menu</refentrytitle> |
| 28 <manvolnum>1</manvolnum> |
| 29 </refmeta> |
| 30 |
| 31 <refnamediv> |
| 32 <refname>xdg-desktop-menu</refname> |
| 33 <refpurpose>command line tool for (un)installing desktop menu items</refpurp
ose> |
| 34 </refnamediv> |
| 35 |
| 36 <refsynopsisdiv> |
| 37 <cmdsynopsis> |
| 38 <command>xdg-desktop-menu</command> |
| 39 <arg choice="plain">install</arg> |
| 40 <arg><option>--noupdate</option></arg> |
| 41 <arg><option>--novendor</option></arg> |
| 42 <arg><option>--mode <replaceable>mode</replaceable></option></arg> |
| 43 <arg choice="plain"><replaceable>directory-file(s)</replaceable></arg> |
| 44 <arg choice="plain"><replaceable>desktop-file(s)</replaceable></arg> |
| 45 </cmdsynopsis> |
| 46 <cmdsynopsis> |
| 47 <command>xdg-desktop-menu</command> |
| 48 <arg choice="plain">uninstall</arg> |
| 49 <arg><option>--noupdate</option></arg> |
| 50 <arg><option>--mode <replaceable>mode</replaceable></option></arg> |
| 51 <arg choice="plain"><replaceable>directory-file(s)</replaceable></arg> |
| 52 <arg choice="plain"><replaceable>desktop-file(s)</replaceable></arg> |
| 53 </cmdsynopsis> |
| 54 <cmdsynopsis> |
| 55 <command>xdg-desktop-menu</command> |
| 56 <arg choice="plain">forceupdate</arg> |
| 57 <arg><option>--mode <replaceable>mode</replaceable></option></arg> |
| 58 </cmdsynopsis> |
| 59 <cmdsynopsis> |
| 60 <command>xdg-desktop-menu</command> |
| 61 <group choice="req"> |
| 62 <arg choice="plain"><option>--help</option></arg> |
| 63 <arg choice="plain"><option>--manual</option></arg> |
| 64 <arg choice="plain"><option>--version</option></arg> |
| 65 </group> |
| 66 </cmdsynopsis> |
| 67 </refsynopsisdiv> |
| 68 |
| 69 <refsect1 id="description"> |
| 70 <title>Description</title> |
| 71 <para> |
| 72 The xdg-desktop-menu program can be used to install new menu entries |
| 73 to the desktop's application menu. |
| 74 </para> |
| 75 <para> |
| 76 The application menu works according to the |
| 77 XDG Desktop Menu Specification at |
| 78 http://www.freedesktop.org/Standards/menu-spec |
| 79 </para> |
| 80 </refsect1> |
| 81 <refsect1 id="commands"> |
| 82 <title>Commands</title> |
| 83 <variablelist> |
| 84 <varlistentry> |
| 85 <term>install</term> |
| 86 <listitem> |
| 87 <simpara> |
| 88 Install one or more applications in a submenu of |
| 89 the desktop menu system. |
| 90 </simpara> |
| 91 <simpara><replaceable>desktop-file</replaceable>: |
| 92 A desktop file represents a single menu entry in the menu. |
| 93 Desktop files are defined by the freedesktop.org Desktop Entry |
| 94 Specification. The most important aspects of *.desktop |
| 95 files are summarized below. |
| 96 </simpara> |
| 97 <simpara> |
| 98 Menu entries can be added to the menu system in two different |
| 99 ways. They can either be added to a predefined submenu in the |
| 100 menu system based on one or more category keywords, or they can |
| 101 be added to a new submenu. |
| 102 </simpara> |
| 103 <simpara> |
| 104 To add a menu entry to a predefined submenu the desktop file |
| 105 that represents the menu entry must have a Categories= entry |
| 106 that lists one or more keywords. The menu item will be included |
| 107 in an appropriate submenu based on the included keywords. |
| 108 </simpara> |
| 109 <simpara> |
| 110 To add menu items to a new submenu the desktop-files must be |
| 111 preceded by a directory-file that describes the submenu. |
| 112 If multiple desktop-files are specified, all entries will |
| 113 be added to the same menu. If entries are installed to a menu |
| 114 that has been created with a previous call to |
| 115 <command>xdg-desktop-menu</command> the entries will be |
| 116 installed in addition to any already existing entries. |
| 117 </simpara> |
| 118 <simpara><replaceable>directory-file</replaceable>: |
| 119 The *.directory file indicated by |
| 120 <replaceable>directory-file</replaceable> represents a submenu. |
| 121 The directory file provides the name and icon for a submenu. The |
| 122 name of the directory file is used to identify the submenu. |
| 123 </simpara> |
| 124 <simpara> |
| 125 If multiple directory files are provided each file will |
| 126 represent a submenu within the menu that preceeds it, creating |
| 127 a nested menu hierarchy (sub-sub-menus). |
| 128 The menu entries themselves will be added to the last submenu. |
| 129 </simpara> |
| 130 <simpara> |
| 131 Directory files follow the syntax defined by the freedesktop.org |
| 132 Desktop Entry Specification. |
| 133 </simpara> |
| 134 </listitem> |
| 135 </varlistentry> |
| 136 |
| 137 <varlistentry> |
| 138 <term>uninstall</term> |
| 139 <listitem> |
| 140 <simpara> |
| 141 Remove applications or submenus from the desktop menu system |
| 142 previously installed with <command>xdg-desktop-menu install</command
>. |
| 143 </simpara> |
| 144 <simpara> |
| 145 A submenu and the associated directory file is only removed |
| 146 when the submenu no longer contains any menu entries. |
| 147 </simpara> |
| 148 </listitem> |
| 149 </varlistentry> |
| 150 |
| 151 <varlistentry> |
| 152 <term>forceupdate</term> |
| 153 <listitem> |
| 154 <simpara> |
| 155 Force an update of the menu system. |
| 156 </simpara> |
| 157 <simpara> |
| 158 This command is only useful if the last call to |
| 159 xdg-desktop-menu included the <option>--noupdate</option> option. |
| 160 </simpara> |
| 161 </listitem> |
| 162 </varlistentry> |
| 163 </variablelist> |
| 164 </refsect1> |
| 165 <refsect1 id="options"> |
| 166 <title>Options</title> |
| 167 <variablelist> |
| 168 <varlistentry> |
| 169 <term><option>--noupdate</option></term> |
| 170 <listitem> |
| 171 <simpara> |
| 172 Postpone updating the menu system. If multiple updates to the |
| 173 menu system are made in sequence this flag can be used to |
| 174 indicate that additional changes will follow and that it is not |
| 175 necassery to update the menu system right away. |
| 176 </simpara> |
| 177 </listitem> |
| 178 </varlistentry> |
| 179 |
| 180 <varlistentry> |
| 181 <term><option>--novendor</option></term> |
| 182 <listitem> |
| 183 <simpara> |
| 184 Normally, xdg-desktop-menu checks to ensure that any *.directory |
| 185 and *.desktop files to be installed has a vendor prefix. |
| 186 This option can be used to disable that check. |
| 187 </simpara> |
| 188 <simpara> |
| 189 A vendor prefix consists of alpha characters ([a-zA-Z]) and is |
| 190 terminated with a dash ("-"). |
| 191 Companies and organizations are encouraged to use a word |
| 192 or phrase, preferably the organizations name, for which they hold |
| 193 a trademark as their vendor prefix. |
| 194 The purpose of the vendor prefix is to prevent name conflicts. |
| 195 </simpara> |
| 196 </listitem> |
| 197 </varlistentry> |
| 198 |
| 199 <varlistentry> |
| 200 <term><option>--mode</option> <replaceable>mode</replaceable></term> |
| 201 <listitem> |
| 202 <simpara><replaceable>mode</replaceable> can be |
| 203 <emphasis>user</emphasis> or <emphasis>system</emphasis>. |
| 204 In user mode the file is (un)installed for the current user |
| 205 only. In system mode the file is (un)installed for all users |
| 206 on the system. Usually only root is allowed to install in |
| 207 system mode. |
| 208 </simpara> |
| 209 <simpara> |
| 210 The default is to use system mode when called by root |
| 211 and to use user mode when called by a non-root user. |
| 212 </simpara> |
| 213 </listitem> |
| 214 </varlistentry> |
| 215 |
| 216 <varlistentry> |
| 217 <term><option>--help</option></term> |
| 218 <listitem> |
| 219 <simpara> |
| 220 Show command synopsis. |
| 221 </simpara> |
| 222 </listitem> |
| 223 </varlistentry> |
| 224 |
| 225 <varlistentry> |
| 226 <term><option>--manual</option></term> |
| 227 <listitem> |
| 228 <simpara> |
| 229 Show this manualpage. |
| 230 </simpara> |
| 231 </listitem> |
| 232 </varlistentry> |
| 233 |
| 234 <varlistentry> |
| 235 <term><option>--version</option></term> |
| 236 <listitem> |
| 237 <simpara> |
| 238 Show the xdg-utils version information. |
| 239 </simpara> |
| 240 </listitem> |
| 241 </varlistentry> |
| 242 |
| 243 </variablelist> |
| 244 </refsect1> |
| 245 <refsect1 id="desktopfiles"> |
| 246 <title>Desktop Files</title> |
| 247 <para> |
| 248 An application item in the application menu is represented by a |
| 249 *.desktop file. A *.desktop file consists of a |
| 250 <emphasis>[Desktop Entry]</emphasis> header followed by several |
| 251 <replaceable>Key</replaceable>=<replaceable>Value</replaceable> lines. |
| 252 </para> |
| 253 <para> |
| 254 A *.desktop file can provide a name and description for an application |
| 255 in several different languages. This is done by adding a language |
| 256 code as used by LC_MESSAGES in square brackets behind the |
| 257 <replaceable>Key</replaceable>. This way one can specify different |
| 258 values for the same <replaceable>Key</replaceable> depending on the |
| 259 currently selected language. |
| 260 </para> |
| 261 <para> |
| 262 The following keys are often used: |
| 263 </para> |
| 264 <variablelist> |
| 265 <varlistentry> |
| 266 <term>Value=1.0</term> |
| 267 <listitem> |
| 268 <simpara> |
| 269 This is a mandatory field to indicate that the *.desktop file |
| 270 follows the 1.0 version of the specification. |
| 271 </simpara> |
| 272 </listitem> |
| 273 </varlistentry> |
| 274 |
| 275 <varlistentry> |
| 276 <term>Type=Application</term> |
| 277 <listitem> |
| 278 <simpara> |
| 279 This is a mandatory field that indicates that the *.desktop file |
| 280 describes an application launcher. |
| 281 </simpara> |
| 282 </listitem> |
| 283 </varlistentry> |
| 284 |
| 285 <varlistentry> |
| 286 <term>Name=<replaceable>Application Name</replaceable></term> |
| 287 <listitem> |
| 288 <simpara> |
| 289 The name of the application. |
| 290 For example <emphasis>Mozilla</emphasis> |
| 291 </simpara> |
| 292 </listitem> |
| 293 </varlistentry> |
| 294 |
| 295 <varlistentry> |
| 296 <term>GenericName=<replaceable>Generic Name</replaceable></term> |
| 297 <listitem> |
| 298 <simpara> |
| 299 A generic description of the application. |
| 300 For example <emphasis>Web Browser</emphasis> |
| 301 </simpara> |
| 302 </listitem> |
| 303 </varlistentry> |
| 304 |
| 305 <varlistentry> |
| 306 <term>Comment=<replaceable>Comment</replaceable></term> |
| 307 <listitem> |
| 308 <simpara> |
| 309 Optional field to specify a tooltip for the application. |
| 310 For example <emphasis>Visit websites on the Internet</emphasis> |
| 311 </simpara> |
| 312 </listitem> |
| 313 </varlistentry> |
| 314 |
| 315 <varlistentry> |
| 316 <term>Icon=<replaceable>Icon File</replaceable></term> |
| 317 <listitem> |
| 318 <simpara> |
| 319 The icon to use for the application. This can either be |
| 320 an absolute path to an image file or an icon-name. |
| 321 If an icon-name is provided an image lookup by name is done |
| 322 in the user's current icon theme. The <command>xdg-icon-resource</co
mmand> |
| 323 command can be used to install image files into icon themes. |
| 324 The advantage of using an icon-name instead of an absolute |
| 325 path is that with an icon-name the application icon can be |
| 326 provided in several different sizes as well as in several |
| 327 differently themed styles. |
| 328 </simpara> |
| 329 </listitem> |
| 330 </varlistentry> |
| 331 |
| 332 <varlistentry> |
| 333 <term>Exec=<replaceable>Command Line</replaceable></term> |
| 334 <listitem> |
| 335 <simpara> |
| 336 The command line to start the application. If the application |
| 337 can open files the %f placeholder should be specified. When |
| 338 a file is dropped on the application launcher the %f is replaced |
| 339 with the file path of the dropped file. If multiple files |
| 340 can be specified on the command line the %F placeholder should |
| 341 be used instead of %f. If the application is able to open URLs |
| 342 in addition to local files then %u or %U can be used instead |
| 343 of %f or %F. |
| 344 </simpara> |
| 345 </listitem> |
| 346 </varlistentry> |
| 347 |
| 348 <varlistentry> |
| 349 <term>Categories=<replaceable>Categories</replaceable></term> |
| 350 <listitem> |
| 351 <simpara> |
| 352 A list of categories separated by semi-colons. A category is |
| 353 a keyword that describes and classifies the application. |
| 354 By default applications are organized in the application menu |
| 355 based on category. When menu entries are explicitly assigned |
| 356 to a new submenu it is not necassery to list any categories. |
| 357 </simpara> |
| 358 <simpara> |
| 359 When using categories it is recommended to include |
| 360 one of the following categories: |
| 361 AudioVideo, Development, Education, Game, Graphics, Network, |
| 362 Office, Settings, System, Utility. |
| 363 </simpara> |
| 364 <simpara> |
| 365 See Appendix A of the XDG Desktop Menu Specification |
| 366 for information about additional categories. |
| 367 http://standards.freedesktop.org/menu-spec/menu-spec-1.0.html |
| 368 </simpara> |
| 369 </listitem> |
| 370 </varlistentry> |
| 371 |
| 372 <varlistentry> |
| 373 <term>MimeType=<replaceable>Mimetypes</replaceable></term> |
| 374 <listitem> |
| 375 <simpara> |
| 376 A list of mimetypes separated by semi-colons. This field is |
| 377 used to indicate which file types the application is able to |
| 378 open. |
| 379 </simpara> |
| 380 </listitem> |
| 381 </varlistentry> |
| 382 </variablelist> |
| 383 <para> |
| 384 For a complete oveview of the *.desktop file format please |
| 385 visit http://www.freedesktop.org/wiki/Standards/desktop-entry-spec |
| 386 </para> |
| 387 </refsect1> |
| 388 <refsect1 id="directoryfiles"> |
| 389 <title>Directory Files</title> |
| 390 <para> |
| 391 The appearance of submenu in the application menu is |
| 392 provided by a *.directory file. In particular it provides the title |
| 393 of the submenu and a possible icon. A *.directory file consists of a |
| 394 <emphasis>[Desktop Entry]</emphasis> header followed by several |
| 395 <replaceable>Key</replaceable>=<replaceable>Value</replaceable> lines. |
| 396 </para> |
| 397 <para> |
| 398 A *.directory file can provide a title (name) for the submenu |
| 399 in several different languages. This is done by adding a language |
| 400 code as used by LC_MESSAGES in square brackets behind the |
| 401 <replaceable>Key</replaceable>. This way one can specify different |
| 402 values for the same <replaceable>Key</replaceable> depending on the |
| 403 currently selected language. |
| 404 </para> |
| 405 <para> |
| 406 The following keys are relevqnt for submenus: |
| 407 </para> |
| 408 <variablelist> |
| 409 <varlistentry> |
| 410 <term>Value=1.0</term> |
| 411 <listitem> |
| 412 <simpara> |
| 413 This is a mandatory field to indicate that the *.directory file |
| 414 follows the 1.0 version of the Desktop Entry specification. |
| 415 </simpara> |
| 416 </listitem> |
| 417 </varlistentry> |
| 418 |
| 419 <varlistentry> |
| 420 <term>Type=Directory</term> |
| 421 <listitem> |
| 422 <simpara> |
| 423 This is a mandatory field that indicates that the *.directory file |
| 424 describes a submenu. |
| 425 </simpara> |
| 426 </listitem> |
| 427 </varlistentry> |
| 428 |
| 429 <varlistentry> |
| 430 <term>Name=<replaceable>Menu Name</replaceable></term> |
| 431 <listitem> |
| 432 <simpara> |
| 433 The title of submenu. |
| 434 For example <emphasis>Mozilla</emphasis> |
| 435 </simpara> |
| 436 </listitem> |
| 437 </varlistentry> |
| 438 |
| 439 <varlistentry> |
| 440 <term>Comment=<replaceable>Comment</replaceable></term> |
| 441 <listitem> |
| 442 <simpara> |
| 443 Optional field to specify a tooltip for the submenu. |
| 444 </simpara> |
| 445 </listitem> |
| 446 </varlistentry> |
| 447 |
| 448 <varlistentry> |
| 449 <term>Icon=<replaceable>Icon File</replaceable></term> |
| 450 <listitem> |
| 451 <simpara> |
| 452 The icon to use for the submenu. This can either be |
| 453 an absolute path to an image file or an icon-name. |
| 454 If an icon-name is provided an image lookup by name is done |
| 455 in the user's current icon theme. |
| 456 The <command>xdg-icon-resource</command> |
| 457 command can be used to install image files into icon themes. |
| 458 The advantage of using an icon-name instead of an absolute |
| 459 path is that with an icon-name the submenu icon can be |
| 460 provided in several different sizes as well as in several |
| 461 differently themed styles. |
| 462 </simpara> |
| 463 </listitem> |
| 464 </varlistentry> |
| 465 |
| 466 </variablelist> |
| 467 </refsect1> |
| 468 <refsect1 id="env_vars"> |
| 469 <title>Environment Variables</title> |
| 470 <para> |
| 471 xdg-desktop-menu honours the following environment variables: |
| 472 </para> |
| 473 <variablelist> |
| 474 <varlistentry> |
| 475 <term>XDG_UTILS_DEBUG_LEVEL</term> |
| 476 <listitem> |
| 477 <simpara> |
| 478 Setting this environment variable to a non-zero numerical value |
| 479 makes xdg-desktop-menu do more verbose reporting on stderr. |
| 480 Setting a higher value increases the verbosity. |
| 481 </simpara> |
| 482 </listitem> |
| 483 </varlistentry> |
| 484 <varlistentry> |
| 485 <term>XDG_UTILS_INSTALL_MODE</term> |
| 486 <listitem> |
| 487 <simpara> |
| 488 This environment variable can be used by the user or |
| 489 administrator to override the installation mode. |
| 490 Valid values are <emphasis>user</emphasis> and |
| 491 <emphasis>system</emphasis>. |
| 492 </simpara> |
| 493 </listitem> |
| 494 </varlistentry> |
| 495 </variablelist> |
| 496 </refsect1> |
| 497 |
| 498 <refsect1 id="exitcodes"> |
| 499 <title>Exit Codes</title> |
| 500 <para> |
| 501 An exit code of 0 indicates success while a non-zero exit code |
| 502 indicates failure. The following failure codes can be returned: |
| 503 </para> |
| 504 <variablelist> |
| 505 <varlistentry> |
| 506 <term><option>1</option></term> |
| 507 <listitem> |
| 508 <simpara> |
| 509 Error in command line syntax. |
| 510 </simpara> |
| 511 </listitem> |
| 512 </varlistentry> |
| 513 <varlistentry> |
| 514 <term><option>2</option></term> |
| 515 <listitem> |
| 516 <simpara> |
| 517 One of the files passed on the command line did not exist. |
| 518 </simpara> |
| 519 </listitem> |
| 520 </varlistentry> |
| 521 <varlistentry> |
| 522 <term><option>3</option></term> |
| 523 <listitem> |
| 524 <simpara> |
| 525 A required tool could not be found. |
| 526 </simpara> |
| 527 </listitem> |
| 528 </varlistentry> |
| 529 <varlistentry> |
| 530 <term><option>4</option></term> |
| 531 <listitem> |
| 532 <simpara> |
| 533 The action failed. |
| 534 </simpara> |
| 535 </listitem> |
| 536 </varlistentry> |
| 537 <varlistentry> |
| 538 <term><option>5</option></term> |
| 539 <listitem> |
| 540 <simpara> |
| 541 No permission to read one of the files passed on the command |
| 542 line. |
| 543 </simpara> |
| 544 </listitem> |
| 545 </varlistentry> |
| 546 </variablelist> |
| 547 </refsect1> |
| 548 <refsect1 id="seealso"> |
| 549 <title>See Also</title> |
| 550 <para><citerefentry><refentrytitle>xdg-desktop-icon</refentrytitle> |
| 551 <manvolnum>1</manvolnum> |
| 552 </citerefentry>, |
| 553 <citerefentry><refentrytitle>xdg-icon-resource</refentrytitle> |
| 554 <manvolnum>1</manvolnum> |
| 555 </citerefentry>, |
| 556 <citerefentry><refentrytitle>xdg-mime</refentrytitle> |
| 557 <manvolnum>1</manvolnum> |
| 558 </citerefentry> |
| 559 </para> |
| 560 </refsect1> |
| 561 <refsect1 id="examples"> |
| 562 <title>Examples</title> |
| 563 |
| 564 <para> |
| 565 The company ShinyThings Inc. has developed an application named |
| 566 "WebMirror" and would like to add it to the application menu. |
| 567 The company will use "shinythings" as its vendor id. |
| 568 In order to add the application to the menu there needs to be a |
| 569 .desktop file with a suitable <emphasis>Categories</emphasis> entry: |
| 570 <programlisting> |
| 571 shinythings-webmirror.desktop: |
| 572 |
| 573 [Desktop Entry] |
| 574 Encoding=UTF-8 |
| 575 Type=Application |
| 576 |
| 577 Exec=webmirror |
| 578 Icon=webmirror |
| 579 |
| 580 Name=WebMirror |
| 581 Name[nl]=WebSpiegel |
| 582 |
| 583 Categories=Network;WebDevelopment; |
| 584 </programlisting> |
| 585 </para> |
| 586 <para>Now the xdg-desktop-menu tool can be used to add the |
| 587 shinythings-webmirror.desktop file to the desktop application menu: |
| 588 <programlisting> |
| 589 xdg-desktop-menu install ./shinythings-webmirror.desktop |
| 590 </programlisting> |
| 591 </para> |
| 592 <para> |
| 593 Note that for the purpose of this example the menu items are available |
| 594 in two languages, English and Dutch. |
| 595 The language code for Dutch is nl. |
| 596 </para> |
| 597 <para> |
| 598 In the next example the company ShinyThings Inc. will add its own |
| 599 submenu to the desktop application menu consisting of a |
| 600 "WebMirror" menu item and a "WebMirror Admin Tool" menu item. |
| 601 </para> |
| 602 <para> |
| 603 First the company needs to create two .desktop files that describe |
| 604 the two menu items. Since the items are to be added to a new submenu |
| 605 it is not necassery to include a Categories= line: |
| 606 <programlisting> |
| 607 shinythings-webmirror.desktop: |
| 608 |
| 609 [Desktop Entry] |
| 610 Encoding=UTF-8 |
| 611 Type=Application |
| 612 |
| 613 Exec=webmirror |
| 614 Icon=shinythings-webmirror |
| 615 |
| 616 Name=WebMirror |
| 617 Name[nl]=WebSpiegel |
| 618 |
| 619 |
| 620 shinythings-webmirror-admin.desktop: |
| 621 |
| 622 [Desktop Entry] |
| 623 Encoding=UTF-8 |
| 624 Type=Application |
| 625 |
| 626 Exec=webmirror-admintool |
| 627 Icon=shinythings-webmirror-admintool |
| 628 |
| 629 Name=WebMirror Admin Tool |
| 630 Name[nl]=WebSpiegel Administratie Tool |
| 631 </programlisting> |
| 632 </para> |
| 633 <para> |
| 634 In addition a .directory file needs to be created to provide a title and i
con |
| 635 for the sub-menu itself: |
| 636 <programlisting> |
| 637 shinythings-webmirror.directory: |
| 638 |
| 639 [Desktop Entry] |
| 640 Encoding=UTF-8 |
| 641 |
| 642 Icon=shinythings-webmirror-menu |
| 643 |
| 644 Name=WebMirror |
| 645 Name[nl]=WebSpiegel |
| 646 </programlisting> |
| 647 </para> |
| 648 <para> |
| 649 These file can now be installed with: |
| 650 <programlisting> |
| 651 xdg-desktop-menu install ./shinythings-webmirror.directory \ |
| 652 ./shinythings-webmirror.desktop ./shinythings-webmirror-admin.desktop |
| 653 </programlisting> |
| 654 </para> |
| 655 <para> |
| 656 The menu entries could also be installed one by one: |
| 657 <programlisting> |
| 658 xdg-desktop-menu install --noupdate ./shinythings-webmirror.directory \ |
| 659 ./shinythings-webmirror.desktop |
| 660 xdg-desktop-menu install --noupdate ./shinythings-webmirror.directory \ |
| 661 ./shinythings-webmirror-admin.desktop |
| 662 xdg-desktop-menu forceupdate |
| 663 </programlisting> |
| 664 </para> |
| 665 <para> |
| 666 Although the result is the same it is slightly more efficient to |
| 667 install all files at the same time. |
| 668 </para> |
| 669 <para> |
| 670 The *.desktop and *.directory files reference icons with the names |
| 671 webmirror, webmirror-admin and webmirror-menu which should also be |
| 672 installed. In this example the icons are installed in two different |
| 673 sizes, once with a size of 22x22 pixels and once with a size |
| 674 of 64x64 pixels: |
| 675 <programlisting> |
| 676 xdg-icon-resource install --size 22 ./wmicon-22.png shinythings-webmirror |
| 677 xdg-icon-resource install --size 22 ./wmicon-menu-22.png shinythings-webmirror-m
enu |
| 678 xdg-icon-resource install --size 22 ./wmicon-admin-22.png shinythings-webmirror-
admin |
| 679 xdg-icon-resource install --size 64 ./wmicon-64.png shinythings-webmirror |
| 680 xdg-icon-resource install --size 64 ./wmicon-menu-64.png shinythings-webmirror-m
enu |
| 681 xdg-icon-resource install --size 64 ./wmicon-admin-64.png shinythings-webmirror-
admin |
| 682 </programlisting> |
| 683 </para> |
| 684 </refsect1> |
| 685 </refentry> |
OLD | NEW |