Menu editor for LXDE?

All questions and problems regarding LXDE components including LXSession, LXAppearance, GPicView, Leafpad, LXTerminal, Xarchiver, LXNM to be discussed here.

For PCManFM questions, please ask in the dedicated forum below.
Locked
kaj
Posts: 1
Joined: Sun Dec 06, 2009 11:13 pm

Menu editor for LXDE?

Post by kaj »

I have installed PCLinuxOS with the LXDE desktop, and everything seems to work fine.
But I have one problem. I miss a menu editor.

When I added the applications for printing (task-printing-scanning), it filled the main menu with a variety of entries to maintain a lot of printers. I would like to delete these menu entries, as I only use one Canon printer, which did not get a maintaining task.
I have tried to right-click on the menu ikon. It looks like there should be a mnenu editor, but the omly thing I can do in it, is to change the ikon.

I hope, there is a menu editor for LXDE, or at least another way to correct the menu.

Kaj Rasmussen
maces
Posts: 503
Joined: Sat Oct 25, 2008 6:04 pm
Contact:

Re: Menu editor for LXDE?

Post by maces »

Hi

you can delete the *.desktop files from "/usr/share/applications" or you can use the gnome menu editor, afaik. (But I'm not sure if Gnome menu editor works perfect.)

maces
lxdeISready4granny
Posts: 3
Joined: Thu Mar 04, 2010 10:45 pm

Re: Menu editor for LXDE?

Post by lxdeISready4granny »

Here's how I solved the problem. The LXDE menu is stored in your home directory at the following location:

/home/USERNAME/.config/lxpanel/LXDE/panels/panel

However, the very first line of that file clearly states:

"Manually editing is not recommended."

It says this with very good reason too. I won't tell you what happens if you edit this file directly while logged into LXDE, but will instead leave that to you to discover for yourself (or not).

What I did to resolve this issue was to create a new user named 'test.' (You can name the user whatever you wish). Then login to the test account.

Copy the file /home/test/.config/lxpanel/LXDE/panels/panel to /home/test/.panelrc using the following command:

cp .config/lxpanel/LXDE/panels/panel .panelrc

Edit .panelrc to your heart's content. It should be relatively easy to figure out how to make your menu entries and make submenu entries where you would like them to be, based on how the menu is already arranged. If you have ever created custom menu files for fvwm or icewm you will be even better prepared. Once you have edited panelrc to your liking, you next arrange .panelrc to be copied to /home/test/.config/lxpanel/LXDE/panels/panel every time you login, by editing the .xsession file like so:

cp .panelrc .config/lxpanel/LXDE/panels/panel &

The '&' sign in the above statement allows other statements to follow. Here is my .xsession file in its entirety;

-----
rm -Rf ~/.macromedia/Flash_Player/* &

cp .panelrc .config/lxpanel/LXDE/panels/panel &

xrdb -merge .Xresources &

sleep 10 & conky &

exec startlxde
-----

As you can see, the '&' symbol allows other statements to follow, so you will want to leave the '&' symbol off the very last entry in your .xsession. I do not guarantee this will work on all distributions, although this will definitely work on Debian Lenny. You might need to place the "cp .panelrc .config/lxpanel/LXDE/panels/panel &" statement in .xinit or some other file depending on your distribution. You might wish to alter the original lxde menu only slightly, then log out and log back in to view the menu changes, before editing the menu in it's entirety. That will certainly make it easier to catch any errors in your editing sooner rather than later. If your .panelrc menu gets screwed up, check your brackets - { or } , because that's usally where your editing screwups will be.

Here's my .panelrc in it's entirety, which includes submenus, as well as replaces the lxde start menu image with the debian logo:

-----
# lxpanel <profile> config file. Manually editing is not recommended.
# Use preference dialog in lxpanel to adjust config when you can.

Global {
edge=top
allign=center
margin=0
widthtype=percent
width=78
height=25
transparent=0
tintcolor=#000000
alpha=0
setdocktype=1
setpartialstrut=1
usefontcolor=0
fontcolor=#ffffff
background=0
backgroundfile=/usr/share/lxpanel/images/background.png
}

Plugin {
type = space
Config {
Size=2
}
}

Plugin {
type = menu
Config {
image=/usr/local/share/pixmaps/debian.png
menu {
name=Games
image=/usr/share/icons/Tango/24x24/categories/applications-games.png
menu {
name=Action
image=/usr/local/share/pixmaps/game-action.png
item {
name=Neverball
image=/usr/share/pixmaps/neverball-32.xpm
action=/usr/games/neverball
}
item {
name=Neverputt
image=/usr/share/pixmaps/neverputt-32.xpm
action=/usr/games/neverputt
}
item {
name=Open Arena
image=/usr/share/pixmaps/openarena32.xpm
action=/usr/games/openarena
}
item {
name=Penguin Command
image=/usr/local/share/pixmaps/penguin-command.png
action=/usr/games/penguin-command -w
}
}
menu {
name=Arcade
image=/usr/share/icons/gnome/24x24/devices/input-gaming.png
item {
name=Critical Mass
image=/usr/local/share/pixmaps/critical.png
action=/usr/games/criticalmass
}
item {
name=Doom
image=/usr/share/pixmaps/freedoom.xpm
action=/usr/games/doom
}
item {
name=Extreme Tux Racer
image=/usr/share/pixmaps/etracer.xpm
action=/usr/games/etracer
}
}
menu {
name=Blocks
image=/usr/local/share/pixmaps/game-blocks.png
item {
name=Breakout
image=/usr/share/pixmaps/lbreakout2.xpm
action=/usr/games/lbreakout2
}
item {
name=Frozen Bubble
image=/usr/share/pixmaps/frozen-bubble.xpm
action=/usr/games/frozen-bubble
}
item {
name=Tetris
image=/usr/local/share/pixmaps/ltris.png
action=/usr/games/ltris
}
item {
name=Xboing
image=/usr/local/share/pixmaps/xboing.xpm
action=/usr/games/xboing
}
}
menu {
name=Board
image=/usr/local/share/pixmaps/board-games.png
item {
name=Billiards
image=/usr/share/pixmaps/billard-gl.xpm
action=/usr/games/billard-gl
}
item {
name=Chess
image=/usr/share/pixmaps/dreamchess.xpm
action=/usr/games/dreamchess
}
item {
name=Gweled
image=/usr/share/pixmaps/gweled.png
action=/usr/games/gweled
}
item {
name=Mahjongg
image=/usr/local/share/pixmaps/xmahjongg.png
action=/usr/games/xmahjongg --bg green --tileset real
}
item {
name=Taipei
image=/usr/local/share/pixmaps/taipei.png
action=/usr/games/ace_taipei
}
}
menu {
name=Card
image=/usr/local/share/pixmaps/card-games.png
item {
name=Canfield
image=/usr/local/share/pixmaps/canfield.png
action=/usr/games/ace_canfield
}
item {
name=Pysol
image=/usr/share/games/pysol/pysol.xpm
action=/usr/games/pysol
}
item {
name=Scorpion
image=/usr/local/share/pixmaps/scorpion.png
action=/usr/games/ace_thornq
}
item {
name=Solitaire
image=/usr/local/share/pixmaps/solitaire.png
action=/usr/games/ace_solitaire
}
}
menu {
name=Strategy
image=/usr/local/share/pixmaps/games-strategy.png
item {
name=Colonization
image=/usr/share/pixmaps/freecol.xpm
action=/usr/games/freecol
}
item {
name=Lincity
image=/usr/share/pixmaps/lincity-ng.png
action=/usr/games/lincity-ng
}
item {
name=Pingus
image=/usr/share/pixmaps/pingus.xpm
action=/usr/games/pingus
}
}
}
menu {
name=Graphics
image=/usr/share/icons/Tango/24x24/categories/applications-graphics.png
item {
name=Camera
image=/usr/share/pixmaps/gtkam.png
action=/usr/bin/gtkam
}
item {
name=Image Editor
image=/usr/share/pixmaps/gimp.xpm
action=/usr/bin/gimp
}
item {
name=Image Viewer
image=/usr/share/pixmaps/gpicview.png
action=/usr/bin/gpicview
}
}

menu {
name=Internet
image=/usr/share/icons/Tango/24x24/categories/applications-internet.png
item {
name=Browse
image=/usr/share/pixmaps/iceweasel.png
action=/usr/bin/iceweasel
}
item {
name=Email
image=/usr/share/pixmaps/sylpheed.png
action=/usr/bin/sylpheed
}
item {
name=File Sharing
image=/usr/share/icons/hicolor/32x32/apps/frostwire.png
action=/usr/bin/frostwire
}
item {
name=Torrents
image=/usr/share/pixmaps/deluge-torrent-24.xpm
action=/usr/bin/deluge
}
}
menu {
name=Multimedia
image=/usr/share/icons/Tango/24x24/categories/applications-multimedia.png
item {
name=Disk Burner
image=/usr/share/icons/hicolor/22x22/apps/brasero.png
action=/usr/bin/brasero
}
item {
name=Jukebox
image=/usr/share/pixmaps/exaile.xpm
action=/usr/bin/exaile
}
item {
name=Media Player
image=/usr/share/pixmaps/smplayer.xpm
action=/usr/bin/smplayer
}
item {
name=Radio
image=/usr/share/pixmaps/streamtuner.png
action=/usr/bin/streamtuner
}
}
menu {
name=Office
image=/usr/share/icons/Tango/24x24/categories/applications-office.png
item {
name=Accounting
image=/usr/share/icons/hicolor/24x24/apps/gnucash-icon.png
action=/usr/bin/gnucash
}
item {
name=Calculator
image=/usr/share/icons/Tango/24x24/apps/kcalc.png
action=/usr/bin/xcalc
}
item {
name=Calendar
image=/usr/share/pixmaps/iceowl.xpm
action=/usr/bin/iceowl
}
item {
name=Presentations
image=/usr/share/icons/gnome/24x24/mimetypes/x-office-presentation.png
action=java -jar /usr/local/bin/tonicpoint.jar
}
item {
name=Quickbooks
image=/usr/local/share/pixmaps/win.png
action=/usr/bin/qemu -hda /home/orb/windows.img -cdrom /dev/cdrom -boot c -m 1024 -localtime
}
item {
name=Spreadsheet
image=/usr/share/pixmaps/gnome-gnumeric.png
action=/usr/bin/gnumeric
}
item {
name=Word Processor
image=/usr/share/pixmaps/abiword.png
action=/usr/bin/abiword
}
}
menu {
name=Settings
image=/usr/share/icons/Tango/24x24/categories/preferences-system.png
item {
name=Conky
image=/usr/share/icons/gnome/24x24/apps/administration.png
action=/usr/bin/leafpad .conkyrc
}
menu {
name=Control Centers
image=/usr/share/icons/Tango/24x24/categories/preferences-desktop.png
item {
name=LXDE
image=/usr/share/icons/Tango/24x24/apps/preferences-desktop-theme.png
action=/usr/bin/lxappearance
}
item {
name=Openbox
image=/usr/share/pixmaps/obconf.png
action=/usr/bin/obconf
}
}
item {
name=Menu Editor
image=/usr/local/share/pixmaps/menu.png
action=/usr/bin/leafpad .panelrc
}
menu {
name=Screen Settings
image=/usr/share/icons/gnome/24x24/apps/display-capplet.png
item {
name=Refresh
image=/usr/share/icons/gnome/24x24/apps/gdm.png
action=/usr/bin/xrefresh
}
item {
name=Resolution
image=/usr/share/icons/gnome/24x24/devices/video-display.png
action=/usr/bin/lxrandr
}
item {
name=Saver
image=/usr/share/icons/Tango/24x24/apps/preferences-desktop-screensaver.png
action=/usr/bin/xscreensaver-demo
}
}
item {
name=Video Card
image=/usr/local/share/pixmaps/nvidia-settings.png
action=/usr/bin/nvidia-settings
}
item {
name=Xresources
image=/usr/local/share/pixmaps/xresources.png
action=/usr/bin/leafpad .Xresources
}
item {
name=Xsession
image=/usr/share/icons/Tango/24x24/apps/preferences-system-session.png
action=/usr/bin/leafpad .xsession
}
}
menu {
name=System
image=/usr/share/icons/Tango/24x24/categories/applications-system.png
menu {
name=Administration
image=/usr/share/pixmaps/gksu-icon.png
item {
name=File Manager
image=/usr/share/pixmaps/pcmanfm.png
action=/usr/bin/gksu /usr/bin/pcmanfm
}
item {
name=Partitioner
image=/usr/share/pixmaps/gparted.png
action=/usr/bin/gksu /usr/sbin/gparted
}
item {
name=Processes
image=/usr/share/icons/Tango/24x24/apps/utilities-system-monitor.png
action=/usr/bin/gksu /usr/bin/xfce4-taskmanager
}
}
item {
name=File Manager
image=/usr/share/pixmaps/pcmanfm.png
action=/usr/bin/pcmanfm
}
item {
name=Free Space
image=/usr/local/share/pixmaps/gtkdiskfree.png
action=/usr/bin/gtkdiskfree
}
item {
name=Help
image=/usr/share/icons/Tango/24x24/apps/help-browser.png
action=/usr/bin/xman
}
item {
name=Processes
image=/usr/share/icons/Tango/24x24/apps/utilities-system-monitor.png
action=/usr/bin/xfce4-taskmanager
}
item {
name=Terminal
image=/usr/share/icons/Tango/24x24/apps/utilities-terminal.png
action=/usr/bin/xterm
}
}
menu {
name=Utilities
image=/usr/share/icons/Tango/24x24/categories/applications-accessories.png
item {
name=Archiver
image=/usr/share/pixmaps/xarchiver.xpm
action=/usr/bin/xarchiver
}
item {
name=Editor
image=/usr/share/icons/Tango/24x24/apps/accessories-text-editor.png
action=/usr/bin/leafpad
}
item {
name=Find
image=/usr/share/icons/Tango/24x24/actions/edit-find.png
action=/usr/bin/pcmanfm --find-files %F
}
item {
name=Font Selector
image=/usr/share/icons/Tango/24x24/apps/preferences-desktop-font.png
action=/usr/bin/xfontsel
}
item {
name=VirtualBox
image=/usr/share/pixmaps/virtualbox-ose.xpm
action=/usr/bin/virtualbox
}
item {
name=Window Killer
image=/usr/share/icons/gnome/24x24/actions/stop.png
action=/usr/bin/xkill
}
}
separator {
}
item {
command=run
}
separator {
}
item {
image=gnome-logout
command=logout
}
}
}

Plugin {
type = pager
}

Plugin {
type = space
Config {
Size=4
}
}

Plugin {
type = launchbar
Config {
Button {
id=iceweasel.desktop
}
Button {
id=sylpheed.desktop
}
Button {
id=iceowl.desktop
}
Button {
id=pcmanfm.desktop
}
Button {
id=leafpad.desktop
}
Button {
id=lxde-x-terminal-emulator.desktop
}
}
}

Plugin {
type = space
Config {
Size=4
}
}

Plugin {
type = wincmd
Config {
Button1=iconify
Button2=shade
}
}

Plugin {
type = space
Config {
Size=4
}
}

Plugin {
type = taskbar
expand=1
Config {
tooltips=1
IconsOnly=0
AcceptSkipPager=1
ShowIconified=1
ShowMapped=1
ShowAllDesks=0
UseMouseWheel=1
UseUrgencyHint=1
FlatButton=0
MaxTaskWidth=150
spacing=1
}
}

Plugin {
type = cpu
}

Plugin {
type = tray
}

Plugin {
type = dclock
Config {
ClockFmt=%r
TooltipFmt=%A %x
BoldFont=0
}
}

Plugin {
type = launchbar
Config {
Button {
id=lxde-screenlock.desktop
}
Button {
id=lxde-logout.desktop
}
}
}
-----

Once you have finished editing .panelrc and it appears as you wish, copy the .panelrc to your normal user account. (You may need root privileges to do this.):

copy /home/test/.panelrc /home/REALUSERNAME/.panelrc

You may also have to change the owner of .panelrc in your user account:

chown REALUSERNAME.REALUSERNAME /home/REALUSERNAME/.panelrc

Next, be sure and edit your .xsession file to copy the .panelrc at every login. Make sure your .xsession contains:

cp .panelrc .config/lxpanel/LXDE/panels/panel &


CAVEATS:

1. You will still be able to make changes to lxde by right clicking on lxpanel and selecting 'Add/Remove Panel Items.' However, those changes will not regenerate once you have logged out and back into lxde. The reason is because those changes edit .config/lxpanel/LXDE/panels/panel .panelrc, not .panelrc. The solution is to edit .panelrc directly. If you check my example .panelrc above, you will see an entry named 'Menu Editor,' which will allow you to edit .panelrc directly to overcome this issue. All other changes you might wish to make to lxpanel can be controlled via .panelrc, whether it be adding a background to the panel or adding desktop links to the panel.

2. Any new apps installed will not appear in lxde, since you are now working off of a customized .panelrc, instead of whatever system menu entries your distribution is using. However, as long as you have made an entry to edit .panelrc as referenced above in #1, it will be trivial for you to add new apps to your custom menu.

3. Changing icon themes will not change the icon theme on your menus, since the icons for each entry are now specified in .panelrc.

SO BEWARE THE ABOVE before you attempt this method of customizing the lxde menu.

However, I will tell you my mom, who will be 75 soon, has been using lxde with a very similar custom menu for almost a year now and I NEVER hear a peep out of her as far as having issues with lxde or not being able to find a needed app with the above setup.
BrokenTusk
Posts: 3
Joined: Sat Feb 05, 2011 12:27 am

Re: Menu editor for LXDE?

Post by BrokenTusk »

Since the above is actually a howto on manually editing the panel I've decided to link to a LXDE menu editor.
Finally, a complete, straightforward, bulletproof menu editor for LXDE...

LxMenuEditor will affect the main menu and the the apps your quick launcher calls on.
LXDE is already fast, but wait till you clean up the app launchers... wowee! :geek:

There's really nothing more to say.
Oh, yeah, how about where to get it?
http://opendesktop.org/content/show.php?content=138298
LxMenuEditor1.png
(122.87 KiB) Not downloaded yet
LxMenuEditor4.png
(192.44 KiB) Not downloaded yet
mcicak
Posts: 2
Joined: Fri Apr 22, 2011 11:55 pm

Re: Menu editor for LXDE?

Post by mcicak »

There is now a project called lxmed at https://sourceforge.net/projects/lxmed/. With this gui tool you can easily customize your Main Menu in LXDE.
Locked