/[gentoo]/xml/htdocs/proj/en/glep/glep-0016.html
Gentoo

Diff of /xml/htdocs/proj/en/glep/glep-0016.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.1 Revision 1.8
6PEP, see http://www.python.org/peps/pep-0001.html for instructions and links 6PEP, see http://www.python.org/peps/pep-0001.html for instructions and links
7to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE! 7to templates. DO NOT USE THIS HTML FILE AS YOUR TEMPLATE!
8--> 8-->
9<head> 9<head>
10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 10 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
11 <meta name="generator" content="Docutils 0.3.0: http://docutils.sourceforge.net/" /> 11 <meta name="generator" content="Docutils 0.4: http://docutils.sourceforge.net/" />
12 <title>GLEP 16 -- Gentoo Menu System</title> 12 <title>GLEP 16 -- Gentoo Menu System</title>
13 <link rel="stylesheet" href="tools/glep.css" type="text/css" /> 13 <style type="text/css">
14
15/*
16:Author: David Goodger
17:Contact: goodger@users.sourceforge.net
18:date: $Date: 2007/01/25 03:26:26 $
19:version: $Revision: 1.8 $
20:copyright: This stylesheet has been placed in the public domain.
21
22Default cascading style sheet for the PEP HTML output of Docutils.
23*/
24
25.first {
26 margin-top: 0 }
27
28.last {
29 margin-bottom: 0 }
30
31.navigation {
32 width: 100% ;
33 background: #cc99ff ;
34 margin-top: 0px ;
35 margin-bottom: 0px }
36
37.navigation .navicon {
38 width: 150px ;
39 height: 35px }
40
41.navigation .textlinks {
42 padding-left: 1em ;
43 text-align: left }
44
45.navigation td, .navigation th {
46 padding-left: 0em ;
47 padding-right: 0em ;
48 vertical-align: middle }
49
50.rfc2822 {
51 margin-top: 0.5em ;
52 margin-left: 0.5em ;
53 margin-right: 0.5em ;
54 margin-bottom: 0em }
55
56.rfc2822 td {
57 text-align: left }
58
59.rfc2822 th.field-name {
60 text-align: right ;
61 font-family: sans-serif ;
62 padding-right: 0.5em ;
63 font-weight: bold ;
64 margin-bottom: 0em }
65
66a.toc-backref {
67 text-decoration: none ;
68 color: black }
69
70body {
71 margin: 0px ;
72 margin-bottom: 1em ;
73 padding: 0px }
74
75dd {
76 margin-bottom: 0.5em }
77
78div.section {
79 margin-left: 1em ;
80 margin-right: 1em ;
81 margin-bottom: 1.5em }
82
83div.section div.section {
84 margin-left: 0em ;
85 margin-right: 0em ;
86 margin-top: 1.5em }
87
88div.abstract {
89 margin: 2em 5em }
90
91div.abstract p.topic-title {
92 font-weight: bold ;
93 text-align: center }
94
95div.attention, div.caution, div.danger, div.error, div.hint,
96div.important, div.note, div.tip, div.warning {
97 margin: 2em ;
98 border: medium outset ;
99 padding: 1em }
100
101div.attention p.admonition-title, div.caution p.admonition-title,
102div.danger p.admonition-title, div.error p.admonition-title,
103div.warning p.admonition-title {
104 color: red ;
105 font-weight: bold ;
106 font-family: sans-serif }
107
108div.hint p.admonition-title, div.important p.admonition-title,
109div.note p.admonition-title, div.tip p.admonition-title {
110 font-weight: bold ;
111 font-family: sans-serif }
112
113div.figure {
114 margin-left: 2em }
115
116div.footer, div.header {
117 font-size: smaller }
118
119div.footer {
120 margin-left: 1em ;
121 margin-right: 1em }
122
123div.system-messages {
124 margin: 5em }
125
126div.system-messages h1 {
127 color: red }
128
129div.system-message {
130 border: medium outset ;
131 padding: 1em }
132
133div.system-message p.system-message-title {
134 color: red ;
135 font-weight: bold }
136
137div.topic {
138 margin: 2em }
139
140h1 {
141 font-family: sans-serif ;
142 font-size: large }
143
144h2 {
145 font-family: sans-serif ;
146 font-size: medium }
147
148h3 {
149 font-family: sans-serif ;
150 font-size: small }
151
152h4 {
153 font-family: sans-serif ;
154 font-style: italic ;
155 font-size: small }
156
157h5 {
158 font-family: sans-serif;
159 font-size: x-small }
160
161h6 {
162 font-family: sans-serif;
163 font-style: italic ;
164 font-size: x-small }
165
166.section hr {
167 width: 75% }
168
169ol.simple, ul.simple {
170 margin-bottom: 1em }
171
172ol.arabic {
173 list-style: decimal }
174
175ol.loweralpha {
176 list-style: lower-alpha }
177
178ol.upperalpha {
179 list-style: upper-alpha }
180
181ol.lowerroman {
182 list-style: lower-roman }
183
184ol.upperroman {
185 list-style: upper-roman }
186
187p.caption {
188 font-style: italic }
189
190p.credits {
191 font-style: italic ;
192 font-size: smaller }
193
194p.label {
195 white-space: nowrap }
196
197p.topic-title {
198 font-family: sans-serif ;
199 font-weight: bold }
200
201pre.line-block {
202 font-family: serif ;
203 font-size: 100% }
204
205pre.literal-block, pre.doctest-block {
206 margin-left: 2em ;
207 margin-right: 2em ;
208 background-color: #eeeeee }
209
210span.classifier {
211 font-family: sans-serif ;
212 font-style: oblique }
213
214span.classifier-delimiter {
215 font-family: sans-serif ;
216 font-weight: bold }
217
218span.interpreted {
219 font-family: sans-serif }
220
221span.option-argument {
222 font-style: italic }
223
224span.pre {
225 white-space: pre }
226
227span.problematic {
228 color: red }
229
230table {
231 margin-top: 0.5em ;
232 margin-bottom: 0.5em }
233
234td, th {
235 padding-left: 0.5em ;
236 padding-right: 0.5em ;
237 vertical-align: top }
238
239td.num {
240 text-align: right }
241
242th.field-name {
243 font-weight: bold ;
244 text-align: left ;
245 white-space: nowrap }
246
247h1 tt, h2 tt, h3 tt, h4 tt, h5 tt, h6 tt {
248 font-size: 100% }
249
250tt {
251 background-color: #eeeeee }
252
253ul.auto-toc {
254 list-style-type: none }
255
256</style>
14</head> 257</head>
15<body bgcolor="white"> 258<body bgcolor="white">
16<table class="navigation" cellpadding="0" cellspacing="0" 259<table class="navigation" cellpadding="0" cellspacing="0"
17 width="100%" border="0"> 260 width="100%" border="0">
18<tr><td class="navicon" width="150" height="35"> 261<tr><td class="navicon" width="150" height="35">
19<a href="http://www.gentoo.org/" title="Gentoo Linux Home Page"> 262<a href="http://www.gentoo.org/" title="Gentoo Linux Home Page">
20<img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]" 263<img src="http://www.gentoo.org/images/gentoo-new.gif" alt="[Gentoo]"
21 border="0" width="150" height="35" /></a></td> 264 border="0" width="150" height="35" /></a></td>
22<td class="textlinks" align="left"> 265<td class="textlinks" align="left">
23[<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>] 266[<b><a href="http://www.gentoo.org/">Gentoo Linux Home</a></b>]
24[<b><a href="http://www.gentoo.org/proj/en/glep">GLEP Index</a></b>] 267[<b><a href="http://www.gentoo.org/proj/en/glep/">GLEP Index</a></b>]
25[<b><a href="http://www.gentoo.org/proj/en/glep/glep-0016.txt">GLEP Source</a></b>] 268[<b><a href="http://www.gentoo.org/proj/en/glep/glep-0016.txt">GLEP Source</a></b>]
26</td></tr></table> 269</td></tr></table>
27<div class="document">
28<table class="rfc2822 field-list" frame="void" rules="none"> 270<table class="rfc2822 docutils field-list" frame="void" rules="none">
29<col class="field-name" /> 271<col class="field-name" />
30<col class="field-body" /> 272<col class="field-body" />
31<tbody valign="top"> 273<tbody valign="top">
32<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">16</td> 274<tr class="field"><th class="field-name">GLEP:</th><td class="field-body">16</td>
33</tr> 275</tr>
34<tr class="field"><th class="field-name">Title:</th><td class="field-body">Gentoo Menu System</td> 276<tr class="field"><th class="field-name">Title:</th><td class="field-body">Gentoo Menu System</td>
35</tr> 277</tr>
36<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.0</td> 278<tr class="field"><th class="field-name">Version:</th><td class="field-body">1.7</td>
37</tr> 279</tr>
38<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0016.txt?cvsroot=gentoo">2003/09/27 22:00:00</a></td> 280<tr class="field"><th class="field-name">Last-Modified:</th><td class="field-body"><a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/xml/htdocs/proj/en/glep/glep-0016.txt?cvsroot=gentoo">2004/11/11 21:33:13</a></td>
39</tr> 281</tr>
40<tr class="field"><th class="field-name">Author:</th><td class="field-body">Heinrich Wendel &lt;lanius&#32;&#97;t&#32;gentoo.org&gt;,</td> 282<tr class="field"><th class="field-name">Author:</th><td class="field-body">Heinrich Wendel &lt;lanius&#32;&#97;t&#32;gentoo.org&gt;,</td>
41</tr> 283</tr>
42<tr class="field"><th class="field-name">Status:</th><td class="field-body">Draft</td> 284<tr class="field"><th class="field-name">Status:</th><td class="field-body">deferred</td>
43</tr> 285</tr>
44<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td> 286<tr class="field"><th class="field-name">Type:</th><td class="field-body">Standards Track</td>
45</tr> 287</tr>
46<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="glep-0002.html">text/x-rst</a></td> 288<tr class="field"><th class="field-name">Content-Type:</th><td class="field-body"><a class="reference" href="glep-0002.html">text/x-rst</a></td>
47</tr> 289</tr>
48<tr class="field"><th class="field-name">Created:</th><td class="field-body">09-Sep-2003</td> 290<tr class="field"><th class="field-name">Created:</th><td class="field-body">09-Sep-2003</td>
49</tr> 291</tr>
50<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">04-Oct-2003</td> 292<tr class="field"><th class="field-name">Post-History:</th><td class="field-body">04-Oct-2003, 11-Dec-2003, 13-Dec-2003, 4-May-2004, 11-Nov-2004</td>
51</tr> 293</tr>
52</tbody> 294</tbody>
53</table> 295</table>
54<hr /> 296<hr />
55<div class="contents topic" id="contents"> 297<div class="contents topic">
56<p class="topic-title"><a name="contents">Contents</a></p> 298<p class="topic-title first"><a id="contents" name="contents">Contents</a></p>
57<ul class="simple"> 299<ul class="simple">
58<li><a class="reference" href="#definitions" id="id36" name="id36">Definitions</a></li> 300<li><a class="reference" href="#definitions" id="id29" name="id29">Definitions</a></li>
59<li><a class="reference" href="#abstract" id="id37" name="id37">Abstract</a></li> 301<li><a class="reference" href="#abstract" id="id30" name="id30">Abstract</a></li>
302<li><a class="reference" href="#status" id="id31" name="id31">Status</a></li>
60<li><a class="reference" href="#motivation" id="id38" name="id38">Motivation</a></li> 303<li><a class="reference" href="#motivation" id="id32" name="id32">Motivation</a></li>
61<li><a class="reference" href="#rationale" id="id39" name="id39">Rationale</a></li> 304<li><a class="reference" href="#rationale" id="id33" name="id33">Rationale</a></li>
62<li><a class="reference" href="#specification" id="id40" name="id40">Specification</a><ul> 305<li><a class="reference" href="#specification" id="id34" name="id34">Specification</a></li>
63<li><a class="reference" href="#what-packages-with-an-app-should-do" id="id41" name="id41">1. What packages with an APP should do</a><ul>
64<li><a class="reference" href="#desktop-file-format" id="id42" name="id42">1.1 .desktop file format</a></li>
65<li><a class="reference" href="#validating-the-file" id="id43" name="id43">1.2 Validating the file</a></li>
66<li><a class="reference" href="#icon" id="id44" name="id44">1.3 Icon</a></li>
67<li><a class="reference" href="#modifying-the-ebuild" id="id45" name="id45">1.4 Modifying the ebuild</a></li>
68</ul>
69</li>
70<li><a class="reference" href="#what-packages-with-a-wm-should-do" id="id46" name="id46">2. What packages with a WM should do</a></li>
71<li><a class="reference" href="#the-menu-layout-file" id="id47" name="id47">3. The Menu layout file</a></li>
72<li><a class="reference" href="#customizing-the-menus" id="id48" name="id48">4. Customizing the menus</a><ul>
73<li><a class="reference" href="#changing-the-default-menu-layout" id="id49" name="id49">4.1 Changing the default menu layout</a></li>
74<li><a class="reference" href="#adding-own-wm-files" id="id50" name="id50">4.2 Adding own WM files</a></li>
75<li><a class="reference" href="#adding-own-menu-entries" id="id51" name="id51">4.3 Adding own menu entries</a></li>
76</ul>
77</li>
78</ul>
79</li>
80<li><a class="reference" href="#drawbacks" id="id52" name="id52">Drawbacks</a></li>
81<li><a class="reference" href="#backwards-compatibility" id="id53" name="id53">Backwards Compatibility</a></li>
82<li><a class="reference" href="#reference-implementation" id="id54" name="id54">Reference Implementation</a></li> 306<li><a class="reference" href="#implementation-status" id="id35" name="id35">Implementation / Status</a></li>
83<li><a class="reference" href="#credits" id="id55" name="id55">Credits</a></li> 307<li><a class="reference" href="#credits" id="id36" name="id36">Credits</a></li>
84<li><a class="reference" href="#references" id="id56" name="id56">References</a></li> 308<li><a class="reference" href="#references" id="id37" name="id37">References</a></li>
85<li><a class="reference" href="#copyright" id="id57" name="id57">Copyright</a></li> 309<li><a class="reference" href="#copyright" id="id38" name="id38">Copyright</a></li>
86</ul> 310</ul>
87</div> 311</div>
88<div class="section" id="definitions"> 312<div class="section">
89<h1><a class="toc-backref" href="#id36" name="definitions">Definitions</a></h1> 313<h1><a class="toc-backref" href="#id29" id="definitions" name="definitions">Definitions</a></h1>
90<blockquote> 314<blockquote>
91<dl> 315<dl class="docutils">
92<dt><em>APP</em></dt> 316<dt><em>APP</em></dt>
93<dd>A graphical application that should be listed in the menus.</dd> 317<dd>A graphical application that should be listed in the menus.</dd>
94<dt><em>WM</em></dt> 318<dt><em>WM</em></dt>
95<dd>A program containing a menu manager (i.e. a program that can display a menu, e.g. a windowmanager).</dd> 319<dd>A program containing a menu manager (i.e. a program that can display a menu, e.g. a windowmanager).</dd>
96<dt><em>rule file</em></dt>
97<dd>A python script that describes how to build the menu for a WM.</dd>
98</dl> 320</dl>
99</blockquote> 321</blockquote>
100</div> 322</div>
101<div class="section" id="abstract"> 323<div class="section">
102<h1><a class="toc-backref" href="#id37" name="abstract">Abstract</a></h1> 324<h1><a class="toc-backref" href="#id30" id="abstract" name="abstract">Abstract</a></h1>
103<p>This GLEP handles a proposal for the following two goals:</p> 325<p>This GLEP handles a proposal for the following two goals:</p>
104<ul class="simple"> 326<ul class="simple">
105<li>Create a common menu layout, which would be independent of the WM. 327<li>Create a common menu layout, which would be independent of the WM.
106This point sound quite important for those people who use more than one WM.</li> 328This point is quite important for those people who use more than one WM.</li>
107<li>Provide a common way to add applications to the menus.</li> 329<li>Provide a common way to add applications to the menus.</li>
108</ul> 330</ul>
109</div> 331</div>
110<div class="section" id="motivation"> 332<div class="section">
333<h1><a class="toc-backref" href="#id31" id="status" name="status">Status</a></h1>
334<p>Timed out (and now subsumed by the gentoo-desktop top-level project)</p>
335</div>
336<div class="section">
111<h1><a class="toc-backref" href="#id38" name="motivation">Motivation</a></h1> 337<h1><a class="toc-backref" href="#id32" id="motivation" name="motivation">Motivation</a></h1>
112<p>GNOME, KDE, Fluxbox, to name only a few, have all their own ways of handling 338<p>GNOME, KDE, Fluxbox, to name only a few, have all their own ways of handling
113menus. There have been several requests <a class="footnote-reference" href="#id19" id="id1" name="id1">[1]</a> <a class="footnote-reference" href="#id20" id="id2" name="id2">[2]</a> <a class="footnote-reference" href="#id21" id="id3" name="id3">[3]</a> <a class="footnote-reference" href="#id22" id="id4" name="id4">[4]</a> <a class="footnote-reference" href="#id23" id="id5" name="id5">[5]</a> <a class="footnote-reference" href="#id24" id="id6" name="id6">[6]</a> from 339menus. There have been several requests <a class="footnote-reference" href="#id15" id="id1" name="id1">[1]</a> <a class="footnote-reference" href="#id16" id="id2" name="id2">[2]</a> <a class="footnote-reference" href="#id17" id="id3" name="id3">[3]</a> <a class="footnote-reference" href="#id18" id="id4" name="id4">[4]</a> <a class="footnote-reference" href="#id19" id="id5" name="id5">[5]</a> <a class="footnote-reference" href="#id20" id="id6" name="id6">[6]</a> from
114users to streamline these menus. Furthermore there are several bug reports 340users to streamline these menus. Furthermore there are several bug reports
115about applications not having a menu entry <a class="footnote-reference" href="#id25" id="id7" name="id7">[7]</a>, but since there is not 341about applications not having a menu entry <a class="footnote-reference" href="#id21" id="id7" name="id7">[7]</a>, but since there is not
116standard way to create such an entry, they are just sitting around in 342standard way to create such an entry, they are just sitting around in
117bugzilla.</p> 343bugzilla.</p>
118</div> 344</div>
119<div class="section" id="rationale"> 345<div class="section">
120<h1><a class="toc-backref" href="#id39" name="rationale">Rationale</a></h1> 346<h1><a class="toc-backref" href="#id33" id="rationale" name="rationale">Rationale</a></h1>
121<p>The idea of a common menu system is not new to the Linux world, every big 347<p>The idea of a common menu system is not new to the Linux world, every big
122distribution (Debian, Mandrake, RedHat, Suse) has such a system. The big DE's, 348distribution (Debian, Mandrake, RedHat, Suse) has such a system. The big DE's,
123KDE and GNOME, with the help of freedesktop.org <a class="footnote-reference" href="#id26" id="id8" name="id8">[8]</a> are also trying to 349KDE and GNOME, with the help of freedesktop.org <a class="footnote-reference" href="#id22" id="id8" name="id8">[8]</a>, are also trying to
124implement one standard. That will most likely happen in GNOME 2.6 and KDE 3.2 350implement one standard. That will most likely happen in GNOME 2.6 and KDE 3.2
125(Currently they are only implementing different versions of the 351(Currently they are only implementing different versions of the
126desktop-entry-spec, but interpreting it in an incompatible way). But there 352desktop-entry-spec, but interpreting it in an incompatible way). But there
127are still many other WM's around that are not going to follow these specs in 353are still many other WM's that currently don't support these specs. So we are
128the near future. So we are trying to base our work on the specifications GNOME 354trying to base our work on the specifications GNOME and KDE are going to use.
129and KDE are going to use. (These are no official standards but evolving 355(These are no official standards but evolving specifications). This has the
130specifications). This has the following advantages:</p> 356following advantages:</p>
131<ul class="simple"> 357<ul class="simple">
132<li>follow specified standards</li> 358<li>follow specified standards</li>
133<li>i18n support</li> 359<li>i18n support</li>
134<li>provide the necessary flexibility and modularity</li> 360<li>provide the necessary flexibility and modularity</li>
135<li>integrate with small changes to our ebuildtree.</li> 361<li>integrate with small changes to our ebuildtree.</li>
136<li>support for per system and per user menus</li> 362<li>support for per system and per user menus</li>
137</ul> 363</ul>
138<p>This system will be completely optional, nobody will be forced to use it!</p>
139<p>Here an short overview, how it is supposed work:</p>
140<ol class="arabic simple">
141<li>Every APP installs a .desktop file.</li>
142<li>Every WM installs a rule file.</li>
143<li>There is a file which specifies the menu layout.</li>
144<li>A script is run and parses all rule and .desktop files and the menu
145layout and creates the corresponding menus.</li>
146</ol>
147<p>We also intent to include a graphical editor for the menus, but this is not
148the primary priority.</p>
149</div> 364</div>
150<div class="section" id="specification"> 365<div class="section">
151<h1><a class="toc-backref" href="#id40" name="specification">Specification</a></h1> 366<h1><a class="toc-backref" href="#id34" id="specification" name="specification">Specification</a></h1>
152<div class="section" id="what-packages-with-an-app-should-do"> 367<p>We are trying to follow these specifications:</p>
153<h2><a class="toc-backref" href="#id41" name="what-packages-with-an-app-should-do">1. What packages with an APP should do</a></h2> 368<ul class="simple">
154<div class="section" id="desktop-file-format"> 369<li>Desktop Entry Specification <a class="footnote-reference" href="#id23" id="id9" name="id9">[9]</a></li>
155<h3><a class="toc-backref" href="#id42" name="desktop-file-format">1.1 .desktop file format</a></h3> 370<li>Menu Specification <a class="footnote-reference" href="#id24" id="id10" name="id10">[10]</a></li>
156<p>If you want users to be able to find your application you have to create a 371<li>Icon Theme Specification <a class="footnote-reference" href="#id25" id="id11" name="id11">[11]</a></li>
157menu entry in the following format:</p> 372</ul>
158<pre class="literal-block"> 373<p>There are two libraries that offer an API to these specifications:</p>
159[Desktop Entry] 374<ul class="simple">
160Encoding=UTF-8 375<li>PyXDG <a class="footnote-reference" href="#id26" id="id12" name="id12">[12]</a> (written in python)</li>
161Type=Application 376<li>Desktop File Utils <a class="footnote-reference" href="#id27" id="id13" name="id13">[13]</a> (written in C)</li>
162Name=KWord 377</ul>
163GenericName=Word Processing 378<p>Our goal is to patch the WM's with the help of these libraries to support the
164GenericName[it]=Textverarbeitung 379specifications. APP's then only have to install a .desktop entry <a class="footnote-reference" href="#id23" id="id14" name="id14">[9]</a> and
165Categories=Application;Office;Wordprocessor 380optionally an icon and will be listed in all menus. This installation could
166Icon=kword 381easily be done by two portage commands (domenu, doicon).</p>
167Exec=/usr/kde/3.1/bin/kword
168</pre>
169<p>This example does not show all translations of the name and comment, but you
170can see the format of the file and translations from it. The Categories field
171specifies which menu group the application should appear under. In this
172example, the entry is under System Tools.</p>
173<p>The file should follow the xdg desktop-entry spec 0.9.4 <a class="footnote-reference" href="#id27" id="id9" name="id9">[9]</a>. The Categories
174field is used as described in the menu-spec 0.7 <a class="footnote-reference" href="#id28" id="id10" name="id10">[10]</a>.</p>
175</div> 382</div>
176<div class="section" id="validating-the-file">
177<h3><a class="toc-backref" href="#id43" name="validating-the-file">1.2 Validating the file</a></h3>
178<p>We will provide a tool (possibly included in repoman) which will validate
179.desktop files.</p>
180</div>
181<div class="section" id="icon"> 383<div class="section">
182<h3><a class="toc-backref" href="#id44" name="icon">1.3 Icon</a></h3> 384<h1><a class="toc-backref" href="#id35" id="implementation-status" name="implementation-status">Implementation / Status</a></h1>
183<p>There are two possibilities to install an icon for the application.</p> 385<p>This GLEP exists for a long time now, still it is not accepted. I will outline
386the current status:</p>
184<ol class="arabic simple"> 387<ul class="simple">
185<li>You install an icon in /usr/share/pixmaps and specify the absolute path to 388<li>KDE 3.2 (x86) supports this specification</li>
186the file in the .desktop file.</li> 389<li>GNOME 2.6 (~x86) support this specification</li>
187<li>You install the file as part of an icon-theme <a class="footnote-reference" href="#id29" id="id11" name="id11">[11]</a> and specify the name of 390<li>domenu[<a class="reference" href="#id26">12</a>] has to be included in portage to be used by the ebuilds to
188the icon in the .desktop file. Possible icon-themes are:<ul> 391install a desktop entry</li>
189<li>default.kde</li> 392<li>Somebody needs to write patches for the other WM's:</li>
190<li>gnome</li>
191<li>gentoo</li>
192</ul>
193</li> 393</ul>
394<p>We should focus on adding support to the following WM's first:</p>
395<ul class="simple">
396<li>xfce, blackblox / fluxbox / openbox / waimea / kahakai, icewm</li>
397<li>fvwm, windowmaker, enlightment, afterstep</li>
194</ol> 398</ul>
195<p>The preferred format for icons is png with transparent background.</p> 399<p>The following are not so important, but support some kind of applications
400menu:</p>
401<ul class="simple">
402<li>aewm / aewm++ / evilwm / windowlab / oroborus, amiwm, ctwm, flwm</li>
403<li>golem, larswm, pekwm, plwm, pwm, qvwm, selectwm, treewm, trwm</li>
404<li>vtwm, xpde</li>
405</ul>
196</div> 406</div>
197<div class="section" id="modifying-the-ebuild">
198<h3><a class="toc-backref" href="#id45" name="modifying-the-ebuild">1.4 Modifying the ebuild</a></h3>
199<p>To actually install this file, you have add it to the filesdir of the ebuild.
200The extension has to be .desktop. Then change the ebuild to contain a line
201similar to this: &quot;domenu ${FILESDIR}/file.desktop&quot;.</p>
202</div>
203</div>
204<div class="section" id="what-packages-with-a-wm-should-do">
205<h2><a class="toc-backref" href="#id46" name="what-packages-with-a-wm-should-do">2. What packages with a WM should do</a></h2>
206<p>Each WM should provide a rule file in /usr/share/menus/wms which follows a
207specific format. Documentation for this format has still to be written, You
208can find examples at <a class="footnote-reference" href="#id30" id="id12" name="id12">[12]</a>.</p>
209</div>
210<div class="section" id="the-menu-layout-file">
211<h2><a class="toc-backref" href="#id47" name="the-menu-layout-file">3. The Menu layout file</a></h2>
212<p>The format of the menu layout file will follow the xdg menu-spec 0.7 <a class="footnote-reference" href="#id28" id="id13" name="id13">[10]</a>.</p>
213<p>Gentoo will provide a default menu structure. You can find the current
214proposal at <a class="footnote-reference" href="#id32" id="id14" name="id14">[14]</a>.</p>
215</div>
216<div class="section" id="customizing-the-menus">
217<h2><a class="toc-backref" href="#id48" name="customizing-the-menus">4. Customizing the menus</a></h2>
218<p>Customizing of this system can be done in two ways, system-wide or user-wide.
219The locations of the files follow the xdg basedir-spec 0.6 <a class="footnote-reference" href="#id32" id="id15" name="id15">[14]</a>.</p>
220<div class="section" id="changing-the-default-menu-layout">
221<h3><a class="toc-backref" href="#id49" name="changing-the-default-menu-layout">4.1 Changing the default menu layout</a></h3>
222<p>The system menu layout is located in /etc/menu/applications.menu, it can be
223overridden by $XDG_CONFIG_HOME/applications.menu.</p>
224</div>
225<div class="section" id="adding-own-wm-files">
226<h3><a class="toc-backref" href="#id50" name="adding-own-wm-files">4.2 Adding own WM files</a></h3>
227<p>The system WM files are located in $XDG_DATA_DIRS/menu/wms/, they can be
228overridden or extended by $XDG_DATA_HOME/wms/.</p>
229</div>
230<div class="section" id="adding-own-menu-entries">
231<h3><a class="toc-backref" href="#id51" name="adding-own-menu-entries">4.3 Adding own menu entries</a></h3>
232<p>The system .desktop files are located in $XDG_DATA_DIRS/menu/applications/,
233they can be overridden or extended by $XDG_DATA_HOME/menu/applications/.</p>
234</div>
235</div>
236</div>
237<div class="section" id="drawbacks">
238<h1><a class="toc-backref" href="#id52" name="drawbacks">Drawbacks</a></h1>
239<p>A concern might be that it involves a changing a lot of ebuilds (every APP
240needs to be changed). There has been a proposal for another solution that
241generates menus from the current menu structures of GNOME/KDE. This would have
242the advantage of not changing the ebuilds, but the disadvantage of not being
243very flexible. A menu layout file or per system/users menus would not be
244possibly. It seems more like a quick and dirty solution. Consider that we
245don't have to provide massive file-updates, global lists coherent with our
246tree, but each capable and installed package requires a small change that goes
247back and forwards with versions without overhead for version bumps.</p>
248</div>
249<div class="section" id="backwards-compatibility">
250<h1><a class="toc-backref" href="#id53" name="backwards-compatibility">Backwards Compatibility</a></h1>
251<p>People who want to use the new system have to recompile all packages that use
252the &quot;gentoo-menu&quot; USE flag. This could be easily done by a tool that will parse
253/var/db/pkg and for all ebuilds find corresponding updates with menu info.</p>
254<p>Since nobody is forced to use this system, there are no other backward
255compatibility issues, you just have to disable the &quot;gentoo-menu&quot; USE-Flag and
256you'll get the vanilla situation.</p>
257</div>
258<div class="section" id="reference-implementation">
259<h1><a class="toc-backref" href="#id54" name="reference-implementation">Reference Implementation</a></h1>
260<p>The reference implementation is nearly finished, it's written in Python, you
261can find it here <a class="footnote-reference" href="#id33" id="id16" name="id16">[15]</a> <a class="footnote-reference" href="#id34" id="id17" name="id17">[16]</a>. It contains a sample menu layout
262(/etc/menu/applications.menu), the domenu script, the update-menus script and
263the gentoo icon theme.</p>
264<p>Domenu has to be included in Portage, it will install new menu entries in
265/usr/share/menu/applications and run the update-menus script afterwards.</p>
266<p>Update-menus parses the menu layout file, the .desktop files and the rule
267files and then creates the menus. If run as user it will create menus only for
268that user, if run as root it will create system wide menus.</p>
269</div>
270<div class="section" id="credits"> 407<div class="section">
271<h1><a class="toc-backref" href="#id55" name="credits">Credits</a></h1> 408<h1><a class="toc-backref" href="#id36" id="credits" name="credits">Credits</a></h1>
272<p>Based on suggestions from former discussions on -dev and the Debian 409<p>Based on suggestions from former discussions on the gentoo bugzilla,
273menu-system documentation <a class="footnote-reference" href="#id35" id="id18" name="id18">[17]</a>.</p> 410mailinglists and forums.</p>
274</div> 411</div>
275<div class="section" id="references"> 412<div class="section">
276<h1><a class="toc-backref" href="#id56" name="references">References</a></h1> 413<h1><a class="toc-backref" href="#id37" id="references" name="references">References</a></h1>
277<table class="footnote" frame="void" id="id19" rules="none"> 414<table class="docutils footnote" frame="void" id="id15" rules="none">
278<colgroup><col class="label" /><col /></colgroup> 415<colgroup><col class="label" /><col /></colgroup>
279<tbody valign="top"> 416<tbody valign="top">
280<tr><td class="label"><a class="fn-backref" href="#id1" name="id19">[1]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=5510">http://bugs.gentoo.org/show_bug.cgi?id=5510</a></td></tr> 417<tr><td class="label"><a class="fn-backref" href="#id1" name="id15">[1]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=5510">http://bugs.gentoo.org/show_bug.cgi?id=5510</a></td></tr>
281</tbody> 418</tbody>
282</table> 419</table>
283<table class="footnote" frame="void" id="id20" rules="none"> 420<table class="docutils footnote" frame="void" id="id16" rules="none">
284<colgroup><col class="label" /><col /></colgroup> 421<colgroup><col class="label" /><col /></colgroup>
285<tbody valign="top"> 422<tbody valign="top">
286<tr><td class="label"><a class="fn-backref" href="#id2" name="id20">[2]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=10429">http://bugs.gentoo.org/show_bug.cgi?id=10429</a></td></tr> 423<tr><td class="label"><a class="fn-backref" href="#id2" name="id16">[2]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=10429">http://bugs.gentoo.org/show_bug.cgi?id=10429</a></td></tr>
287</tbody> 424</tbody>
288</table> 425</table>
289<table class="footnote" frame="void" id="id21" rules="none"> 426<table class="docutils footnote" frame="void" id="id17" rules="none">
290<colgroup><col class="label" /><col /></colgroup> 427<colgroup><col class="label" /><col /></colgroup>
291<tbody valign="top"> 428<tbody valign="top">
292<tr><td class="label"><a class="fn-backref" href="#id3" name="id21">[3]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=4884">http://bugs.gentoo.org/show_bug.cgi?id=4884</a></td></tr> 429<tr><td class="label"><a class="fn-backref" href="#id3" name="id17">[3]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=4884">http://bugs.gentoo.org/show_bug.cgi?id=4884</a></td></tr>
293</tbody> 430</tbody>
294</table> 431</table>
295<table class="footnote" frame="void" id="id22" rules="none"> 432<table class="docutils footnote" frame="void" id="id18" rules="none">
296<colgroup><col class="label" /><col /></colgroup> 433<colgroup><col class="label" /><col /></colgroup>
297<tbody valign="top"> 434<tbody valign="top">
298<tr><td class="label"><a class="fn-backref" href="#id4" name="id22">[4]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=25797">http://bugs.gentoo.org/show_bug.cgi?id=25797</a></td></tr> 435<tr><td class="label"><a class="fn-backref" href="#id4" name="id18">[4]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=25797">http://bugs.gentoo.org/show_bug.cgi?id=25797</a></td></tr>
299</tbody> 436</tbody>
300</table> 437</table>
301<table class="footnote" frame="void" id="id23" rules="none"> 438<table class="docutils footnote" frame="void" id="id19" rules="none">
302<colgroup><col class="label" /><col /></colgroup> 439<colgroup><col class="label" /><col /></colgroup>
303<tbody valign="top"> 440<tbody valign="top">
304<tr><td class="label"><a class="fn-backref" href="#id5" name="id23">[5]</a></td><td><a class="reference" href="http://forums.gentoo.org/viewtopic.php?t=66754">http://forums.gentoo.org/viewtopic.php?t=66754</a></td></tr> 441<tr><td class="label"><a class="fn-backref" href="#id5" name="id19">[5]</a></td><td><a class="reference" href="http://forums.gentoo.org/viewtopic.php?t=66754">http://forums.gentoo.org/viewtopic.php?t=66754</a></td></tr>
305</tbody> 442</tbody>
306</table> 443</table>
307<table class="footnote" frame="void" id="id24" rules="none"> 444<table class="docutils footnote" frame="void" id="id20" rules="none">
308<colgroup><col class="label" /><col /></colgroup> 445<colgroup><col class="label" /><col /></colgroup>
309<tbody valign="top"> 446<tbody valign="top">
310<tr><td class="label"><a class="fn-backref" href="#id6" name="id24">[6]</a></td><td><a class="reference" href="http://forums.gentoo.org/viewtopic.php?p=263106#263106">http://forums.gentoo.org/viewtopic.php?p=263106#263106</a></td></tr> 447<tr><td class="label"><a class="fn-backref" href="#id6" name="id20">[6]</a></td><td><a class="reference" href="http://forums.gentoo.org/viewtopic.php?p=263106#263106">http://forums.gentoo.org/viewtopic.php?p=263106#263106</a></td></tr>
311</tbody> 448</tbody>
312</table> 449</table>
313<table class="footnote" frame="void" id="id25" rules="none"> 450<table class="docutils footnote" frame="void" id="id21" rules="none">
314<colgroup><col class="label" /><col /></colgroup> 451<colgroup><col class="label" /><col /></colgroup>
315<tbody valign="top"> 452<tbody valign="top">
316<tr><td class="label"><a class="fn-backref" href="#id7" name="id25">[7]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=25756">http://bugs.gentoo.org/show_bug.cgi?id=25756</a></td></tr> 453<tr><td class="label"><a class="fn-backref" href="#id7" name="id21">[7]</a></td><td><a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=25756">http://bugs.gentoo.org/show_bug.cgi?id=25756</a></td></tr>
317</tbody> 454</tbody>
318</table> 455</table>
319<table class="footnote" frame="void" id="id26" rules="none"> 456<table class="docutils footnote" frame="void" id="id22" rules="none">
320<colgroup><col class="label" /><col /></colgroup> 457<colgroup><col class="label" /><col /></colgroup>
321<tbody valign="top"> 458<tbody valign="top">
322<tr><td class="label"><a class="fn-backref" href="#id8" name="id26">[8]</a></td><td><a class="reference" href="http://www.freedesktop.org">http://www.freedesktop.org</a></td></tr> 459<tr><td class="label"><a class="fn-backref" href="#id8" name="id22">[8]</a></td><td><a class="reference" href="http://www.freedesktop.org">http://www.freedesktop.org</a></td></tr>
323</tbody> 460</tbody>
324</table> 461</table>
325<table class="footnote" frame="void" id="id27" rules="none"> 462<table class="docutils footnote" frame="void" id="id23" rules="none">
326<colgroup><col class="label" /><col /></colgroup> 463<colgroup><col class="label" /><col /></colgroup>
327<tbody valign="top"> 464<tbody valign="top">
328<tr><td class="label"><a class="fn-backref" href="#id9" name="id27">[9]</a></td><td>Desktop Entry Specification 465<tr><td class="label"><a name="id23">[9]</a></td><td><em>(<a class="fn-backref" href="#id9">1</a>, <a class="fn-backref" href="#id14">2</a>)</em> Desktop Entry Specification
329[<a class="reference" href="http://www.freedesktop.org/standards/desktop-entry-spec/0.9.4/">http://www.freedesktop.org/standards/desktop-entry-spec/0.9.4/</a>]</td></tr> 466[<a class="reference" href="http://www.freedesktop.org/standards/desktop-entry-spec/0.9.4/">http://www.freedesktop.org/standards/desktop-entry-spec/0.9.4/</a>]</td></tr>
330</tbody> 467</tbody>
331</table> 468</table>
332<table class="footnote" frame="void" id="id28" rules="none"> 469<table class="docutils footnote" frame="void" id="id24" rules="none">
333<colgroup><col class="label" /><col /></colgroup> 470<colgroup><col class="label" /><col /></colgroup>
334<tbody valign="top"> 471<tbody valign="top">
335<tr><td class="label"><a name="id28">[10]</a></td><td><em>(<a class="fn-backref" href="#id10">1</a>, <a class="fn-backref" href="#id13">2</a>)</em> Menu Specification 472<tr><td class="label"><a class="fn-backref" href="#id10" name="id24">[10]</a></td><td>Menu Specification
336[<a class="reference" href="http://www.freedesktop.org/standards/menu-spec/0.7/">http://www.freedesktop.org/standards/menu-spec/0.7/</a>]</td></tr> 473[<a class="reference" href="http://www.freedesktop.org/standards/menu-spec/0.8/">http://www.freedesktop.org/standards/menu-spec/0.8/</a>]</td></tr>
337</tbody> 474</tbody>
338</table> 475</table>
339<table class="footnote" frame="void" id="id29" rules="none"> 476<table class="docutils footnote" frame="void" id="id25" rules="none">
340<colgroup><col class="label" /><col /></colgroup> 477<colgroup><col class="label" /><col /></colgroup>
341<tbody valign="top"> 478<tbody valign="top">
342<tr><td class="label"><a class="fn-backref" href="#id11" name="id29">[11]</a></td><td>Icon Theme Specification 479<tr><td class="label"><a class="fn-backref" href="#id11" name="id25">[11]</a></td><td>Icon Theme Specification
343[<a class="reference" href="http://www.freedesktop.org/standards/icon-theme-spec/0.7/">http://www.freedesktop.org/standards/icon-theme-spec/0.7/</a>]</td></tr> 480[<a class="reference" href="http://www.freedesktop.org/standards/icon-theme-spec/0.7/">http://www.freedesktop.org/standards/icon-theme-spec/0.7/</a>]</td></tr>
344</tbody> 481</tbody>
345</table> 482</table>
346<table class="footnote" frame="void" id="id30" rules="none">
347<colgroup><col class="label" /><col /></colgroup>
348<tbody valign="top">
349<tr><td class="label"><a class="fn-backref" href="#id12" name="id30">[12]</a></td><td>Example rule files:
350[<a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-menu/examples/?cvsroot=gentoo-src">http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-menu/examples/?cvsroot=gentoo-src</a>]</td></tr>
351</tbody>
352</table>
353<table class="footnote" frame="void" id="id31" rules="none">
354<colgroup><col class="label" /><col /></colgroup>
355<tbody valign="top">
356<tr><td class="label"><a name="id31">[13]</a></td><td>Reference menu layout
357[<a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-menu/etc/applications.menu?cvsroot=gentoo-src">http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-menu/etc/applications.menu?cvsroot=gentoo-src</a>]</td></tr>
358</tbody>
359</table>
360<table class="footnote" frame="void" id="id32" rules="none"> 483<table class="docutils footnote" frame="void" id="id26" rules="none">
361<colgroup><col class="label" /><col /></colgroup> 484<colgroup><col class="label" /><col /></colgroup>
362<tbody valign="top"> 485<tbody valign="top">
363<tr><td class="label"><a name="id32">[14]</a></td><td><em>(<a class="fn-backref" href="#id14">1</a>, <a class="fn-backref" href="#id15">2</a>)</em> Basedir Specification
364[<a class="reference" href="http://www.freedesktop.org/standards/basedir-spec/0.6/">http://www.freedesktop.org/standards/basedir-spec/0.6/</a>]</td></tr>
365</tbody>
366</table>
367<table class="footnote" frame="void" id="id33" rules="none">
368<colgroup><col class="label" /><col /></colgroup>
369<tbody valign="top">
370<tr><td class="label"><a class="fn-backref" href="#id16" name="id33">[15]</a></td><td>PyXDG 486<tr><td class="label"><a class="fn-backref" href="#id12" name="id26">[12]</a></td><td>PyXDG
371[<a class="reference" href="http://cvs.cojobo.net/cgi-bin/viewcvs.cgi/pyxdg/">http://cvs.cojobo.net/cgi-bin/viewcvs.cgi/pyxdg/</a>]</td></tr> 487[<a class="reference" href="http://www.freedesktop.org/software/pyxdg">http://www.freedesktop.org/software/pyxdg</a>]</td></tr>
372</tbody> 488</tbody>
373</table> 489</table>
374<table class="footnote" frame="void" id="id34" rules="none"> 490<table class="docutils footnote" frame="void" id="id27" rules="none">
375<colgroup><col class="label" /><col /></colgroup> 491<colgroup><col class="label" /><col /></colgroup>
376<tbody valign="top"> 492<tbody valign="top">
377<tr><td class="label"><a class="fn-backref" href="#id17" name="id34">[16]</a></td><td>Gentoo-Menu 493<tr><td class="label"><a class="fn-backref" href="#id13" name="id27">[13]</a></td><td>Desktop File Utils
378[<a class="reference" href="http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-menu/?cvsroot=gentoo-src">http://www.gentoo.org/cgi-bin/viewcvs.cgi/gentoo-menu/?cvsroot=gentoo-src</a>]</td></tr> 494[<a class="reference" href="http://www.freedesktop.org/software/desktop-file-utils">http://www.freedesktop.org/software/desktop-file-utils</a>]</td></tr>
379</tbody> 495</tbody>
380</table> 496</table>
381<table class="footnote" frame="void" id="id35" rules="none"> 497<table class="docutils footnote" frame="void" id="id28" rules="none">
382<colgroup><col class="label" /><col /></colgroup> 498<colgroup><col class="label" /><col /></colgroup>
383<tbody valign="top"> 499<tbody valign="top">
384<tr><td class="label"><a class="fn-backref" href="#id18" name="id35">[17]</a></td><td>Debian Menu System documentation 500<tr><td class="label"><a name="id28">[14]</a></td><td>domenu
385[<a class="reference" href="http://www.debian.org/doc/packaging-manuals/menu.html/">http://www.debian.org/doc/packaging-manuals/menu.html/</a>]</td></tr> 501[<a class="reference" href="http://bugs.gentoo.org/show_bug.cgi?id=25756">http://bugs.gentoo.org/show_bug.cgi?id=25756</a>]</td></tr>
386</tbody> 502</tbody>
387</table> 503</table>
388</div> 504</div>
389<div class="section" id="copyright"> 505<div class="section">
390<h1><a class="toc-backref" href="#id57" name="copyright">Copyright</a></h1> 506<h1><a class="toc-backref" href="#id38" id="copyright" name="copyright">Copyright</a></h1>
391<p>This document has been placed in the public domain.</p> 507<p>This document has been placed in the public domain.</p>
392</div> 508</div>
393</div>
394 509
395<hr class="footer"/> 510</div>
396<div class="footer"> 511<div class="footer">
512<hr class="footer" />
397<a class="reference" href="glep-0016.txt">View document source</a>. 513<a class="reference" href="glep-0016.txt">View document source</a>.
398Generated on: 2003-10-04 13:49 UTC. 514Generated on: 2006-10-10 20:23 UTC.
399Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source. 515Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
516
400</div> 517</div>
401</body> 518</body>
402</html> 519</html>
403 520

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.20