| Author |
Message |
Mobeus

Joined: 26 Aug 2010 Posts: 93
|
Posted: Tue 02 Apr 2013, 21:13 Post subject:
New xdg menu for Puppy |
|
Here is a taste of the project that I have been working on. The subject of the Puppy menu system came up again in the AlphaOS thread today, so I thought I would post this.
Here is a screen shot from my slacko 5.5. Notice anything? Is anyone curious?
| Description |
|
| Filesize |
54.86 KB |
| Viewed |
640 Time(s) |

|
_________________ /root for the home team
Last edited by Mobeus on Wed 03 Apr 2013, 13:05; edited 1 time in total
|
|
Back to top
|
|
 |
`f00

Joined: 06 Nov 2008 Posts: 792 Location: the Western Reserve
|
Posted: Tue 02 Apr 2013, 22:08 Post subject:
Subject description: .. |
|
First off, alphabetic sorting of top-level cats
2nd, no jwm basemenu (just my pref) for jwm-specific items
3rd, too many Caps (again my pref) with longish names in subcats
(one way around that)
4th .. cool sig
There's such a variety of ways to do menus, a glove for every hand
|
|
Back to top
|
|
 |
Mobeus

Joined: 26 Aug 2010 Posts: 93
|
Posted: Wed 03 Apr 2013, 13:08 Post subject:
|
|
Hi ‘foo,
Point #1 is the difference. The screen shot is a menu generated by a freedesktop.org compliant xdg menu system I composed for Puppy.
Linux OS menus have always been a sore point for me. To say it’s too hard for the casual user to personalize a Puppy menu would be an understatement at least. There are a couple of good Puppy menu editors that let you add/remove/rename application entries but anything further like adding to or modding the root menu isn’t available that I know of. To complicate it further some panels used in Puppies have hard coded root menus that require editing of the source code to change. Then if you compile a newer panel, the menu doesn’t work. Not dissing the system developers here, hard coding the menus is one way these panels will work with the stock Puppy menu system.
I set out to create a menu editor for myself that would allow full editing of my Puppy menus including the root menu. Lightweight, compiled in C and only depends on gtk2 or gtk3 and gnome-menus, which are standard Puppy components. Menu editors from other OSs mostly have dependencies like perl or python or java. After studying the freedesktop.org spec I realized that Puppy’s menu system could be simplified and would actually conform to the spec better than it does now. So, I reworked it and built the menu generator that produced the menu in the screenshot above.
So far the system will generate menus for icewm, jwm, and openbox/lxpanel, which are the ones I use mostly. It even supports openbox/lxpanel with menu-cache. It should also support other desktops or panels that use freedesktop.org xdg menus. I plan to add fbpanel too, if there is any interest. The system and editor will support individual user menus too, should that ever be desired.
Anyway, I just wanted to toss this out here and see if there is any community interest in it.
_________________ /root for the home team
|
|
Back to top
|
|
 |
Jasper

Joined: 25 Apr 2010 Posts: 870 Location: England
|
Posted: Wed 03 Apr 2013, 14:01 Post subject:
|
|
PupMenu-3.1 from radky is a flexible and brilliant menu
editor/launcher which works across a wide range of pups.
|
|
Back to top
|
|
 |
Mobeus

Joined: 26 Aug 2010 Posts: 93
|
Posted: Wed 03 Apr 2013, 16:05 Post subject:
|
|
So Jasper,
Do you think the Puppy menu system could be better, for both users and system developers? Or no?
_________________ /root for the home team
|
|
Back to top
|
|
 |
Jasper

Joined: 25 Apr 2010 Posts: 870 Location: England
|
Posted: Wed 03 Apr 2013, 17:46 Post subject:
|
|
Hi Mobeus,
Well my menu set up is perfect for me thanks to radky and
others. I'll be pleased to send you a PM which explains my
complete menu system together with screenshots if you wish.
I use Precise 5.4 on a multi-session-live-DVD, using what is
almost certainly a rare assembly of superb apps and tips
which are combined in a simple design to my full satisfaction.
My regards
|
|
Back to top
|
|
 |
Mobeus

Joined: 26 Aug 2010 Posts: 93
|
Posted: Wed 03 Apr 2013, 19:06 Post subject:
|
|
Hi again Jasper,
I would like that but I don't want to be a bother, so it's up to you. I always like seeing what others have done with Puppy.
There doesn't seem to be much interest here, at least not yet. That's OK too. The project is a development experience for me, and it's teaching quite a bit. I am positive it would enhance the experience of Puppy so I will see it through. You never know.
One other thing I neglected to mention. Having a freedesktop compliant menu system would put an end to software installations from other distro repositories failing to show up in the menu. I get the feeling that people do not realize that the Puppy menu system is not that far off the mark. A drastic change isn't needed.
Well, maybe someone will find it useful when it's past the semi-vaporware stage
Regards,
Mobeus
_________________ /root for the home team
|
|
Back to top
|
|
 |
gulk

Joined: 21 Apr 2008 Posts: 85
|
Posted: Wed 03 Apr 2013, 21:57 Post subject:
Perfect timing |
|
Hi Mobeus,
the timing of your post is fantastic...
Few days ago, I posted a question about lxpanel and its menu structure in particular in the Slacko 5.5 thread and got no response yet (see http://www.murga-linux.com/puppy/viewtopic.php?t=84157&start=360).
I was wondering why some apps show up in the menu and some don't. I'm not familiar with menu structures in general, but looking around in the filesystem a bit, I found the /etc/xdg/menus folder and started to try to understand the thing and force the applications show up in the menu (all the missing apps have an associated .desktop in /usr/share/applications, and I made sure these work fine by themselves).
What kind of stopped me in my track is the "template" file with a big "do not edit" comment at the beginning:
| Code: | <!-- aragon: this is the menu template for lxpanel based on the puppy menu-structure. don't edit! -->
<!-- Médor: add layout entries for Puppy menu-structure. don't edit! -->
<!-- f00: edit --> |
It seems you mastered the xdg stuff, so here are specific questions:
- is there a script or an executable to make all .desktop from /usr/share/applications appear in the menu?
- if not, how or what make the applications appear in the menu?
Thanks in advance for your enlightenment.
gulk
|
|
Back to top
|
|
 |
playdayz

Joined: 25 Apr 2008 Posts: 3705
|
Posted: Wed 03 Apr 2013, 23:31 Post subject:
|
|
| Quote: | desktops or panels that use freedesktop.org xdg menus.
|
Wouldn't this make Puppy more flexible and, specifically, able to use LXDE without any menu trouble? Would programs installed by PPM automatically show up on the xdg menu--that is, does it run like fixmenus after PPM and at start of X? Thanks.
|
|
Back to top
|
|
 |
Buck Huffman
Joined: 09 Apr 2010 Posts: 5
|
Posted: Thu 04 Apr 2013, 00:38 Post subject:
|
|
Great idea!
I was just looking for such a tool a week or so ago for Fatdog 64.
Could not find one and ended up searching for hours for just the
right lines in just the right config files.
Felt like I was using a sledge hammer to drive screws.
Would like to see your program in action. it is sorely needed.
Buck
|
|
Back to top
|
|
 |
Jasper

Joined: 25 Apr 2010 Posts: 870 Location: England
|
Posted: Thu 04 Apr 2013, 02:13 Post subject:
|
|
Hi again Mobeus,
It'll be no trouble to PM you, but as it'll be comprehensive
I'll make a substantial start today though I'll not rush to
complete it.
My regards
|
|
Back to top
|
|
 |
darkcity

Joined: 23 May 2010 Posts: 2215 Location: near here
|
Posted: Thu 04 Apr 2013, 02:55 Post subject:
|
|
This is a great idea to make Puppy more compliant with xdg. is there a standard way to solve for the short comings 'foo mentioned, what do other distros do?
_________________ Wiki Audacity 2.0.1
|
|
Back to top
|
|
 |
L18L
Joined: 19 Jun 2010 Posts: 1714 Location: Burghaslach, Germany
|
Posted: Thu 04 Apr 2013, 05:00 Post subject:
Re: Perfect timing |
|
| gulk wrote: | ...What kind of stopped me in my track is the "template" file with a big "do not edit" comment at the beginning:
| Code: | <!-- aragon: this is the menu template for lxpanel based on the puppy menu-structure. don't edit! -->
<!-- Médor: add layout entries for Puppy menu-structure. don't edit! -->
<!-- f00: edit --> | ... |
That is OK
Instead edit /etc/xdg/templates/_root_.jwmrc
I have done so:
my edited /etc/xdg/templates/_root_.jwmrc
wrote: | <?xml version="1.0"?>
<JWM>
<!-- IMPORTANT, ONLY EDIT /etc/xdg/templates/_root_.jwmrc -->
<!-- jwm menu for puppy Linux -->
<RootMenu label="Menu" labeled="false" height="24" onroot="3">
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-desktop.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-setup.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-system.menu
<Separator/>
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-utility.menu
|
Then run | Code: | fixmenus
jwm -restart |
Thus I am thinking now.
You need just a text editor (.. and the know how what to edit)
Mobeus,
another difference I see is
You have no separations inside main menu
----
Creating a GUI for this is a nice exercise
maybe to be integrated into official jwmconfig
| Description |
sequence changed only |
| Filesize |
15.64 KB |
| Viewed |
403 Time(s) |

|
|
|
Back to top
|
|
 |
stu91

Joined: 06 Aug 2012 Posts: 101 Location: England. Dpup. Dell Inspiron 1501
|
Posted: Thu 04 Apr 2013, 07:22 Post subject:
|
|
I think menu standardization plus a light weight editor is a good idea.
|
|
Back to top
|
|
 |
Mobeus

Joined: 26 Aug 2010 Posts: 93
|
Posted: Thu 04 Apr 2013, 12:58 Post subject:
|
|
Thank you all for your interest. It’s very encouraging.
@gulk
| Quote: | What kind of stopped me in my track is the "template" file with a big "do not edit" comment at the beginning: .....
- is there a script or an executable to make all .desktop from /usr/share/applications appear in the menu?
- if not, how or what make the applications appear in the menu? |
Ignore the template files, unless you need to change jwm or icewm specific things like key assignments etc. You can hard code menus there if you really want to. But that’s not the freedesktop spec way to do it.
No script that I know of, although it could be written.
What determines where the apps show up in the menu is the category. The category in the *.desktop file for the app must match a category in one of the <menu> defs in the *.menu file. In short, if you want an app to show up in a certain menu in a standard Puppy, just find the *.menu file in /etc/xdg/menus and note it’s category line for the specific <menu>. Then edit the category line in the apps *.desktop file to one of those categories. The *.desktop files are in /usr/share/applications.
@playdayz
| Quote: | | Wouldn't this make Puppy more flexible and, specifically, able to use LXDE without any menu trouble? |
Yes, unless someone has hard coded the panel or window manager menu to suit Puppy.
| Quote: | | Would programs installed by PPM automatically show up on the xdg menu--that is, does it run like fixmenus after PPM and at start of X? |
How and when the program shows up in the menu is panel and/or window manager specific. With some, like lxde/lxpanel/menu-cache, the apps will show up right away. Menu-cache will regenerate their menus automatically.
Others like jwm need to have a new menu constructed and a restart of jwm or reboot. Openbox needs a specific command or a reboot. So it would have to be run after PPM for jwm, icewm and openbox for example.
BTW, there is normally a “Other” <menu> with some specific settings that catches all unassigned (no matching category found) *.desktop files for the user. This is one of the things missing in Puppy’s menus.
@Buck
| Quote: | | I was just looking for such a tool a week or so ago for Fatdog 64. |
Interestingly, I started development on Slackbones64 (a bare bones Fatdog64). The lxpanel in Slackbones has a hard coded menu so I imagine Fatdog does too. One of the existing Puppy menu editors can handle application entries for you now.
@ jasper
No hurry. Looking forward to it though.
@ darkcity
The way to deal with them now is to use a menu editor for the app listings along with manual editing of Puppy’s *.menu/*.directory files for the root menu titles. The root menu title is the name=xxxxx line in the *.directory file. If there is no directory file for a <menu> then the text from the <menu> def in the *.menu file is used. There may be an existing Puppy menu editor that handles the root menu titles, but I'm not aware of one.
@ L18L
My menu screen shot was just a applications.menu I cobbled together for testing. I didn’t pay much attention to the separators And yes it is a nice exercise, in several areas. Gtk for one.
Regards,
Mobeus
_________________ /root for the home team
Last edited by Mobeus on Fri 05 Apr 2013, 19:25; edited 1 time in total
|
|
Back to top
|
|
 |
|