Posts: 1,228
secipolla
Joined: 15 Jun 2008
#1
Ok, the section description says"News from upgrades" but I'll still post here because i think it's a proper place for suggestions regarding the next release.

The current script that reads desktop files for icewm's menu (and fluxbox's too) is a bit weak. It only reads files from /usr/share/applications and doesn't work with files that have a more complex syntax than usual.

I found a much better script in Connochaet OS. Actually the script is originally from Red-Hat, I think. It's the one RH, Fedora, Open SUSE and Mandriva use.

It needs python-xdg as a dependency and for it to work it's necessary to symlink /etc/xdg/menus/applications.menu from /etc/xdg/menus/lxde-applications.menu (this latter file is created by lxmenu-data, which I believe antiX already has installed since it's a dependency of pcmanfm).

I've attached the script here and a tiny video I made while testing it in an antiX 8.2 live-cd (the one I had left).
Just to say, the command I used to generate the menu in antiX-8.2 was

Code: Select all

icewm-xdg-menu --terminal"roxterm -e %s" --default-entry-icon /usr/share/icons/Buuf-Deuce/128x128/apps/alacarte.png --with-theme-paths --theme Buuf-Deuce --entire-menu > ~/.icewm/menu
(actually the one in the video didn't have the --default-entry-icon option, which is used only for apps that don't have an icon)

If this script is used in antiX (recommended), then adddesktop.sh could create files in /usr/local/share/applications instead of /usr/share/applications.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#2
Image
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#3
The example above generated the menu directly. But of course it can be used to generate a submenu.
Like output the command to ~/.icewm/applications and use the line

Code: Select all

menufile Title icon applications
in the menu.

In IceWM's menu,
prog - is a program you can run from your menu
separator - is line between groups
restart - restarts another window manager
menu - defines a sub-menu group folder inline
menufile - defines a sub-menu from another file, e.g. the shortcut names you placed in the toolbar
menuprog - defines a sub-menu built by running a program


========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://wiki.eeeuser.com/howto:icewmstartmenu"
linktext was:"http://wiki.eeeuser.com/howto:icewmstartmenu"
====================================
Last edited by secipolla on 14 Apr 2011, 20:52, edited 1 time in total.
Posts: 1,081
OU812
Joined: 29 Sep 2007
#4
I've been using the xdg script in arch linux. My only complaint is that it is coded to ignore apps in the"settings" category. How did you get your settings entry in the menu?

Thanks.

john
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#5
It uses (/etc/xdg/menus/)applications.menu
The folks at Arch must be using gnome-menus which divides the menu in gnome-applications.menu and gnome-settings.menu and thus they must be leaving the latter out.
antiX uses lxmenu-data which generates an all-inclusive lxde-applications.menu and links it to applications.menu
Posts: 1,081
OU812
Joined: 29 Sep 2007
#6
How about the icons in the menu? Is that custom? In the arch wiki there are no examples for setting icons - it defaults to the icewm theme folder.

john
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#7
Do you mean for the categories?
They are set when you choose the option --with-theme-paths, I think.
Posts: 1,081
OU812
Joined: 29 Sep 2007
#8
Thanks. I'll compare the 2 scrips to see what's up. I really like this script.

john
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#9
Here is a fluxbox version of the same script.
Posts: 1,228
secipolla
Joined: 15 Jun 2008
#10

========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://lxmed.sourceforge.net/"
linktext was:"There's an LXDE menu editor now, lxmed."
====================================

Since antiX uses lxmenu-data for its menus (Fluxbox's and IceWM's), lxmed should work fine. Besides editing the menus it would also replace the antiX tool for creating desktop files.

I didn't try it cos I don't have neither those winndow managers nor LXDE now, but there's a video of it (on Xfce, by the way) at
Posts: 4,164
rokytnji
Joined: 20 Feb 2009
#11
I have LXDE installed so lets give this a go in AntiX 11 core i686.

Make sure you have java installed. Then follow these steps:

* To install lxmed, first download a .tar.gz file.
* Unpack archive in your home or desktop folder.
* In terminal, enter the lxmed folder and type chmod +x install.sh to make install script executable.
* Install lxmed by typing sudo ./install.sh
* Go to main menu -> Preferences -> Main Menu Editor

How to uninstall lxmed?

To uninstall lxmed, type in terminal
sudo /opt/lxmed/uninstall.sh

If you receive an error message like
sudo: /opt/lxmed/./uninstall.sh: command not found
try executing first
sudo chmod +x /opt/lxmed/uninstall.sh
and then running the uninstall command above.
Java installed

Code: Select all

root@Biker:/home/harry/lxmed# java -version
java version"1.6.0_26"
Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
Java HotSpot(TM) Client VM (build 20.1-b02, mixed mode, sharing)
Check. Install lxmed.

Code: Select all

root@Biker:/home/harry/lxmed# ./install.sh
Installing application...

Removing any previous installed files and folders...
rm: cannot remove `/usr/share/applications/lxmed.desktop': No such file or directory
rm: cannot remove `/bin/lxmed': No such file or directory
rm: cannot remove `/usr/bin/lxmed': No such file or directory
mkdir: created directory `/opt/lxmed'
`content/lxmed' -> `/usr/bin/lxmed'
mode of `/usr/bin/lxmed' changed to 0755 (rwxr-xr-x)
`content/LXMenuEditor.jar' -> `/opt/lxmed/LXMenuEditor.jar'
`content/uninstall.sh' -> `/opt/lxmed/uninstall.sh'
mode of `/opt/lxmed/uninstall.sh' changed to 0755 (rwxr-xr-x)
`content/lxmed.png' -> `/opt/lxmed/lxmed.png'
`content/lxmed.desktop' -> `/usr/share/applications/lxmed.desktop'

Installation sucessfully completed. Enter lxmed to run application or check Preferences -> Main Menu Editor in your main menu


Check and done. One needs to use your password to launch it (which is a good thing).

Thanks secipolla for adding a new tool for my LXDE AntiX 11 i686 core install.