Gekkio / gnome-session-xmonad

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

Ubuntu 16.04 not starting by default #6

Closed cmoscardi closed 5 years ago

cmoscardi commented 7 years ago

Hi, I suspect I've somehow messed up my config, but when I log in, I'm first taken to a blank xmonad session.

I copied your xmonad.hs - I have to run mod + d , which turns on Nautilus, to get to a gnome session with the usual menu bars.

Then, when I log out, I'm first taken to the same blank screen again. So somehow the session isn't starting until I turn on nautilus, and then the old session is still on "behind" the one that nautilus somehow managed to start?

Sorry, this is probably a novice question, but I've never really messed with my WM / DM and I'm not entirely sure how to debug this.

cmoscardi commented 7 years ago

Possibly related: mod + space is really finicky. It only works immediately after I quickly press mod + j (or another command). I even managed to explicate that key sequence in the xmonad.hs file

However, if I do ctrl + alt + f2 --> ctrl + alt + f7 (switch to some other tty via X I guess? Like I said, 0 experience here), where my regular desktop is on f7, then mod + space starts working normally

(^ I found the above command by googling "how to debug gnome")

Gekkio commented 7 years ago

Hi! That sounds a bit weird...could you please double-check that you are starting a "GNOME+XMonad" session and not one of the other ones? (e.g. "GNOME Flashback (XMonad)")

cmoscardi commented 7 years ago

Can confirm I'm clicking into "GNOME + XMonad."

Happy to paste any log output or similar (if you tell me where to look)

Gekkio commented 7 years ago

Hmm, I'm unfortunately not that experienced with debugging these kind of issues. But let's start by looking at some logs and other things. To me it sounds like your config doesn't have the necessary gnome stuff or some of that stuff fails for some season.

Could you...

  1. Post the content of $HOME/.xmonad/xmonad.hs?
  2. Post the content of $HOME/.xmonad/xmonad.errors if there is any?
  3. Post the content of $HOME/.xsession-errors if there is any?
  4. Post the output of ps aux | grep xmonad and ps aux | grep gnome-session both before and after you start nautilus using the way you described?
  5. Post the output of dpkg -l gnome-session-xmonad?
cmoscardi commented 7 years ago

Gist here

While getting the output of ps before nautilus, I noticed that I'm actually auto-logged-out if I don't run nautilus, a la https://github.com/Gekkio/gnome-session-xmonad/issues/3 . Do I just need to somehow include gnomeConfig (or maybe unityManageHook) in the startupHook call?

Gekkio commented 7 years ago

Ah, that explains everything :smile:

Yes, you're overriding the startupHook so a very important function from gnomeConfig is never executed. You can use >> to chain them. Here are the important bits from my config:

, startupHook = startupHook gnomeConfig >> myStartupHook
myStartupHook = setWMName "LG3D"
Gekkio commented 7 years ago

To clarify a bit more, gnomeConfig includes a startup hook that basically sends a "Hello, I've started successfully" message to gnome-session. Since it's never executed, gnome-session apparently keeps waiting and eventually times out unless you start nautilus manually. I don't quite understand why starting nautilus fixes it, but in any case the root cause is the missing startup hook.

cmoscardi commented 7 years ago

Aha! That's fixed everything, yep :)

EDIT: almost everything. I still have problems with mod + space by default (even with the binding explicitly in the config as in the gist)... and switching to another TTY fixes the bug. I can probably investigate from here...

Thanks so much for being super helpful! That makes a ton of sense and is helpful for understanding a bit better what's going on.

I grabbed the config from the link at https://ooz.github.io/blog/how-to-configure-xmonad-for-ubuntu-16.04/ (which points to https://github.com/ooz/olli/blob/master/.xmonad/xmonad.hs ), so FYI in case you want to fix that.

Gekkio commented 7 years ago

My minimal config is here if it's of any use. My general recommendation is to try to extend instead overriding, and try to be minimal with things. The config you linked has some issues, so I'd take it with a grain of salt. The best thing would be if you understood the why and how of everything in your own config.

cmoscardi commented 7 years ago

Awesome - yknow, I don't know why I thought you had written that blog post - you're clearly a different user, lol. I'll also alert them to the bug in their config.

And, I'll let you know if I figure out what's happening with this tty-switch bug I'm experiencing... (I tried wholesale pasting your config in and experienced the same issue, so I'm suspecting it's at the desktop manager level).

ntc2 commented 5 years ago

This doesn't sound like a bug in gnome-session-xmonad and so can probably be closed.