Page 1 of 2

How to Change LXDE main menu

Posted: Tue Jun 02, 2009 4:37 pm
by makayabou
Hi,
I have a Debian Lenny with different users. One is using gnome, the other LXDE.
I can change menus in Gnome, using specifications of Freedesktop (/etc/xdg/menus or /home/user/.config/menus)
but I can't find a file which changes LXDE menu? Where is it??? !!!
Thanks for help .

Re: How to Change LXDE main menu

Posted: Sat Jun 06, 2009 8:40 am
by makayabou
Up!!!

I still can't find the .xml file governing lxpanel menu...
Has someone already done that???

Makayabou

Re: How to Change LXDE main menu

Posted: Sat Jun 06, 2009 10:49 am
by Marty Jack
The xml file is ordinarily in /etc/xdg/menus -- assuming you have configured with --sysconfdir=/etc
Normally you would put .desktop files in /usr/share/applications and .directory files in /usr/share/desktop-directories
These items are part of the lxmenu-data package.

Re: How to Change LXDE main menu

Posted: Tue Jun 09, 2009 3:35 pm
by makayabou
Hi,

In order to have a simplier resolution of this problem, I install Debian Lenny LXDE on a computer and I give you my contents
For /etc/xdg:

Code: Select all

animateur@debian-lxde:/etc/xdg$ ls
autostart  lxsession  openbox
animateur@debian-lxde:/etc/xdg$ cd lxsession/
animateur@debian-lxde:/etc/xdg/lxsession$ ls
LXDE
animateur@debian-lxde:/etc/xdg/lxsession$ cd LXDE/
animateur@debian-lxde:/etc/xdg/lxsession/LXDE$ ls
autostart  config  default
animateur@debian-lxde:/etc/xdg/lxsession/LXDE$ 
animateur@debian-lxde:/etc/xdg/openbox$ ls
autostart.sh  menu.xml  rc.xml
The file menu.xml doesn't match with lxpanel menu:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<openbox_menu xmlns="http://openbox.org/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://openbox.org/
                file:///usr/share/openbox/menu.xsd">

<menu id="root-menu" label="Openbox 3">
  <item label="Terminal emulator">
    <action name="Execute"><execute>x-terminal-emulator</execute></action>
  </item>
  <item label="Web browser">
    <action name="Execute"><execute>x-www-browser</execute></action>
  </item>
  <!-- This requires the presence of the 'menu' package to work -->
  <menu id="Debian" />
  <separator />
  <menu id="client-list-menu" />
  <separator />
  <item label="ObConf">
    <action name="Execute"><execute>obconf</execute></action>
  </item>
  <item label="Reconfigure">
    <action name="Reconfigure" />
  </item>
  <item label="Restart">
    <action name="Restart" />
  </item>
  <separator />
  <item label="Exit">
    <action name="Exit" />
  </item>
</menu>

</openbox_menu>
The file rc.xml gives us a tip:

Code: Select all

<menu>
  <!-- You can specify more than one menu file in here and they are all loaded,
       just don't make menu ids clash or, well, it'll be kind of pointless -->

  <!-- default menu file (or custom one in $HOME/.config/openbox/) -->

  <!-- system menu files on Debian systems -->
  <file>/var/lib/openbox/debian-menu.xml</file>
  <file>debian-menu.xml</file>
  <file>menu.xml</file>
The evocated file, debian-menu.xml, doesn't matches with lxpanel menu:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<!-- Automatically generated file. Do not edit (see /usr/share/doc/menu/html) -->

<openbox_menu xmlns="http://openbox.org/"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:schemaLocation="http://openbox.org/
                file:///usr/share/openbox/menu.xsd">

<menu id='Debian' label='Debian'>
  <menu id='Aide' label='Aide'>
    <item label='Info'>
      <action name='Execute'><execute>x-terminal-emulator  -T "Info" -e sh -c "info"</execute></action>
    </item>
    <item label='Xman'>
      <action name='Execute'><execute>xman</execute></action>
    </item>
  </menu>
  <menu id='Applications' label='Applications'>
    <menu id='Accessibilité' label='Accessibilité'>
      <item label='Xmag'>
        <action name='Execute'><execute>xmag</execute></action>
      </item>
    </menu>
    <menu id='Bureautique' label='Bureautique'>
      <item label='HPLIP Fax address book'>
        <action name='Execute'><execute>/usr/bin/hp-fab</execute></action>
      </item>
      <item label='HPLIP Fax utility'>
        <action name='Execute'><execute>/usr/bin/hp-sendfax</execute></action>
      </item>
    </menu>
    <menu id='Dessin et image' label='Dessin et image'>
      <item label='The GIMP'>
        <action name='Execute'><execute>/usr/bin/gimp</execute></action>
      </item>
      


[...]



      </item>
      <item label='Xclock (digital)'>
        <action name='Execute'><execute>xclock -digital -update 1</execute></action>
      </item>
      <item label='Xeyes'>
        <action name='Execute'><execute>xeyes</execute></action>
      </item>
      <item label='Xlogo'>
        <action name='Execute'><execute>xlogo</execute></action>
      </item>
    </menu>
  </menu>
</menu>

</openbox_menu>
I look at user's file system:

Code: Select all

animateur@debian-lxde:~$ ls -A
.bash_logout  .dmrc    .gnome2          .mozilla     .Xauthority
.bashrc       .gconf   .gnome2_private  .profile     .xsession-errors
.config       .gconfd  .local           .thumbnails
animateur@debian-lxde:~$ cd .config/
animateur@debian-lxde:~/.config$ ls -A
leafpad  lxpanel  lxterminal  openbox  pcmanfm
animateur@debian-lxde:~/.config$ cd lxpanel/
animateur@debian-lxde:~/.config/lxpanel$ ls -A
LXDE
animateur@debian-lxde:~/.config/lxpanel$ cd LXDE/
animateur@debian-lxde:~/.config/lxpanel/LXDE$ ls -A
animateur@debian-lxde:~/.config/lxpanel/LXDE$ cd /home/animateur/.config/openbox/
animateur@debian-lxde:~/.config/openbox$ ls -A
lxde-rc.xml
The file lxde-rc.xml gives a new tip:

Code: Select all

<menu>
  <!-- You can specify more than one menu file in here and they are all loaded,
       just don't make menu ids clash or, well, it'll be kind of pointless -->

  <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
  <file>/usr/share/lxde/openbox/menu.xml</file>
SO I look at this file, but it doesn't match with lxpanel menu:

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>

<openbox_menu xmlns="http://openbox.org/3.4/menu">

<menu id="apps-menu" label="Applications">
  <item label="PCManFM">
    <action name="Execute">
    <startupnotify><enabled>yes</enabled><icon>pcmanfm</icon></startupnotify>
    <command>pcmanfm</command></action>
  </item>
  <item label="Xterm">
    <action name="Execute"><command>xterm</command></action>
  </item>
  <item label="Firefox">
    <action name="Execute"><command>firefox</command></action>
  </item>
</menu>

<menu id="root-menu" label="LXDE">
  <separator label="LXDE" />
  <menu id="apps-menu" />
  <separator />
  <menu id="client-list-menu" />
  <separator />
  <item label="ObConf">
    <action name="Execute">
      <startupnotify><enabled>yes</enabled><icon>openbox</icon></startupnotify>
      <command>obconf</command>
    </action>
  </item>
  <item label="Reload Config Files">
    <action name="Reconfigure" />
  </item>
  <separator />
  <item label="Exit">
    <action name="Execute"><command>lxde-logout</command></action>
  </item>
</menu>

</openbox_menu>
So! Where is the .xml fil which governs the menu in lxpanel, using Debian with LXDE
Without it, it's impossible to personnalize lx panel 's menu

Thanks for people interested in the problem.

Makayabou

Re: How to Change LXDE main menu

Posted: Wed Jun 10, 2009 9:50 pm
by cwickert
What version of lxpanel are you running? With >= 0.4.0 lxpanel requires lxmenu-data which includes /etc/xdg/menus/lxde-applications.menu. If you have an older version, you can only edit the menu as described in the Xfce wiki.

Regards,
Christoph

Re: How to Change LXDE main menu

Posted: Wed Jun 17, 2009 12:30 am
by makayabou
Hello,
Thanks for your answer.
I don't have lxpanel >=0.4 but I can not change a .menu file because I don't have in my /etc/xdg/ :

Code: Select all

debian-lxde:/etc/xdg# ls
autostart  lxsession  openbox
debian-lxde:/etc/xdg# cd lxsession/
debian-lxde:/etc/xdg/lxsession# ls
LXDE
debian-lxde:/etc/xdg/lxsession# cd LXDE/
debian-lxde:/etc/xdg/lxsession/LXDE# ls
autostart  config  default
debian-lxde:/etc/xdg/lxsession/LXDE# cd ../
debian-lxde:/etc/xdg/lxsession# cd ../
debian-lxde:/etc/xdg# cd autostart/
debian-lxde:/etc/xdg/autostart# ls
kerneloops-applet.desktop
debian-lxde:/etc/xdg/autostart# cd ../openbox/
debian-lxde:/etc/xdg/openbox# ls
autostart.sh  menu.xml	rc.xml
I tried to compil lxpanel 0.4.1 form sources but it didn't work. I'm going to try again tomorrow.
I'll tell you the result.

Good bye

Makayabou

Re: How to Change LXDE main menu

Posted: Tue Jun 23, 2009 8:12 am
by makayabou
Hi

I succeed changing my lxpanel menu using 0.4.1 version of lxpanel.
It installs a lxde-applications.menu in my /etc/xdg/, so it's ok now.
The only problem is that I was forced to use SID repositories on my Debian to install it but whatever...

Thanks

Makayabou

Re: How to Change LXDE main menu

Posted: Thu Nov 04, 2010 3:55 pm
by onekk
I found tha in squeeze there is in my home directory a subdirectory named .local/share/applications/ were if i put a .desktop entry it will be show in ht lxpanel menu, i'm trying to modify the Other menu item to a more structured list, any suggestion?

Re: How to Change LXDE main menu

Posted: Thu Nov 04, 2010 7:04 pm
by cwickert
Hi and welcome to the LXDE forum!

Please read the link I have posted before. You will need to copy /etc/xdg/menus/lxde-applications.menu to ~/.config/menus/ and then edit it for your needs.

Regards,
Christoph

Re: How to Change LXDE main menu

Posted: Fri Dec 03, 2010 11:45 am
by Milozzy
I read the lik posted by cwickert and all the documentation, but I still don't succeeded in hiding the "Other" entries in the menu...can someone help me?