Gekkio / gnome-session-xmonad

Ubuntu package for Gnome + XMonad session files
GNU General Public License v2.0
98 stars 10 forks source link

strange behavior on wily (no gnome until xmonad is closed) #1

Closed simon-weber closed 8 years ago

simon-weber commented 8 years ago

Hey there, I'm seeing some odd behavior: when I log in, I see the gnome-configured background, but no panel. xmonad is running and I can launch terminals as expected.

When I close xmonad with alt+mod+q, the gnome desktop appears, but xmonad does not seem to be the window manager (I can no longer launch terminals).

Any idea what's going on? I have an xmonad+tint2 session that works as expected. Here's my config (I've just changed the terminal locally): https://github.com/simon-weber/dotfiles/blob/crunchbang-msi/home/.xmonad/xmonad.hs.

My xsession-errors says:

openConnection: connect: No such file or directory
cannot connect to brltty at :0

After about a minute, I also get kicked out back to the login screen.

I tried creating a new user and logging into gnome-xmonad with them, but got the same result. lightdm logs don't have anything super interesting:

[+1196.64s] DEBUG: Session pid=8736: User foo authorized
[+1196.66s] DEBUG: Session pid=8736: Greeter requests session gnome-xmonad
[+1196.66s] DEBUG: Writing /home/foo/.dmrc
[+1196.66s] DEBUG: Seat seat0: Stopping greeter; display server will be re-used for user session
[+1196.66s] DEBUG: Session pid=8736: Sending SIGTERM
[+1196.67s] DEBUG: Session pid=8736: Exited with return value 0
[+1196.67s] DEBUG: Seat seat0: Session stopped
[+1196.67s] DEBUG: Seat seat0: Greeter stopped, running session
[+1196.67s] DEBUG: Registering session with bus path /org/freedesktop/DisplayManager/Session8
[+1196.67s] DEBUG: Session pid=8888: Running command /usr/sbin/lightdm-session gnome-session-xmonad
[+1196.67s] DEBUG: Creating shared data directory /var/lib/lightdm-data/foo
[+1196.67s] DEBUG: Session pid=8888: Logging to .xsession-errors
[+1196.72s] DEBUG: Activating VT 7
[+1196.72s] DEBUG: Activating login1 session c18
[+1196.72s] DEBUG: Seat seat0 changes active session to c18
[+1196.72s] DEBUG: Session c18 is already active
[+1246.76s] DEBUG: Session pid=8888: Exited with return value 0
[+1246.76s] DEBUG: Seat seat0: Session stopped
[+1246.76s] DEBUG: Seat seat0: Stopping display server, no sessions require it
[+1246.76s] DEBUG: Sending signal 15 to process 8732
[+1246.93s] DEBUG: Process 8732 exited with return value 0
[+1246.93s] DEBUG: DisplayServer x-0: X server stopped
[+1246.93s] DEBUG: Releasing VT 7
[+1246.93s] DEBUG: DisplayServer x-0: Removing X server authority /var/run/lightdm/root/:0
[+1246.93s] DEBUG: Seat seat0: Display server stopped
[+1246.93s] DEBUG: Seat seat0: Active display server stopped, starting greeter
Gekkio commented 8 years ago

Hi,

That sounds like it might be the classic gnome window manager registration issue. Basically, in order to properly work with gnome, xmonad must register itself with the gnome session manager.

There's two things that are required:

The relevant code in xmonad.hs

I see that you are using desktopConfig instead of gnomeConfig, so you are missing this. Either switch to gnomeConfig or check out and use the gnomeRegister function in Gnome.hs..

However, I don't know if gnomeRegister is enough, because I simply use gnomeConfig in my xmonad.hs. Note that ewmh is not needed because gnomeConfig uses desktopConfig, which already includes it.

A recent version of xmonad-contrib

The xmonad-contrib version you are using must include this change. My PPA has patched versions for older Ubuntu versions, but since you're using wily, you should be alright.

simon-weber commented 8 years ago

Perfect; thanks! I switched to gnomeConfig and seemingly didn't see a change, reinstalled your packages, then it worked. I'm not sure if the latter was actually necessary, or if I had just forgotten a recompile after switching to gnomeConfig, but everything seems to be working fine now.