Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Thu 30 Oct 2014, 11:38
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
How to edit the xdg menu?
Moderators: Flash, Ian, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Author Message
gw

Joined: 22 Apr 2006
Posts: 89
Location: Suisse

PostPosted: Tue 27 Mar 2007, 17:32    Post_subject:  

Hello,

Thank you very much for your different reponses which bring a lot of clarifications for the use of this new menu.

A+
--
gw
Back to top
View user's profile Send_private_message Visit_website 
oli

Joined: 30 Aug 2006
Posts: 194
Location: Germany, Frankfurt

PostPosted: Wed 28 Mar 2007, 01:38    Post_subject:  

Perhaps a stupid question, but I cannot find 'fixmenus'. Where is it?

By the way, I built my menu by editing /root/.jwmrc (like before in Puppy 2.10) and it works fine. And this method is very simple, convenient and flexible.
Back to top
View user's profile Send_private_message 
bostonvaulter


Joined: 26 Sep 2006
Posts: 269

PostPosted: Wed 28 Mar 2007, 04:01    Post_subject:  

oli,

'fixmenus' is a command that you need to run from the console (rxvt), if you simply edit /root/.jwmrc it will be overwritten whenever you run fixmenus and install from petget.

Jason

_________________

Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7060
Location: Perth, Western Australia

PostPosted: Wed 28 Mar 2007, 09:09    Post_subject:  

Quote:
1) You messed up the categories in the .desktop files: your files use one "level", rather than "one;two;three" etc. which (I think) makes them incompatible with the freedesktop standard.
This causes a few problems:
- Window managers that have built-in XDG mechanisms don't recognize these files properly (also, the archaic location of icons in Puppy probably causes problems with finding icons).
- The opposite also happens: non-native .desktop files will not be recognized properly in Puppy, since they don't have the right categories… and if a user wants to make radical changes in their menu-structure (or are using an older Puppy, with Rarsa's XDG menus), then official Puppy packages will not be recognized properly.
- The menus are less flexible, since you can't structure them properly -- your .menu files have that problem, where you just "include" a whole bunch of categories and they're sorted alphabetically, rather than being in smaller groups that are each sorted (example: web-browsers mixed with the rest of the "internet" apps, rather than being at the beginning of the list).

Improving the categories is a "detail" that rarsa was going to do for me.
Quote:
- The fact that the .desktop files have the description in their name is also strange

Hmmm, I used a utility created by rarsa that autogenerated those desktop files. A very nit-picking criticism.
Quote:
3) The worst part is the whole "fixmenus" idea. The "D" in XDG stands for Dynamic, but what you do is just create a static menu using Rarsa's utilities…
The dynamic menu is created every time the WM is restarted, in the menu itself.

I disagree. It was my considered decision to go that way, as I wanted to avoid running rarsa's xdg-to-wm generation utility (repeatedly) everytime the window manager is started, which may have a time impact on very old hardware -- small, but it's those small things that
add up. The fixmenus system is still "dynamic", just constrained to only be done when needed.

Dougal, you need to cool down.
Back to top
View user's profile Send_private_message Visit_website 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Wed 28 Mar 2007, 11:09    Post_subject:  

Dougal,

Here are some clarifications:

BarryK wrote:
Improving the categories is a "detail" that rarsa was going to do for me.
I attest to this. It's just that it takes a big chunk of heads down time which I haven't had recently (read my previous post)
BarryK wrote:
Quote:
- The fact that the .desktop files have the description in their name is also strange

Hmmm, I used a utility created by rarsa that autogenerated those desktop files. A very nit-picking criticism.
With that many files, I had to create the first pass with a script that parsed the full JWM menu. My thought was that whenever an application developer provides its own .desktop file, that would replace the autogenerated file. There will be a period of time where the .desktop file provided with the .pet may be different from the .desktop file provided by the author in the source package.
BarryK wrote:
Quote:
3) The worst part is the whole "fixmenus" idea...
I disagree. It was my considered decision to go that way...
This is clearly a design desicion. I also had my doubts when I first saw it but I later understood the reasons:
When making design desicions you evaluate different factors and assign a relative weight to them.
As a tinker I put more weight in use the facilities provided by the WM.
Barry sees it from the user point of view and assigns more weight to that. I can clearly see as a well justified design desicion.

There are other things to consider:
- This is the first pass at the implementation. It can, and I'm sure will, be improved. (e.g. don't include the configuration portion in the jwm template)
- If absolutelly needed or desired, fixmenus can be overriden and the native WM functionality used.
- If absolutelly needed or desired, fixmenus can be overriden and a hardcoded menu file created.

So there is a lot of room for tinkers while things are simpler for regular users that don't care about messing up with the menu but want installed applications to just show in the menu.

I hope this clarified the issue.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send_private_message Visit_website 
bostonvaulter


Joined: 26 Sep 2006
Posts: 269

