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
This commit is contained in:
Jens Petersen 2011-05-12 18:53:28 +09:00
parent e6dc57c2d2
commit 3430944c9f
5 changed files with 68 additions and 27 deletions

View File

@ -1,9 +1,42 @@
To start xmonad from gdm, just select "xmonad" or "xmonad GNOME" = From GDM =
from the GDM session menu. 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 = = How to configure =
For documentation and examples see: For documentation and examples see:
- xmonad manpage - xmonad man-page
- /usr/share/doc/xmonad-$version/xmonad.hs (full default basic configuration) - /usr/share/doc/xmonad-$version/xmonad.hs (full default basic configuration)
- /usr/share/doc/ghc/html/libraries/xmonad-contrib-$version/index.html - /usr/share/doc/ghc/html/libraries/xmonad-contrib-$version/index.html
and online: and online:
@ -15,14 +48,6 @@ and online:
To make use of extensions and Desktop Environment support, To make use of extensions and Desktop Environment support,
you need to install ghc-xmonad-contrib-devel. 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 = = Bluetile =
New users may find the Bluetile window manager built New users may find the Bluetile window manager built on top of
on top of xmonad-contrib a gentler introduction to xmonad xmonad-contrib a gentler introduction to xmonad and tiling.
and tiling.

View File

@ -3,7 +3,6 @@ Name=xmonad
Comment=Tiling window manager Comment=Tiling window manager
Exec=xmonad-start Exec=xmonad-start
Terminal=false Terminal=false
TryExec=xmonad-start
[Window Manager] [Window Manager]
SessionManaged=true SessionManaged=true

View File

@ -1,8 +1,24 @@
#!/bin/sh #!/bin/sh
# display the manpage if there is no user configuration
if [ ! -d ~/.xmonad ]; then 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 <<EOF
import XMonad
import XMonad.Config.Gnome
main = xmonad gnomeConfig
EOF
else
echo "xmonad-start: install ghc-xmonad-contrib-devel for GNOME support"
fi
fi
fi fi
exec xmonad xmonad

View File

@ -1,7 +1,7 @@
[Desktop Entry] [Desktop Entry]
Type=Application Type=Application
Name=XMonad Name=XMonad
Exec=xmonad Exec=/usr/bin/xmonad-start
NoDisplay=true NoDisplay=true
# name we put on the WM spec check window # name we put on the WM spec check window
X-GNOME-WMName=Xmonad X-GNOME-WMName=Xmonad

View File

@ -14,14 +14,9 @@ applied dynamically, and different layouts may be used on each\
workspace. Xinerama is fully supported, allowing windows to be tiled\ workspace. Xinerama is fully supported, allowing windows to be tiled\
on several screens. on several screens.
%global ghc_pkg_deps ghc-mtl-devel, ghc-X11-devel
# debuginfo is not useful for ghc
%global debug_package %{nil}
Name: %{pkg_name} Name: %{pkg_name}
Version: 0.9.2 Version: 0.9.2
Release: 6%{?dist} Release: 7%{?dist}
Summary: A tiling window manager Summary: A tiling window manager
Group: User Interface/X Group: User Interface/X
@ -37,11 +32,11 @@ Source6: xmonad.session
Patch1: xmonad-dynamic-link.patch Patch1: xmonad-dynamic-link.patch
# fedora ghc archs: # fedora ghc archs:
ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64 ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64
BuildRequires: ghc, ghc-doc, ghc-prof BuildRequires: ghc-prof
BuildRequires: ghc-rpm-macros >= 0.7.3 BuildRequires: ghc-rpm-macros
BuildRequires: hscolour BuildRequires: hscolour
BuildRequires: desktop-file-utils 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 # required until there is a command to open a system-default xterminal
Requires: xterm Requires: xterm
# for xmessage # for xmessage
@ -91,6 +86,12 @@ rm %{buildroot}%{_datadir}/%{name}-%{version}/man/xmonad.hs
%changelog %changelog
* Wed May 11 2011 Jens Petersen <petersen@redhat.com> - 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 <petersen@redhat.com> - 0.9.2-6 * Fri Apr 22 2011 Jens Petersen <petersen@redhat.com> - 0.9.2-6
- drop explicit requires on ghc-xmonad-devel for lighter installs - drop explicit requires on ghc-xmonad-devel for lighter installs
- update readme to mention gsettings for gnome3 - update readme to mention gsettings for gnome3