2008-09-26 21:34:03
Using An Alternate Window Manager With GDM
Recently I found myself needing to run a less resource intensive window manager on a linux host. The host ran Fedora 9, used GDM, and had Gnome as the only desktop environment installed. Gnome, however, was way too much of a memory hog considering the main purpose of the server. I decided that FVWM way the way to go, but how would I make it work?I didn't want to hack this in. I wanted to make FVWM appear as a valid choice in the GDM chooser. To do this, I had to find where these choices exist. After a bit of searching, I found that they were hiding in /usr/share/xsessions. So, I copied gnome.desktop to fvwm.desktop and modified it:
[Desktop Entry]
Encoding=UTF-8
Name=FVWM
Comment=This session logs you into FVWM
Exec=/usr/local/bin/fvwm2
TryExec=/usr/local/bin/fvwm2
# no icon yet, only the top three are currently used
Icon=
Type=Application
I had a little hiccup here. I first tried to make the Exec lines point to "fvwm2" without the full path. Since /usr/local/bin is in _my_ path, I assumed that this would work. I was wrong. Since it isn't in root's path, GDM can't validate the binary and thus doesn't show the option in the window manager chooser. So I went back and fully qualified the binary.That's pretty much all it takes. You have to restart X, which I did the hard (easy?) way by hitting CTRL+ALT+BKSP. Now to make FVWM as usable as Gnome. Fun...
Back
2 comments
2009-01-14 08:35:11
slonkak says...
@Christofer I didn't configure much, as I only wanted a simple desktop pager and a right-click menu. Here is the overriding Pager file, followed by my .fvwm2rc file (showing only the sections with changes).
# cat ~/.fvwm/ConfigFvwmPager
########################### Pager #########################################
DestroyModuleConfig FvwmPager: *
*FvwmPager: Back #908090
*FvwmPager: Fore #484048
#*FvwmPager: Font -adobe-helvetica-bold-r-*-*-10-*-*-*-*-*-*-*
# turn off desktop names for swallowing in above button bar example:
*FvwmPager: Font none
*FvwmPager: Hilight #cab3ca
*FvwmPager: Geometry -1-1
*FvwmPager: Label 0 Misc
*FvwmPager: Label 1 Maker
*FvwmPager: Label 2 Mail
*FvwmPager: Label 3 Matlab
*FvwmPager: SmallFont 5x8
*FvwmPager: Balloons All
*FvwmPager: BalloonBack Yellow
*FvwmPager: BalloonFore Black
*FvwmPager: BalloonFont lucidasanstypewriter-12
*FvwmPager: BalloonYOffset +2
*FvwmPager: BalloonBorderWidth 1
*FvwmPager: BalloonBorderColor Black
# cat ~/.fvwm/.fvwm2rc
# This file is copied to a new user's FVWM_USERDIR by FvwmForm-Setup form.
# This file contains the commands fvwm2 reads while starting.
#
EdgeResistance 0 0
EdgeScroll 0 0
ClickTime 750
DeskTopSize 4x1
MenuStyle * fvwm, Foreground black, Background tan, Greyed grey40
MenuStyle * Font -adobe-times-bold-r-*-*-14-*-*-*-*-*-*-*
<SNIPPED>
# some simple default key bindings:
# To allow CTRL+ARROW to change desktops left/right
Key Next A SCM Next [*] Focus
Key Prior A SCM Prev [*] Focus
Key Left A C Scroll -100 +0
Key Right A C Scroll +100 +0
<SNIPPED>
AddToFunc InitFunction
#+ I exec xsetroot -mod 2 2 -fg rgb:55/40/55 -bg rgb:70/50/70
+ I exec xv -root -quit /home/slonkak/Pictures/1678_walenstadtberg_1280x1024.jpg
+ I exec gnome-screensaver
<SNIPPED>
######################## Menus ###################
DestroyMenu MenuFvwmRoot
AddToMenu MenuFvwmRoot " km-server " Title
+ "XTerm" Exec exec xterm -fg black -bg white +sb
+ "Bluefish" Exec exec bluefish
+ "Firefox" Exec exec firefox
+ "" Nop
+ "Wallpaper" Popup MenuWallpaper
+ "" Nop
+ "Lock" Exec exec gnome-screensaver-command -l
+ "" Nop
#+ "&X. Exit Fvwm" Popup MenuFvwmQuitVerify
+ "Restart" Restart
+ "Exit" Quit
2009-01-13 15:06:28
Christofer says...
Way to go, please post your configs for fvwm once you get there, I do love the .Xdefaults.. well, way ;)