PostPosted: Wed 28 Mar 2007, 11:58    Post_subject:  

just for clarification I like the xdg menus.

I also think they are harder to customize, especially if you just want to move one menu entry up above another one.

Perhaps we could have a simple (as in gui) way to turn off the xdg menus. An even better option would be to have a menu editor that can insert xdg menu entries automatically at the position that you want them in.

Jason

_________________

Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7060
Location: Perth, Western Australia

PostPosted: Thu 29 Mar 2007, 01:13    Post_subject:  

Yes rarsa, thinking back to when I decided to go for the template system, there were all sorts of things I was weighing up. Some extra reasons that I had at the time are:

1.
I wasn't comfortable with the workaround that had to be done for menu config files that do not support an 'include'* feature. My template system does not rely on this, so works the same way for any window-manager/panel menu config file.
*EDIT: I really mean a "piping in" feature.

2.
A very small reason, but rarsa's .jwmrc file broke the "JWM configuration" program. At the time I wasn't keen on fixing the JWM configuration app. Which lead me to another thought...

3.
It seemed like a nice thing if the .jwmrc and other mwnu config files stayed "normal", that is like they were before XDG. In the future, any script could parse through them and see what's in the menu and the menu structure, without having to jump through extra hoops requiring knowledge of XDG. Also a user can read it and see exactly what the "actual" config file looks like.

The above may seem like small points, but they contributed to pushing me over in favour of the template system. So, it wasn't just decided on the spur of the moment, it was carefully considered over some time, and a "conservative implementation" of XDG was decided on. I was aware that the categories in the .desktop files was sub-optimal, also that some packages not designed specifically for Puppy might not find a place in the current menu structure, however I considered those things could be adjusted later -- which they can. It's no big deal.

Edited_time_total
Back to top
View user's profile Send_private_message Visit_website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7060
Location: Perth, Western Australia

PostPosted: Thu 29 Mar 2007, 01:26    Post_subject:  

bostonvaulter wrote:
I also think they are harder to customize, especially if you just want to move one menu entry up above another one.

Hi, no, it's a piece of cake. For JWM, edit /etc/xdg/templates/_root_.jwmrc. See this code:
Code:
<?xml version="1.0"?>
<JWM>
 <!-- IMPORTANT, ONLY EDIT /etc/xdg/templates/_root_.jwmrc -->
 <!-- jwm menu for puppy Linux -->
 <RootMenu label="Menu" labeled="false" height="0" onroot="3">
 
  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-desktop.menu
  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-system.menu
  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-setup.menu

  <Separator/>

  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-utility.menu
  PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-filesystem.menu

If for example you would like the "Utility" menu further up, just cut it out (second line from bottom in above code extract) and paste it further up.
Afterwards, run 'fixmenus' to regenerate /root/.jwmrc.

If you want to change where an entry in a submenu appears, also simple. Say for example "Xarchive archiver" entry under the "Utilities" menu but you want it somewhere else. Just go to the /usr/share/applications/Xarchive*.desktop and change its category -- you can find a list of categories in the information file at /etc/xdg/menus/hierachy. After editing the .desktop file, run "fixmenus".

It's simple, just a matter of getting accustomed to.
Back to top
View user's profile Send_private_message Visit_website 
bostonvaulter


Joined: 26 Sep 2006
Posts: 269

PostPosted: Thu 29 Mar 2007, 02:12    Post_subject:  

BarryK wrote:

If for example you would like the "Utility" menu further up, just cut it out (second line from bottom in above code extract) and paste it further up.
Afterwards, run 'fixmenus' to regenerate /root/.jwmrc.

If you want to change where an entry in a submenu appears, also simple. Say for example "Xarchive archiver" entry under the "Utilities" menu but you want it somewhere else. Just go to the /usr/share/applications/Xarchive*.desktop and change its category -- you can find a list of categories in the information file at /etc/xdg/menus/hierachy. After editing the .desktop file, run "fixmenus".

It's simple, just a matter of getting accustomed to.


hmmm, yeah I see your point, moving whole submenus around is simple, as is moving apps from one submenu to another. But I should have explained better, I meant that it was difficult to move your favorite menu entries to the top of their subcategory. I can't think of any way except for renaming them, but that is a bit too hackish for my liking. Is there a simple way that I'm missing?

Jason

_________________

Back to top
View user's profile Send_private_message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Thu 29 Mar 2007, 10:13    Post_subject:  

bostonvaulter wrote:
I meant that it was difficult to move your favorite menu entries to the top of their subcategory.
Read my poin 2. in one of my previous posts in this thread:
http://www.murga-linux.com/puppy/viewtopic.php?p=106748#106748

I'll post an example later today.

_________________
http://rarsa.blogspot.com Covering my eclectic thoughts
http://www.kwlug.org/blog/48 Covering my Linux How-to
Back to top
View user's profile Send_private_message Visit_website 
richard.a


