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 29 Sep 2016, 16:36
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 3 of 3 [37 Posts]   Goto page: Previous 1, 2, 3
Author Message
BarryK
Puppy Master


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

PostPosted: Mon 02 Apr 2007, 08:59    Post subject:  

bostonvaulter, no problem, see one of my earlier posts. You can easily hardcode an entry by putting it into the template file. Or, yes, create a .desktop file -- there's another thread in this forum with a project for a .desktop-creator gui thing.
Back to top
View user's profile Send private message Visit poster's website 
rarsa


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

PostPosted: Tue 03 Apr 2007, 22:00    Post subject:  

I'm having some time right now as I've already delivered the second draft of a presentation.

So right now I'm working on the reclasification of the .desktop files.

It should be ready before the end of the week.

_________________
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 poster's website 
James186282


Joined: 08 Sep 2009
Posts: 225
Location: Minnesota

PostPosted: Mon 11 Apr 2016, 15:12    Post subject: Still Confused.
Subject description: To many Abstractions for my dumb head to wrap around.
 

I know this is a very old thread and that I have been a bit slow to understand things but I've done a fair amount of reading and I still don't understand the point.

I think I get the original intent of the JWM .jwmrc and .jwmrc-tray files and I guess its fine to have them call theme and personal files that just write over each other so if you somehow goof up your custom theme you have the original to kick in.

What is the benifit of not staying with this exactly? Don't get me wrong I think Joe wrote a pretty nice system and I've nothing but thanks to give to Barry for the mountain of work he put into making Puppy Linux. I just don't understand what this gains us. And I'm really hung up trying to figure out the correct tools to use to change which menu item goes where. I get that the fixmenus is a command line thing.

Is this just an abstraction layer to keep people from screwing up their system? Or does it have its roots in being able to install and remove programs that won't work with stock JWM.

Assuming the worst. Is there a simple way to run JWM without this scheme?

Thanks - Jay

_________________
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
Donald Knuth
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 1360
Location: Germany

PostPosted: Mon 11 Apr 2016, 16:08    Post subject:  

Quote:
And I'm really hung up trying to figure out the correct tools to use to change which menu item goes where.

Where a menu entry is to be found in JWM an other menus is dependent on what is in the .desktop file of the application in /usr/share/applications.
alsaplayer.desktop wrote:
[Desktop Entry]
Version=1.0
Name=ALSA-Player 0.99.81 Audio Player
Name[de]=ALSA-Player 0.99.81 Musikwiedergabe
Name[es]=ALSA-Player 0.99.81 Reproductor de Audio
Name[fr]=ALSA-Player 0.99.81 lecteur audio versatile
Type=Application
Comment=Versatile audio player for the Audio Linux Sound Architecture
Comment[de]=Wiedergabe von Musikdateien und CDs
Comment[fr]=lecteur audio versatile for the Audio Linux Sound Architecture
Exec=/root/.my-sfs-scripts/LP2_ALSAPlayer-0.99.81.sfs.Scripts/LP2_ALSAPlayer-0.99.81.sfs.alsaplayer.run.sh
Icon=/usr/share/pixmaps/alsaplayer48.png
MimeType=audio/x-scpls;audio/x-mpegurl;audio/mpegurl;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/x-wav;audio/ogg+vorbis;audio/ogg;application/flac;
Categories=Player;
GenericName=ALSA-Player 0.99.81 Audio Player
GenericName[de]=ALSA-Player 0.99.81 Musikwiedergabe
GenericName[es]=ALSA-Player 0.99.81 Reproductor de Audio
GenericName[fr]=ALSA-Player 0.99.81 lecteur audio versatile


Categories are defined in /etc/xdg/menus/hierarchy where the .menu files are including the sub-categories.

For the names of categories and sub-categories visible in the jwm menu there are the .directory files in /usr/share/desktop-directories

Command fixmenus is just to refresh the menu to make new added items visible/available in the menu.

_________________
RSH

T.O.P.L.E.S.S. - the Multi-Language Puppy Linux Wrapper.

Zivilcourage bringt nichts als Ärger ein!
Back to top
View user's profile Send private message 
James186282


Joined: 08 Sep 2009
Posts: 225
Location: Minnesota

PostPosted: Tue 12 Apr 2016, 23:10    Post subject:  

Let me start this by saying I realize this is a problem that is mostly about me. I am the kid who broke the clock to see what made it work and until I was able to break a clock and make it work again I was unhappy. I think the medical world calls this OCD Perfectionist. One example that will make this understandable (maybe?) is that I like Assembly language. I dislike high level languages with massive library files so that gaining an understanding of what is really going on is more difficult. In short I hate abstraction layers. *I also hate defending myself about it. Just leave it at I'm a mental patient.

So - I very much appreciate anyone taking the time to help me understand things. I'm still lost. What is the point of doing it this way rather then just JWM alone? Does it gain speed? Does it make adding and removing programs easier? Is there a point I'm not hitting on? I'm no expert but I've gained some basic understanding of the configuration files in JWM. I think it would have been easier to get to that point had it not been that changing one file often doesn't do anything because a later loaded file overwrites things. *Another question why have 4 files to config jwm and some of them are not noted in the JWM doc.

I'm familiar with the .desktop files in the applications directory (I drag them to the desktop so I don't need to use Menu. What about .desktop files changes the order or seperations in Menu?

Or maybe just a general complaint. And I say this with the understanding that there are probably hundreds of distros of Linux and I think Puppy is the best. And its the one that I tell people to go to when they finially get sick of Windows or this awful scheme where perfectly good computers get pitched because the software bloat becomes too huge. I also tell them to try it because it just has to be the easiest thing to put on a computer and just have it run in nothing flat. I haven't met anyone who thinks Windows can be install in less then a day (And lots of curses) so popping in a Puppy CD and be running in minutes? That good... So please don't hear this as a complaint. I'm not a puppy hater.

So back to my babbling - I'm a little more familiar with menu.lst and the xorg.conf files. It drove me crazy to try to figure xorg.conf because it was being auto alrered and I didn't catch on very fast. Menu.lst is more of the case that people generally don't comment things. After a lot of reading the list of things you can do in menu.lst is simply astonishing

*I'm not pointing fingers. Probably nobody comments code or batch files like I do but I find myself doing something and then having to come back later (years) and hate starting from scratch. So my xorg.conf and menu.lst files are huge but.... On the slowest pile of junk computer it makes no difference so why not?

I found the case where some files that the majortity of distros use and publish some info on are either empty and point to a different file or just not used. I wish there were some notes on why things like that were done. A lot of this is just me being curious.

I realize we have web searches that can find almost anything but I seem to always find stuff that is not very readable and comes without any working example. If I want to fiddle with the menu.lst file its way better (for me) to have it fully of comments so I can just open the file and change what I want without wearing out Google.

Maybe let me take a very simple example.

Say I want to have GParted taken out of the system submenu and moved to the Filesystem sub Menu.

Or lets say I want to rename xCHM to E-Book Reader?

Or simply remove something from Menu?

Thanks and if anyone needs a bribe... Wink

_________________
Science is what we understand well enough to explain to a computer.
Art is everything else we do.
Donald Knuth
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1114
Location: Japan

PostPosted: Wed 13 Apr 2016, 02:11    Post subject: Re: Still Confused.
Subject description: To many Abstractions for my dumb head to wrap around.
 

James186282 wrote:
I think I get the original intent of the JWM .jwmrc and .jwmrc-tray files and I guess its fine to have them call theme and personal files that just write over each other so if you somehow goof up your custom theme you have the original to kick in.
I'm afraid your guess is wrong. Whatever the original intent may have been, creating a fall-back system for people who screw up their system was certainly not the intent.

Quote:
What is the benifit of not staying with this exactly?
What is "this"? Staying with what exactly?

Quote:
does it have its roots in being able to install and remove programs that won't work with stock JWM.
Again: What is "it"? It would help me tremendously if you could explain what condition you would regard a the ideal setup from which the current setup differs

Quote:
Assuming the worst. Is there a simple way to run JWM without this scheme?
Assuming as best as I can that you mean the scheme where fixmenus overwrites .jwmrc: Yes, you can run JWM without it and it will make JWM simple. But is it simple to achieve? Not really. You'll have to make several changes. Is it convenient? Depends on your skill level. For most users it would break too many things and editing the menu manually every time a new program is installed may not be everyone's cup of tea.

You should keep in mind that fixmenus doesn't just generate menus for JWM. This little tool updates the menu templates of all window managers it finds in /etc/xdg/templates. This is a great help when you switch between window managers.

While I think that fixmenus does a decent job in pulling menu information from the .desktop files and turning them into wm specific menu files I see no reason why it has to overwrite .jwmrc. This is a really bad design decision and without it people could happily edit their .jwmrc (which they are now discouraged to do), without fear that the next program installation will overwrite their changes. There would be no need to keep separate *tray *personal or *theme files.

The culprit is the template /etc/xdg/templates/_root_.jwmrc, which includes not only the menu section of .jwmrc but a large portion of other config settings, settings that do not require the help of - mind the name! - fixmenus. There is really no need to keep a template of the complete .jwmrc in the templates directory. I changed this and renamed /etc/xdg/templates/_root_.jwmrc to /etc/xdg/templates/_root_.jwmrc-menu, then removed everything not related to the menu section. Consequently /root/.jwmrc will remain static and never be updated by fixmenus. Instead fixmenus generates .jwmrc-menu, which I "<include>" in the static .jwmrc. All other include files like -tray and -personal etc. I reintegrated into .jwmrc. This leaves me with only 2 config files. Theoretically you would need only 1 file as mentioned in the JWM manual, but since JWM lacks a tool to read xdg menu information this would bring no benefit.

This is how my /etc/xdg/templates/_root_.jwmrc-menu looks like. No other templates in this directory.
Code:
<?xml version="1.0"?>
<JWM>
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
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-graphic.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-document.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-calculate.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-personal.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-network.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-internet.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-multimedia.menu
PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-fun.menu
<Separator/>
<Program label="Help" icon="help24.png">exec defaulthtmlviewer file:///usr/share/doc/index.html</Program>
<Menu label="Shutdown" icon="shutdown24.png" height="16">
<Program label="Exit to prompt" icon="prompt16.xpm">exec wmexit</Program>
<Program label="Reboot computer" icon="mini-turn.xpm">exec wmreboot</Program>
<Program label="Power-off computer" icon="mini-stop.xpm">exec wmpoweroff</Program>
<Program label="Restart X server" icon="mini-x.xpm">restartwm</Program>
<Restart label="Restart JWM" icon="mini-windows.xpm"/>
</Menu>
</JWM>


And this is the way the menu is included in /root/.jwmrc:
Code:
<RootMenu onroot="3">
   <Include>/root/.jwmrc-menu</Include>   
</RootMenu>


Quote:
Maybe let me take a very simple example.
Say I want to have GParted taken out of the system submenu and moved to the Filesystem sub Menu.
Or lets say I want to rename xCHM to E-Book Reader?
Or simply remove something from Menu?
This topic has been covered many times. Adding and removing is not difficult. I hope I made it simple enough by adding some pictures. Laughing
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 1360
Location: Germany

PostPosted: Wed 13 Apr 2016, 17:48    Post subject:  

Quote:
Say I want to have GParted taken out of the system submenu and moved to the Filesystem sub Menu.

Or lets say I want to rename xCHM to E-Book Reader?

Or simply remove something from Menu?

All of this depends on what is in the .desktop file.

Quote:
[Desktop Entry]
Version=1.0
Name=ALSA-Player 0.99.81 Audio Player
Name[de]=ALSA-Player 0.99.81 Musikwiedergabe
Name[es]=ALSA-Player 0.99.81 Reproductor de Audio
Name[fr]=ALSA-Player 0.99.81 lecteur audio versatile
Type=Application
Comment=Versatile audio player for the Audio Linux Sound Architecture
Comment[de]=Wiedergabe von Musikdateien und CDs
Comment[fr]=lecteur audio versatile for the Audio Linux Sound Architecture
Exec=/root/.my-sfs-scripts/LP2_ALSAPlayer-0.99.81.sfs.Scripts/LP2_ALSAPlayer-0.99.81.sfs.alsaplayer.run.sh
Icon=/usr/share/pixmaps/alsaplayer48.png
MimeType=audio/x-scpls;audio/x-mpegurl;audio/mpegurl;audio/mp3;audio/x-mp3;audio/mpeg;audio/x-mpeg;audio/x-wav;audio/ogg+vorbis;audio/ogg;application/flac;
Categories=Player;
GenericName=ALSA-Player 0.99.81 Audio Player
GenericName[de]=ALSA-Player 0.99.81 Musikwiedergabe
GenericName[es]=ALSA-Player 0.99.81 Reproductor de Audio
GenericName[fr]=ALSA-Player 0.99.81 lecteur audio versatile

To have GParted taken out of the system submenu and moved to the Filesystem sub Menu just change content of Categories=

To rename xCHM to E-Book Reader just change content of Name= or even of the one related to the your language if it is NOT EN.

To simply remove something from Menu change content of NoDisplay=.

If it is not there, add it: NoDisplay=true

Not to forget to execute fixmenus afterwards.

_________________
RSH

T.O.P.L.E.S.S. - the Multi-Language Puppy Linux Wrapper.

Zivilcourage bringt nichts als Ärger ein!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 3 [37 Posts]   Goto page: Previous 1, 2, 3
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1019s ][ Queries: 12 (0.0060s) ][ GZIP on ]