[csw-users] [Fwd: Re: Integrating Blastwave into S10/u5 Java Desktop]

Neal A. Lucier nlucier at math.purdue.edu
Fri May 30 03:55:17 CEST 2008


I posted this on comp.unix.solaris.  It might be of some interest here, and will 
at least be in the list's archives now.

Neal

-------- Original Message --------
Subject: Re: Integrating Blastwave into S10/u5 Java Desktop
Date: Wed, 28 May 2008 15:03:25 -0400
From: Neal A. Lucier <nlucier at math.purdue.edu>
Organization: Purdue University
Newsgroups: comp.unix.solaris,alt.solaris.x86
References: <6cfd37d2-3199-475e-97e2-7b8878307998 at e53g2000hsa.googlegroups.com>

doofus wrote:
> Does anyone know of a user guide that describes how to replace the
> default applications on the Gnome menus in Solaris 10 Java Desktop (eg
> gimp, firefox etc) with the applications in /opt/csw/bin? I've tried
> and tried, unsuccessfully.
> 

There are a couple of ways to do this and I'll just explain how the whole system
works and then you can pick how you want to do it.

1. dtlogin integration
    When you launch "Java Desktop System, Release 3" from dtlogin, it does some
stuff and ultimately runs `/usr/bin/gnome-session` which is the parent process
for all things GHOME.  When gnome-session goes to launch additional things like
gnome-panel it will look for them in you path, thus if you put "/opt/csw/bin" in
your path before /usr/bin and then try to run JDS you will have problems.

    There is the blastwave package gnome_dtlogin which adds a GNOME blastwave
session option to the dtlogin window.  This session ultimately launches
/opt/csw/bin/gnome-session as the parent process for GNOME and again searches
the user's path first instead of using exact path values for child processes.

If you use the Blastwave dtlogin session and you put /opt/csw/bin in your path
before /usr/bin, then everything will be blastwave's gnome including the menus.

2. How gnome menus work
    There is an xml file that defines what folders will be available under the
"Applications" menu in GNOME.  For JDS that is at:

/etc/gnome-vfs-2.0/vfolders/applicationas-all-users.vfolder-info

For Blastwave (which is a much newer gnome and implements the freedesktop.org
menuing standard) that file is at:

/opt/csw/etc/xdg/menus/applications.menu

These files define what the sub-menus are, and more importantly which
directories to look in to find the menu entries with which to populate those
submenus.

In Solaris 10 the directory with all the ".desktop" files is at:
/usr/share/applications/

Blastwave uses the directory:
/opt/csw/share/applications/

You can edit the contents of the ".desktop" files as root to change which
application the various default entries run.  This is not a great solution as
blastwave updates and solaris patches will clobber these changes.  Which set of
default menus you see depends on which gnome-session and friends you run.

Now you can merge in the /opt/csw/share/applications directory in the file
applications-all-users.vfolder-info, and if that merge is before the merge for
/usr/share/applications then the blastwave items that have the same name as the
Solaris items will load first and override the solaris options, thus the
intersection will be blastwave.  You can addtionally merge blastwave 2nd and
then the intersection (things like firefox, thunderbird, and the base gnome
tools) will be Sun's.  Keep in mind that it is the intersection of the file
names; e.g., "firefox.desktop", and the name of the entry; e.g., "Firefox Web
Browser".

You can optionally edit the blastwave applications.menu and merge in the stock
Solaris direrctories after the blastwave ones.  (The fun thing to do in a
network environment is create a NFS share location that has all your custom menu
entries for you location and mount that on all your machines and change all the
configs to merge that directory.  Then update one location and all your users'
menus change.

3. Making your own menus
    Each user gets to put their own menu items in the gnome menu as well.  So
let's say you wanted to add a "CSW Firefox" menu item just for yourself.

In the directory "~/.desktop" you would create a "csw-firefox.desktop" file that
had the following contents:

[Desktop Entry]
Name=CSW Firefox Web Browser
Comment=CSW Firefox Web Browser
Exec=/opt/csw/bin/firefox
Terminal=0
Type=Application
Icon=/opt/csw/pixmaps/firefox.png
Categories=Application;Network


Hopefully you should be able to do whatever you need to your menus now and run
all your blastwave applications with ease.

Neal



More information about the users mailing list