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.
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
- The
--print-reply=string
syntax causes an error. - The name of the application that needs to be "registered" is not
xmonad
, butxmonad.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.
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