Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How to start compiz after gnome started....
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
xxxabg
n00b
n00b


Joined: 29 Apr 2007
Posts: 46

PostPosted: Mon May 19, 2008 3:50 pm    Post subject: How to start compiz after gnome started.... Reply with quote

Do I need to use "gnome-session-properties" to add compiz start script and AWN?

Thanks,
Back to top
View user's profile Send private message
mortagon
n00b
n00b


Joined: 24 Sep 2007
Posts: 47
Location: Bulgaria

PostPosted: Mon May 19, 2008 5:23 pm    Post subject: Reply with quote

You can add it in your Sessions' Startup programs, write a script to autostart it when you login or use fusion-icon, which will do it for you. I personally use fusion-icon, which is in the desktop-effects overlay.
Back to top
View user's profile Send private message
xxxabg
n00b
n00b


Joined: 29 Apr 2007
Posts: 46

PostPosted: Tue May 20, 2008 3:00 am    Post subject: Reply with quote

Thanks, how to config fusion-icon? do I need to make fusion-icon autostart by "gnome-session-properties"?
Back to top
View user's profile Send private message
SeaTiger
l33t
l33t


Joined: 22 Nov 2007
Posts: 603
Location: Toronto, Ontario, Canada

PostPosted: Tue May 20, 2008 5:06 am    Post subject: Reply with quote

Use the following for your /usr/bin/gnome-wm. It is actually a 3-line modification of the original file.
Code:
#!/bin/sh

# The user can specify his prefered WM by setting the WINDOW_MANAGER
# environment variable.
#
# If this is not set, we search a list of known windowmanagers and use
# the first one that is found in the users's PATH
#

# sm-client-id value
SMID=
# default-wm value
DEFWM=

#read in the arguments
GET=
for n in "$@" ; do
  case "$GET" in
    smid)
      SMID=$n
      GET=
      ;;
    defwm)
      DEFWM=$n
      GET=
      ;;
    *)
      case "$n" in
        --sm-client-id)
          GET=smid
          ;;
        --default-wm)
          GET=defwm
          ;;
      esac
      ;;
  esac
done

# WINDOW_MANAGER overrides all
WINDOW_MANAGER="compiz"

if [ -z "$WINDOW_MANAGER" ] ; then
  # Create a list of window manager we can handle, trying to only use the
  # compositing ones when it makes sense

  xdpyinfo 2> /dev/null | grep -q "^ *Composite$" 2> /dev/null
  IS_X_COMPOSITED=$?

  KNOWN_WM="sawfish sawmill enlightenment icewm wmaker fvwm2 qvwm fvwm twm kwm"
  if [ $IS_X_COMPOSITED -eq 0 ] ; then
    KNOWN_WM="compiz beryl $KNOWN_WM"
  fi
  # metacity is still the default wm in GNOME
  KNOWN_WM="metacity $KNOWN_WM"

  OLDIFS=$IFS
  if [ -z "$DEFWM" -o "x$DEFWM" = "xgnome-wm" ]; then
    for wm in $KNOWN_WM ; do
      IFS=":"
      for dir in $PATH ; do
   if [ -x "$dir/$wm" ] ; then
     WINDOW_MANAGER="$dir/$wm"
         break 2
   fi
      done
      IFS=$OLDIFS
    done
  else
    WINDOW_MANAGER=$DEFWM
  fi
  IFS=$OLDIFS
fi

# If no window manager can be found, we default to xterm

if [ -z "$WINDOW_MANAGER" ] ; then
  echo "WARNING: No window manager can be found."
  WINDOW_MANAGER=xterm
fi

# Now create options OPT1, OPT2 and OPT3 based on the windowmanager used
OPT1=
OPT2=
OPT3=
OPT4=
if [ ! -z "$SMID" ] ; then
  case `basename $WINDOW_MANAGER` in
    sawfish|sawmill|metacity)
      OPT1=--sm-client-id=$SMID
      ;;
    openbox|enlightenment|e16)
      OPT1=--sm-client-id
      OPT2=$SMID
      ;;
    twm)
      OPT1=-clientId
      OPT2=$SMID
      ;;
    lwm)
      OPT1=-s
      OPT2=$SMID
      ;;
    fvwm)
      OPT1=-i
      OPT2=$SMID
      ;;
    compiz)
      OPT1=--sm-client-id
      OPT2=$SMID
      ;;
    beryl)
      OPT1=--sm-client-id
      OPT2=$SMID
      ;;
    #FIXME: add all other windowmanagers here with their proper options
  esac
fi

case `basename $WINDOW_MANAGER` in
  compiz)
#    export LIBGL_ALWAYS_INDIRECT=1
#    gtk-window-decorator &
#    OPT3=glib
#    OPT4=gconf
   OPT3=ccp
    ;;
  beryl)
    emerald &
    ;;
esac

exec $WINDOW_MANAGER $OPT1 $OPT2 $OPT3 $OPT4

echo "ERROR: No window manager could run!"
Back to top
View user's profile Send private message
mortagon
n00b
n00b


Joined: 24 Sep 2007
Posts: 47
Location: Bulgaria

PostPosted: Tue May 20, 2008 6:29 pm    Post subject: Reply with quote

xxxabg wrote:
Thanks, how to config fusion-icon? do I need to make fusion-icon autostart by "gnome-session-properties"?


If I remember correctly it will add itself to your gnome session automatically once you start it.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum