From 3430944c9f204326996c8fb4b41381a59e3464b0 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Thu, 12 May 2011 18:53:28 +0900 Subject: [PATCH] fix gnome-session fail-whale dialog and setup gnomeConfig if available - xmonad-start no longer execs xmonad not to confuse gnome-session - xmonad-start now tries to setup a new xmonad.hs for GNOME desktop if running a xmonad-gnome session with xmonad-contrib installed - improvements to README.fedora --- README.fedora | 51 +++++++++++++++++++++++++++++++----------- xmonad-session.desktop | 1 - xmonad-start | 22 +++++++++++++++--- xmonad.desktop | 2 +- xmonad.spec | 19 ++++++++-------- 5 files changed, 68 insertions(+), 27 deletions(-) diff --git a/README.fedora b/README.fedora index 2fb57dc..9c4e9c8 100644 --- a/README.fedora +++ b/README.fedora @@ -1,9 +1,42 @@ -To start xmonad from gdm, just select "xmonad" or "xmonad GNOME" -from the GDM session menu. += From GDM = +xmonad can be started from GDM, by selecting "xmonad" or "xmonad GNOME" +from the session menu. + += xmonad-start = +By default at startup Fedora's xmonad-start displays +"man xmonad" in an xterm to help newcomers and to encourage +configuring xmonad by creating "~/.xmonad/xmonad.hs". + +To stop this behaviour, just create "~/.xmonad/". + +== Simple Desktop configuration == +The default xmonad configuration does not work well with desktop environments. + +The following basic generic configuration requires ghc-xmonad-contrib-devel +to be installed, and should get it working: + +$ mkdir ~/.xmonad +$ cat > ~/.xmonad/xmonad.hs << EOF +import XMonad +import XMonad.Config.Desktop + +main = xmonad desktopConfig +EOF +$ + +You can replace the generic "[Dd]esktop" by: +- "[Gg]nome" for better GNOME support +- "[Kk]de[4]" for KDE support +- "[Xx]fce" for XFCE support. + +See: +- http://hackage.haskell.org/packages/archive/xmonad-contrib/latest/doc/html/XMonad-Config-Desktop.html +- http://haskell.org/haskellwiki/Xmonad/Basic_Desktop_Environment_Integration +for more info on how to setup desktop support. = How to configure = For documentation and examples see: -- xmonad manpage +- xmonad man-page - /usr/share/doc/xmonad-$version/xmonad.hs (full default basic configuration) - /usr/share/doc/ghc/html/libraries/xmonad-contrib-$version/index.html and online: @@ -15,14 +48,6 @@ and online: To make use of extensions and Desktop Environment support, you need to install ghc-xmonad-contrib-devel. -= EWMH Desktop support = -xmonad does not work well with desktop environment panels out of the box. -See: -- http://hackage.haskell.org/packages/archive/xmonad-contrib/latest/doc/html/XMonad-Config-Desktop.html -- http://haskell.org/haskellwiki/Xmonad/Basic_Desktop_Environment_Integration -for how to setup desktop support. - = Bluetile = -New users may find the Bluetile window manager built -on top of xmonad-contrib a gentler introduction to xmonad -and tiling. +New users may find the Bluetile window manager built on top of +xmonad-contrib a gentler introduction to xmonad and tiling. diff --git a/xmonad-session.desktop b/xmonad-session.desktop index b949889..43d6b07 100644 --- a/xmonad-session.desktop +++ b/xmonad-session.desktop @@ -3,7 +3,6 @@ Name=xmonad Comment=Tiling window manager Exec=xmonad-start Terminal=false -TryExec=xmonad-start [Window Manager] SessionManaged=true diff --git a/xmonad-start b/xmonad-start index 0f6a4e9..a349b24 100644 --- a/xmonad-start +++ b/xmonad-start @@ -1,8 +1,24 @@ #!/bin/sh -# display the manpage if there is no user configuration if [ ! -d ~/.xmonad ]; then - xterm -e man xmonad & + # display the manpage if there is no user configuration + xterm -e man xmonad & + xterm -e less /usr/share/doc/xmonad*/README.fedora & + + # try to configure for a gnome session + if [ "$DESKTOP_SESSION" = "xmonad-gnome" ]; then + if ghc-pkg latest xmonad-contrib >/dev/null; then + mkdir ~/.xmonad + cat > ~/.xmonad/xmonad.hs <= 0.7.3 +BuildRequires: ghc-prof +BuildRequires: ghc-rpm-macros BuildRequires: hscolour BuildRequires: desktop-file-utils -%{?ghc_pkg_deps:BuildRequires: %{ghc_pkg_deps}, %(echo %{ghc_pkg_deps} | sed -e "s/\(ghc-[^, ]\+\)-devel/\1-doc,\1-prof/g")} +BuildRequires: ghc-mtl-prof, ghc-X11-prof # required until there is a command to open a system-default xterminal Requires: xterm # for xmessage @@ -91,6 +86,12 @@ rm %{buildroot}%{_datadir}/%{name}-%{version}/man/xmonad.hs %changelog +* Wed May 11 2011 Jens Petersen - 0.9.2-7 +- xmonad-start no longer execs xmonad not to confuse gnome-session +- xmonad-start now tries to setup a new xmonad.hs for GNOME desktop + if running a xmonad-gnome session with xmonad-contrib installed +- improvements to README.fedora + * Fri Apr 22 2011 Jens Petersen - 0.9.2-6 - drop explicit requires on ghc-xmonad-devel for lighter installs - update readme to mention gsettings for gnome3