[xmonad] Fedora 10, Gnome and Xmonad
Yaakov Nemoy
loupgaroublond at gmail.com
Wed Dec 17 01:09:20 EST 2008
2008/12/5 Jan Müller <mueller at imt.uni-luebeck.de>:
> (Warning: As pointed out below my knowledge of Haskell, Xmonad and Linux is very limited, so please bear with me)
>
>
> Short version:
> ------
> Getting xmonad up and running under Fedora 10 in combination with Gnome is not straightforward. After several hours I found a solution which is posted below. It would be nice if someone would update the Wiki page accordingly.
Jan,
Are you continuing to have problems? I'm working on Xmonad for Fedora
10 as well, and i'm getting some very strange behavior due to the new
version of Gnome.
<snip>
> First I was looking for precompiled packages for 64bit Fedora 10 but in the end I had to compile everything by myself. After an hour or so I got a file called xmonad in /usr/local/bin/. In order to test it I did a
>
> killall metacity; xmonad &
>
> with the old xmonad.hs from my previous Ubuntu installation. Besides some cryptic warnings (in the console window where I startedxmonad) everything worked fine. (I could not find any occurence of these warnings anywhere, so if someone is interested I can have a second look and post them on the list)
>
> After this the real trouble begun:
>
> Essentially all available tips on how to replace metacity with xmonad (or any other window manager) do _not_ work under Fedora 10!
>
> Some things I tried:
> - .gnomerc
Deprecated in the new Gnome.
> - .xinit / .xsession
Fedora will ignore these unless you have 'xorg-x11-xinit-session'
installed. This will give you an option at the Login Screen (gdm) to
use a user defined session, which can be anything you put in
~/.xsession. The problem there, is that Gnome still does its own
thing to start a window manager.
> - the stuff described under "2.2 gnome-session" on [1]
This is deprecated, and we need a working solution before we can fix this.
> While reading [2] I got the impression that this problem is not restricted to xmonad.
I'm getting weirder behavior from this, more on that below.
> After searching some more I stumbled onto the first three paragraphs on [3]. Unfortunately the tips given there are not complete, but after finding [4] I was able to combine both approaches and make it work (at least for me) :)
>
> First step:
> ------
> create a file called Xmonad.desktop in /usr/share/applications which contains the following:
>
> [Desktop Entry]
> Type=Application
> Encoding=UTF-8
> Name=Xmonad
> # change this path according to your xmonad binary
> Exec=/usr/local/bin/xmonad
> NoDisplay=true
> X-GNOME-WMName=Xmonad
> X-GNOME-Bugzilla-Bugzilla=XMonad
> X-GNOME-Bugzilla-Product=xmonad
> X-GNOME-Bugzilla-Component=general
> X-GNOME-Autostart-Phase=WindowManager
> X-GNOME-Provides=windowmanager
> X-GNOME-Autostart-Notify=true
>
> I copied Metacity.desktop and replaced some lines. I'm sure some of these lines can be removed but since this works for me without any problems I'm not going to put more time in this.
>
> Second step:
> ------
> Use gconf2 or gconf-edit to set /desktop/gnome/applications/window_manager to "xmonad"
>
> It seems that this key is deprecated (see [3]) but (at least for me) it's the only way to get it work.
The correct key is:
/desktop/gnome/session/required_components/windowmanager
as far as i can tell.
I'm having a stranger problem though, where xmonad will suddenly
'disappear'. I had thought it segfaulted at first, until i did a bit
of tinkering. At one point, i loaded Gnome with an older version of
the xmonad-x86_64-linux binary in my ~/.xmonad/ directory. Then i
stuck in a fresh new config, recompiled it, and loaded it up. It
lasted for about four minutes, until it disappeared. Instead of being
stuck with no window manager, i was actually stuck with my older
binary, which was clearly fighting it out with the newer one. I tried
loading in another one, to see what would happen, and i got:
yankee at koan ~/.xmonad $ ./xmonad-x86_64-linux
X Error of failed request: BadAccess (attempt to access private
resource denied)
Major opcode of failed request: 2 (X_ChangeWindowAttributes)
Serial number of failed request: 7
ps showed that there were several processes running. I killed them
all, ran a clean one, and i've been problem free.
Observations and Theories:
1) Xmonad's being declared in two places, in /usr/share/applications
and in gconf.
2) Xmonad's being loaded more than once.
3) Metacity has the ability to --replace itself and/or shutdown when
more than one window manager is around.
4) Xmonad has the ability to do weird things when more than one
instance is around.
5) I can't actively coerce more than one Xmonad into existence simultaneously
6) When i was using the older binary, launched from Gnome as a window
manager, i couldn't use key-commands that would 'spawn nautilus'. Nor
could i get it to spawn from gmrun that was equally spawned from
xmonad. The only way i could get it to load is either through the
gnome-panel menus or from opening a terminal window and calling it
there.
Conclusion:
Gnome is doing something pretty weird in loading a WM.
Any comments?
More information about the xmonad
mailing list