Opened 15 years ago

Closed 15 years ago

#419 closed task (fixed)

Add all installed application to the menu at the top of the desktop.

Reported by: shansen Owned by: live-demo@…
Priority: normal Milestone:
Component: OSGeoLive Keywords:
Cc:

Description

It probably would be good to have a separate submenu.

Change History (8)

comment:1 by hamish, 15 years ago

for automation of this see "man update-menus" and /usr/share/menu/. It self-organizes by section= tag.

sample entry:

?package(gpsdrive):needs="x11"\
  section="Applications/Science/Geoscience"\
  longtitle="GpsDrive: A car (bike, ship, plane, foot) navigation system"\
  title="GpsDrive" command="gpsdrive"\
  icon="/usr/share/gpsdrive/pixmaps/gpsicon.xpm"

sample entry with appearing in two different menu sections:

?package(xterm):\
 needs="x11"\
 section="Applications/Terminal Emulators"\
 longtitle="XTerm: terminal emulator for X"\
 title="XTerm"\
 icon="/usr/share/pixmaps/xterm-color_32x32.xpm"\
 command="xterm"
?package(xterm):\
 needs="x11"\
 section="Applications/Terminal Emulators"\
 longtitle="XTerm: terminal emulator for X with Unicode support"\
 title="XTerm (Unicode)"\
 icon="/usr/share/pixmaps/xterm-color_32x32.xpm"\
 command="uxterm"

Hamish

comment:2 by hamish, 15 years ago

e.g. put this at the end of main.sh

TASKS="qgis gpsdrive gpsd-clients"
MENU_NAME="OSGeo Applications"

echo "# OSGeo submenu apps" > /tmp/osgeo_submenu
for TASK in $TASKS ; do
   cat /usr/share/menu/$TASK | \
    sed -e "s/section=\"[^\"].*/section=\"$MENU_NAME\"/" \
    >> /tmp/osgeo_submenu
done

cp /tmp/osgeo_submenu /usr/share/menu
update-menus

Hamish

comment:3 by hamish, 15 years ago

this never made it into svn

comment:4 by hamish, 15 years ago

what I have learned:

The xfce4 menu position is not controlled by the /usr/share/menu/<package> & /etc/menu/<custom> files + update-menus system used by many debian WMs.

Rather they are built from the desktop icon files in /usr/share/applications/.

you have to edit the Categories= line in the .desktop files:

Categories=Geospatial;Servers;deegree;

Also I notice a button in the xfwm config GUI (which is unchecked on the 2.0 disc) which tells it *not* to flatten everything to the top level of the hierarchy. We may have to find the text file config for that and alter it.

In addition, as per jldominguez's bin/install_beta_and_submenu.sh you need to add a xfce-osgeo.directory desktop entry file to /usr/share/desktop-directories/, and add an entry for that in /etc/xdg/xubuntu/menus/xfce-applications.menu

I have read that you can then put your *.desktop files in ~/.local/share/, but I haven't gotten that to work yet.

Hamish

in reply to:  4 ; comment:5 by hamish, 15 years ago

Replying to hamish:

I have read that you can then put your *.desktop files in ~/.local/share/, but I haven't gotten that to work yet.

  • ah, the *.desktop files need to be in ~/.local/share/applications/.

(even if the Category= is something other than "Applications")

  • need to make a ~/.config/xfce4/panel/xfce4-menu-9999.rc clone of xfce4-menu-1.rc. (if ~/.config doesn't exist at time of making the user account we'll have to go further upstream to the templates)
  • in ~/.config/xfce4/panel/panels.xml need to add an entry for this new pulldown menu (again clone from -1.rc, & put it right after that)
  • in -360.rc point it to /usr/local/share/gisvm/xfce-osgeo.menu, which is a cropped down clone of /etc/xdg/xubuntu/menus/xfce-applications.menu; but only containing entries for Desktop, Servers, GeoTools, etc...)

... some work to do yet, but it will happen.

Hamish

in reply to:  5 comment:6 by hamish, 15 years ago

Replying to hamish:

  • need to make a ~/.config/xfce4/panel/xfce4-menu-9999.rc clone

of xfce4-menu-1.rc. (if ~/.config doesn't exist at time of making the user account we'll have to go further upstream to the templates)

ok, we need to edit the skeleton files in /etc/xdg/xubuntu/xfce4/panel/ to add terminal, cpu monitors, menus etc which will survive the user creation step.

comment:7 by hamish, 15 years ago

hopefully done in r3265. (cross you fingers and pray to your favorite deity)

comment:8 by hamish, 15 years ago

Resolution: fixed
Status: newclosed

closing ticket.

todo: bring beta menu into line with everything else & abandon it editing the Applications menu.

todo2: move the geoserver entries into their own submenu 1 level deeeper.

Hamish

Note: See TracTickets for help on using tickets.