[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OpenOffice conflicting with GNOME Session Manager (only version 2?)



On Fri, Jun 14, 2002 at 03:58:21PM +0100, Gary Coady wrote:
> --- openoffice	Thu May 30 10:57:05 2002
> +++ openoffice.new	Fri Jun 14 15:19:24 2002
> @@ -24,7 +24,7 @@
>  SMPID=`echo $SESSION_MANAGER | sed --quiet "s,local.*/,,p"`
>  
>  if [ -n "$SMPID" ]; then
> -  if ps -p$SMPID -ocmd --no-heading | grep -q "^[^ ]*gnome-session"; then
> +  if ls -l /proc/$SMPID/exe | grep -q " \-> [^ ]*gnome-session"; then
>      echo "Gnome session manager detected - session management disabled"
>      unset SESSION_MANAGER
>    fi

(see my post from June 14 2002 to the list, for why I suggested the above
change to /usr/bin/openoffice.
When I mentioned it earlier that day on IRC, the dependence on /proc being
mounted was mentioned as a possible problem. A solution I just thought of
- instead of
if ls -l /proc/$SMPID/exe | grep -q " \-> [^ ]*gnome-session; then

do something more like

if readlink -f `ps -p$SMPID -ocmd --no-heading` | grep -q "^[^ ]*gnome-session"; then

Removes the explicit dependence on /proc, but requires a package dependency
on the package debianutils. Again, as far as I can see, this makes the
session manager detection work properly on systems which use
/etc/alternatives to set the session manager. I doubt it's actually
specific to GNOME2 at all...

Gary.


-- 
To UNSUBSCRIBE, email to debian-openoffice-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: