Skip to content

Instantly share code, notes, and snippets.

@bewest
Last active August 29, 2015 14:14
Show Gist options
  • Save bewest/46b849da04684f0ce401 to your computer and use it in GitHub Desktop.
Save bewest/46b849da04684f0ce401 to your computer and use it in GitHub Desktop.

ubuntu updates breaking xmonad

The switch to unity-control-center and baking everything into unity seems to make it impossible to mix and match things any more.

It may be worth exploring cinnamon or some other desktop environment as the background manager.

dbus-send

Syntax change:

gnomeRegister :: MonadIO m => m ()
gnomeRegister = io $ do
    x <- lookup "DESKTOP_AUTOSTART_ID" `fmap` getEnvironment
    whenJust x $ \sessionId -> safeSpawn "dbus-send"
            ["--session"
            ,"--print-reply=string"
            ,"--dest=org.gnome.SessionManager"
            ,"/org/gnome/SessionManager"
            ,"org.gnome.SessionManager.RegisterClient"
            ,"string:xmonad"
            ,"string:"++sessionId]

http://xmonad.org/xmonad-docs/xmonad-contrib/src/XMonad-Config-Gnome.html#gnomeConfig

  1. The --print-reply=string syntax causes an error.
  2. The name of the application that needs to be "registered" is not xmonad, but xmonad.desktop.

I wound up creating a ~/.xmonad/hooks file with the following command in it:

dbus-send --session --print-reply --dest=org.gnome.SessionManager /org/gnome/SessionManager org.gnome.SessionManager.RegisterClient string:xmonad.desktop string:$DESKTOP_AUTO_START_ID

And using:

  , startupHook = execScriptHook "startup"

To get java apps like Android Studio to work, I had to do this instead:

  , startupHook = execScriptHook "startup" >> setWMName "LG3D"

Finally, this blog post was crucial in getting the pointer to show up. http://blog.ezyang.com/2014/12/ubuntu-utopic-upgrade-xmonad/comment-page-1/

My mouse cursor was also invisible, and I had to run this to fix it:

gsettings set org.gnome.settings-daemon.plugins.cursor active false

You can replace set with get and remove the last parameter to query the current values.

*-control-center

To fix the control-center, mind http://askubuntu.com/a/552710/314153, make sure that DesktopName=Unity is in /usr/share/gnome-session/sessions/xmonad.session.

[GNOME Session]
Name=Xmonad/GNOME
RequiredComponents=gnome-settings-daemon;gnome-panel;xmonad
DesktopName=Unity
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment