Posted: Tue 14 Dec 2010, 19:43 Post subject:
How I customize my Puppy menu (for jwm) - Method 2
How I customize my Puppy menu (for jwm) - Method 2
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.) Make a copy of the /usr/sbin/fixmenus script:
cp /usr/sbin/fixmenus /usr/sbin/custommenus
2.) Modify your copy of fixmenus (i.e /usr/sbin/custommenus) and make the following changes:
This allows the custommenus program to skip commented (#) lines when building the new /root/.jwmrc file. Notice that we have also changed the search string PUPPYMENU to USERMENU.
3.) Now edit /etc/xdg/templates/_root_.jwmrc and make copies of some of the lines that begin with PUPPYMENU that you would like to appear on the user’s custom Menu..
For example if you want the user to see the Internet icon on the custom Menu, just duplicate the Internet line and modify as follows and change the new line to start with USERMENU instead of PUPPYMENU:
When you run the custommenus script in step 2. it will skip the lines that begin with PUPPYMENU and process the lines that start with USERMENU in /etc/xdg/templates/_root_.jwmrc
4.) 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 custommenus script:
jwm -restart
This way anytime I run the custommenus to rebuild the /root/.jwmrc file, JWM will automatically be restarted to display the changes I have made to any of the XDG files.
5.) To add a new menu item, make an entry in /etc/xdg/templates/_root_.jwmrc in the section that have lines beginning with USERMENU:
8.) After cross-checking to make sure steps 5 through 7 have been followed correctly just run custommenus and verify the results.
9.) To hide an application from a menu entry edit the associated *.desktop file and add Hidden=true
to the file. Then run custommenus.
10.) With the above method you can switch between the default root Menu and the customized user menu. Run fixmenus to revert back to the root menu. Run custommenus to see your custom menu. It is that simple.
Posted: Tue 22 Feb 2011, 18:46 Post subject:
Re: How I customize my Puppy menu (for jwm) - Method 2
Hi, sorry for popping in late, thanks for the great tutorial. I have a JWM related problem, I'd like to open some programs maximised using groups. Do you have any ideas what I'm doing wrong?
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