Joined: 15 Aug 2006
Posts: 510
Location: Adelaide, South Australia

PostPosted: Fri 30 Mar 2007, 22:20    Post_subject:  

BarryK wrote:
3. It seemed like a nice thing if the .jwmrc and other mwnu config files stayed "normal", that is like they were before XDG. In the future, any script could parse through them and see what's in the menu and the menu structure, without having to jump through extra hoops requiring knowledge of XDG. Also a user can read it and see exactly what the "actual" config file looks like.

This is the concept employed by customisation of the menus within the mIRC IRC client developed by Khaled Mardam-Bey, and which works extremely well (for me) in WINE.

With customisation add-ons you write yourself, the scripts add sections into the various menus (five or six different ones according to where you click to get a menu).

Admittedly they do it in the order in which the ini file tells them to do it, but as its a text config file, that can also be edited.

Hope this isn't a red herring but I believe the concept is relevant Smile Thank you Barry and Rarsa for explaining the broken-ness and how it came about.

I don't believe in recriminations, there's a saying "Stuff Happens" which is very true Smile

Richard

_________________
Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?


Back to top
View user's profile Send_private_message 
Dougal


Joined: 19 Oct 2005
Posts: 2505
Location: Hell more grotesque than any medieval woodcut

PostPosted: Sun 01 Apr 2007, 14:48    Post_subject:  

I still can't say I'm satisfied, but first:
There is nothing for me to "cool down" about -- neither am I one of those who get all worked up over what happens on internet forums, nor am I a whiner who complains about things not being for his liking. I am here to help and, since it seemed like no one was aware of the problems with the menu structure, I decided to list some problems I have noticed while looking into the matter.
(could it be that the "Puppy is addictive" brigade has made people forget that users can actually be helpful??)

Anyway, having the "static" menu is something I have no problem accepting -- preventing a lag at when starting JWM is reason enough.
The main point is that the menu only gets refreshed at upgrade or when installing packages with PetGet -- not frequent enough -- and the users are left in the dark about how it is done.
I encountered this within two minutes of using 2.14: I had a previously installed app with a too-big icon in the menu, so I went and changed the .desktop file... and then what? I tried restarting JWM, restarting X, rebooting, looking in the menu for a "refresh menu" entry... Nothing.

(yes, I know the oversized icon problem has been solved -- I wanted to do it myself but couldn't find the code and Rarsa never replied to me when I asked... I ended solving it by just using "sed" in the fixmenus script)

Fixmenus could in fact be run at bootup (from rc.sysinit, in the background) but I think having a "refresh menus"entry would be enough.

As for the categories, I think it is a pretty big problem: modifying them actually means redoing the .desktop files and the .menu files -- pretty much redoing the entire menu structure -- which has repercussions: all the petget packages will have to be updated with the new .desktop files, which will in turn cause compatibility problems for users of 2.14 (and any other version using the current system)... that's why I think this matter should be taken care of before releasing any new versions.

Oh, and there should be some readme file in /etc/xdg... one that mentions the fixmenus script and how things work in the .menu files (Rarsa's binaries don't give any info).

_________________
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind
Back to top
View user's profile Send_private_message 
Kal

Joined: 05 May 2005
Posts: 624
Location: California, High Desert

PostPosted: Sun 01 Apr 2007, 16:23    Post_subject:  

Just for convenience, I added a "Fix Menus" entry to the main menu, under Setup (which I have renamed Settings). So, I made a fixmenus.desktop and placed it in /usr/share/applications, that has the following.

[Desktop Entry]
Encoding=UTF-8
Name=Fix Menus
Icon=xterm16.xpm
Comment=Xdg
Exec=xterm -bg black -fg white -e fixmenus
Terminal=false
Type=Application
Categories=X-SetupEntry
GenericName=Repair-Menus

Worked OK for me, after doing a fixmenus in terminal and a restart of JWM.
Good Luck, Kal
Back to top
View user's profile Send_private_message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7060
Location: Perth, Western Australia

PostPosted: Sun 01 Apr 2007, 19:42    Post_subject:  

The fixmenus script also runs at a version upgrade, and in 2.16 it also runs whenever a SFS layer is changed.

But yes, a menu entry would be nice.
Back to top
View user's profile Send_private_message Visit_website 
bostonvaulter


Joined: 26 Sep 2006
Posts: 269

PostPosted: Mon 02 Apr 2007, 06:13    Post_subject:  

how difficult would it be to do a diff when you run fixmenus. This would help prevent entries (especially dotpups) from getting forever deleted from the menus. Instead it could offer you (not necessarily in fixmenus) a way to hardcode them into your menu somewhere, or even create a .desktop entry for them.

I think this would be pretty helpful.

Jason

_________________

Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 2 of 3 Posts_count   Goto page: Previous 1, 2, 3 Next
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1257s ][ Queries: 13 (0.0191s) ][ GZIP on ]