Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
Thread Tools Display Modes
Old November 10th, 2005   #1
theine
5 Cups of Ubuntu
 
Join Date: Aug 2005
Beans: 16
Thumbs up

Since metacity became the default window manager for gnome, I've always been bugged by the absence of some very useful features such as edge resistance towards other windows and vertical/horizontal maximization. The latter is actually somewhat implemented, but in a poor way, and appearently, the developers of metacity don't seem to see a desperate need for properly implementing the above features anytime soon.

Fortunately, there are alternatives to using metacity as window manager under Gnome. For a while I was using Openbox, which is great but I always had minor issues with it (e.g. the Gnome panels stayed visable when watching a video in fullscreen mode with VLC), so I kept looking and found xfwm4, which is the default window manager under XFCE. xfwm4 works absolutely fabulous for me, and it fits very nicely into Gnome since it also uses GTK. For anybody interested in trying it out, here's how to set it up under Gnome...

First, make sure the universe repository is enabled and then do
Code:
sudo apt-get install xfwm4 xfce4-mcs-manager
Next, edit /usr/bin/gnome-wm and add xfwm4 to the entry line that already contains openbox, i.e.
Code:
sudo sed -i "s/openbox)/openbox|xfwm4)/" /usr/bin/gnome-wm
Last thing to do is to set the WINDOW_MANAGER environment variable so that Gnome is aware of it. This can be accomplished by
Code:
echo export WINDOW_MANAGER=/usr/bin/xfwm4 >> ~/.gnomerc
Done. Next time you log into Gnome, xfwm4 should manage your windows.

Setting the WINDOW_MANAGER environment variable won't have any effect if you saved your Gnome session at some point in the past. In that case, /usr/bin/gnome-wm isn't even invoked anymore when you log into Gnome. The solution is to either
Code:
rm ~/.gnome2/session
and start over with the default Gnome session next time you log in, or save a new session after doing the
Code:
killall metacity && xfwm4
routine. Thanks to the posters in this thread for pointing this out.

To adjust the settings for xfwm4, execute
Code:
xfce-setting-show
If you would like to do this with /usr/bin/gnome-window-properties (System -> Preferences -> Windows) you need to write a little .desktop file:
Code:
theine@cosmo:~$ cat /usr/share/gnome/wm-properties/xfwm4.desktop
[Desktop Entry]
Name=Xfwm4
Exec=xfwm4

# name we put on the WM spec check window
X-GNOME-WMName=Xfwm4

# our config tool
ConfigExec=xfce-setting-show
theine@cosmo:~$
Could be that you need to execute
Code:
sudo /etc/init.d/readahead start
before Gnome will be aware of xfwm4's configuration tool. The above .desktop file is identical to the one from the openbox package apart from the substitution openbox -> xfwm4.

Last edited by theine; March 14th, 2006 at 05:13 PM..
theine is offline   Reply With Quote
Old November 11th, 2005   #2
LaSSarD
A Carafe of Ubuntu
 
Join Date: Jul 2005
Location: Brasil
Beans: 67
Ubuntu 7.04 Feisty Fawn
Re: Replace metacity by xfwm4

thanks, i've been looking for this for ages
__________________
Come on, search is easier than posting!
UbuntuForums Search | Ubuntu Wiki | UbuntuGuide | GoogleLinux
LaSSarD is offline   Reply With Quote
Old November 11th, 2005   #3
sailor420
A Carafe of Ubuntu
 
sailor420's Avatar
 
Join Date: Apr 2005
Location: Chapel Hill, NC
Beans: 93
Ubuntu 9.04 Jaunty Jackalope
Re: Replace metacity by xfwm4

Is there an easy way to uninstall this, ie revert back to metacity should things not work?
sailor420 is offline   Reply With Quote
Old November 11th, 2005   #4
LaSSarD
A Carafe of Ubuntu
 
Join Date: Jul 2005
Location: Brasil
Beans: 67
Ubuntu 7.04 Feisty Fawn
Re: Replace metacity by xfwm4

hey theine, now i had the opportunity to test it and it doesn't work at all
metacity is still running, no xfwm4
__________________
Come on, search is easier than posting!
UbuntuForums Search | Ubuntu Wiki | UbuntuGuide | GoogleLinux
LaSSarD is offline   Reply With Quote
Old November 11th, 2005   #5
majikstreet
Dipped in Ubuntu
 
majikstreet's Avatar
 
Join Date: Jul 2005
Location: olney, maryland
Beans: 532
Ubuntu 6.06 Dapper
Re: Replace metacity by xfwm4

I'd like to see a screenshot, if possible.
__________________
majikstreet is offline   Reply With Quote
Old November 11th, 2005   #6
samwyse
Gee! These Aren't Roasted!
 
samwyse's Avatar
 
Join Date: Aug 2005
Location: Finland
Beans: 163
Kubuntu 8.04 Hardy Heron
Re: Replace metacity by xfwm4

Is there a way to start the Gnome Run Dialog using xfwm4? xfrun is slow to start.
__________________
AMD Sempron 2800 | 1 GB | GF4 Ti 4200
samwyse is offline   Reply With Quote
Old November 12th, 2005   #7
theine
5 Cups of Ubuntu
 
Join Date: Aug 2005
Beans: 16
Re: Replace metacity by xfwm4

Quote:
Originally Posted by majikstreet
I'd like to see a screenshot, if possible.
http://www.nordita.dk/~theine/images/Screenshot.png
theine is offline   Reply With Quote
Old November 12th, 2005   #8
theine
5 Cups of Ubuntu
 
Join Date: Aug 2005
Beans: 16
Re: Replace metacity by xfwm4

Quote:
Originally Posted by LaSSarD
hey theine, now i had the opportunity to test it and it doesn't work at all
metacity is still running, no xfwm4
Check /usr/bin/gnome-wm if the entry for xfwm4 looks OK. Also, try
Code:
echo $WINDOW_MANAGER
and see whether it says xfwm4. If not, check ~/.gnomerc
theine is offline   Reply With Quote
Old November 16th, 2005   #9
LaSSarD
A Carafe of Ubuntu
 
Join Date: Jul 2005
Location: Brasil
Beans: 67
Ubuntu 7.04 Feisty Fawn
Re: Replace metacity by xfwm4

Quote:
Originally Posted by theine
Check /usr/bin/gnome-wm if the entry for xfwm4 looks OK. Also, try
Code:
echo $WINDOW_MANAGER
and see whether it says xfwm4. If not, check ~/.gnomerc
the entry for xfwm4 looks ok on /usr/bin/gnome-wm, see:
Code:
if [ ! -z "$SMID" ] ; then
  case `basename $WINDOW_MANAGER` in
    sawfish|sawmill|metacity)
      OPT1=--sm-client-id=$SMID
      ;;
    openbox|xfwm4)
      OPT1=--sm-client-id
      OPT2=$SMID
      ;;
but now, that's strange:
Code:
:~$ echo $WINDOW_MANAGER
/usr/bin/xfwm4
it looks perfect, but metacity is already running (perfectly, no strange errors)
__________________
Come on, search is easier than posting!
UbuntuForums Search | Ubuntu Wiki | UbuntuGuide | GoogleLinux
LaSSarD is offline   Reply With Quote
Old November 12th, 2005   #10
theine
5 Cups of Ubuntu
 
Join Date: Aug 2005
Beans: 16
Re: Replace metacity by xfwm4

Quote:
Originally Posted by sailor420
Is there an easy way to uninstall this, ie revert back to metacity should things not work?
Yes, just export WINDOW_MANAGER=/usr/bin/metacity in ~/.gnomerc or delete that line all together.

Last edited by theine; November 12th, 2005 at 04:44 PM..
theine is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 03:30 AM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry