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 18 Sep 2014, 09:55
All times are UTC - 4
 Forum index » House Training » HOWTO ( Solutions )
How I customize my Puppy menu (for JWM) - Method 1
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [8 Posts]  
Author Message
kamato

Joined: 09 Dec 2010
Posts: 2

PostPosted: Tue 14 Dec 2010, 19:22    Post subject:  How I customize my Puppy menu (for JWM) - Method 1  

How I customize my Puppy menu (for jwm) - Method 1

I have figured out a couple of ways to simplify the customization process for the Puppy Menus.

My intention is to help make it easier to build custom menus for ordinary users by hiding some of the programs that most users may never need as well as group some applications on the menu.

I have tried this on Puppy 5.11 and it works.

Customizing the Menu in Puppy entails making changes to at least one of the following files or adding new files to the respective folders.

/etc/xdg/templates/_root_.jwmrc => This is read by the fixmenus program to rebuild the config file for the jwm program

/etc/xdg/menus/*.menu =>Each menu entry is associated with one of these files. You can create your own file by copying an existing one and modifying it.

/usr/share/desktop-directories/*.directory =>Each file is referenced by a *.menu file above. This is where you label the menu item

/usr/share/applications/*.desktop => This configures the programs that need to run when the applications icons under a menu are clicked.

These are the steps I follow:

1.) Modify the /usr/sbin/fixmenus script by making the below changes

Change this line:

EXECMENU="`echo -n "$ONELINE" | grep -o 'PUPPYMENU.*' | cut -f 2-5

To:

EXECMENU="`echo -n "$ONELINE" |grep -v '#'| grep -o 'PUPPYMENU.*' | cut -f 2-5

Notice the introduction of |grep -v ‘#’
This allows the fixmenus program to skip commented (#) lines when building the new /root/.jwmrc file

2.) Now edit /etc/xdg/templates/_root_.jwmrc and put hash (i.e #) at the beginning of any line that begins with PUPPYMENU that you would like to hide from the menu listing.

For example putting a hash (#) in front of the following lines in the _root_.jwmrc file will hide the Setup and System menu entries.

# PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-system.menu
# PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-setup.menu

3.) To avoid manually having to restart jwm each time the above file is altered I have also added the following line at bottom of the fixmenus script:

jwm -restart

This way anytime I run the fixmenus to rebuild the /root/.jwmrc file, JWM will automatically be run as well to display the changes I have made to any of the XDG files.

4.) To add a new menu item, make an entry in /etc/xdg/templates/_root_.jwmrc in the section that have lines beginning with PUPPYMENU:

PUPPYMENU jwm-xdgmenu /etc/xdg/menus/puppy-officeapplications.menu

Where you place your entry determines the order in which is it will show up on the Menu.

Make a copy of an existing *.menu file and name it to match the above entry in _root_.jwmrc

e.g

# cd /etc/xdg/menus
# cp puppy-fun.menu puppy-officeapplications.menu

5.) Modify your new *.menu file as necessary:

Below is the content of my puppy-officeapplications.menu file.

# cat puppy-officeapplications.menu

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE xfdesktop-menu PUBLIC "-//freedesktop//DTD Menu 0.8//EN" "http://www.freedesktop.org/standards/menu-spec/menu-0.8.dtd">
<Menu>
<Name>OfficeApplications</Name>
<DefaultAppDirs/>
<DefaultDirectoryDirs/>
<AppDir>/opt/kde/share/applications/kde</AppDir>
<Directory>Puppy-officeapplications.directory</Directory>
<Include>
<Category>Office</Category>
<Category>X-Document</Category>
<Category>X-DocumentUtility</Category>

</Include>
</Menu>

Choose the Categories based on the applications you would like to appear in your menu

6.) Go to the /usr/share/desktop-directories folder and create the Puppy-officeapplications.directory file by making a copy of an existing one:

# cd /usr/share/desktop-directories
# cp Puppy-Fun.directory Puppy-officeapplications.directory

Below is the content of my Puppy-officeapplications.directory

# cat Puppy-officeapplications.directory

[Desktop Entry]
Encoding=UTF-8
Name=Office Applications
Icon=games24.png
Type=Directory

7.) After cross-checking to make sure steps 4 through 6 have been followed correctly I just run fixmenus and verify the results.

8.) To hide an application from a menu entry edit the associated *.desktop file and add Hidden=true
to the file. Then run fixmenus
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Sun 10 Feb 2013, 13:37    Post subject:  

Hello, kamato.

Many, many thanks. I've been looking for a clear explanation of how to do this for years, and you've provided one.

Again thanks.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
tallboy


Joined: 21 Sep 2010
Posts: 442
Location: Oslo, Norway

PostPosted: Mon 11 Feb 2013, 00:12    Post subject:  

Kamato, this is vital info that is extremely well presented, thank you. In the thread for the new Slacko 5.4, there was shown an easy way to get rid of the submenus, http://www.murga-linux.com/puppy/viewtopic.php?p=667994&search_id=1327885546#667994. In the Lucid 528 that I am running right now, I have tried to get rid of the submenus, but failed so far. Do you know how to get rid of them? I always run jwm.

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Mon 11 Feb 2013, 03:34    Post subject: How I customize my Puppy menu (for JWM) - Method 1  

tallboy,

I don't know if Kamato is still around...

Since I recently used these very instructions to create a custom menu for Skychart found here, I might be able to help.

First of all, I think Mick uses jwm_tools in Slacko that technosaurus put together... and if that is the case, those instructions may not apply to you.

I am assuming that jwm_tools is not used in Lucid, and if I am right, then you need to locate your .jwmrc file. In Wary it's located in: /root and note that it is a hidden file. Right-click the file: Open As Text and you'll find all of the specific entries for your submenus. Remove any entries you don't want, run fixmenus at the terminal, then --> Menu-->Shutdown-->Restart JWM... done.

I hope this helps... if not, could you explain in more detail what you are wanting to do and why.

Monsie

_________________
My username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 4231
Location: Gatineau (Qc), Canada

PostPosted: Mon 11 Feb 2013, 08:39    Post subject:  

tallboy,

Why do you want to get rid of submenus? I think, on the contrary, that we need more submenus ! The less submenus, the more confusion, IMHO.

Certainly, a "Database" submenu should be added, and not only a "Science" submenu. If nothing else, "Notecase" certainly qualifies as a databasing program, and "dmcsv" (a disarmingly simple comma-delimited processor) should be there too. And of course, sbase would be right at home there, from either aOO or LO, if the user installs one of the latter on his/her Puppy. No more confusion between Calculations and Databases : yey! The Consumers Association will give Puppy its Annual Prize ! Smile

BFN

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send private message Visit poster's website 
tallboy


Joined: 21 Sep 2010
Posts: 442
Location: Oslo, Norway

PostPosted: Mon 11 Feb 2013, 10:03    Post subject:  

musher0, no, no, no, I only want one level of submenus! My brain cannot manage multiple menu levels! Razz

Monsie, I simply forgot to look at the date of origin for this thread. Embarassed
I see that Kamato only made 2 threads in the forum, here is the second: How I customize my Puppy menu (for jwm) - Method 2

I only want to keep one level of submenus. The problem is that there is no simple way to do the operation. Removing the entry for a menu level in .jwmrc does not produce a result. Technosaurus' jwm_trools is unfortunately not listed in the Lucid repository. I am certain I will find a way to do it, but I see no special joy in reinventing the wheel, so if there already exists a good recipe for doing it simple, I'll roll along! Laughing

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Monsie


Joined: 01 Dec 2011
Posts: 633
Location: Kamloops BC Canada

PostPosted: Mon 11 Feb 2013, 16:03    Post subject: How I customize my Puppy menu (for JWM) - Method 1  

tallboy,

You can find jwm_tools that technosaurus put together right here.

Hope this helps,
Monsie

_________________
My username is pronounced: "mun-see". Derived from my surname, it was my nickname throughout high school.
Back to top
View user's profile Send private message 
tallboy


Joined: 21 Sep 2010
Posts: 442
Location: Oslo, Norway

PostPosted: Tue 12 Feb 2013, 04:17    Post subject:  

First impression of jwm_tools was not overwhelming, it screwed up my settings right away. I'll eventually make my own solution.

Thank you for trying, Monsie! Very Happy

tallboy

_________________
True freedom is a live Puppy on a multisession CD/DVD.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [8 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » HOWTO ( Solutions )
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.0888s ][ Queries: 12 (0.0192s) ][ GZIP on ]