Adding Fvwm to Gdm

gentoo 2.4 gnome-light fvwm 2.5.10

how i add fvwm to gdm menu i have tryed various old tips but still not working only file i have is /etc/X11/Sessions/fvwm2

i used fvwm --replace to replce metacity and changed sessiosn to restart works but i want fvwm only

anyone ?

thanks

[EDITED by theBlackDragon]Changed topic title to more meaningful title.

I never got that to work properly either, couldn’t get fvwm to show up in the gdm sessions menu, I’m now using entrance (which is in ~x86), but it doesn’t seem to remember the last wm that was started so I have to select Fvwm every time I login…
Most people seem to just start fvwm from console though…

i will try entrance i cant recall how use from console i dont use linux for long time i eed read alot i guess

thanks

Starting from console is actually quite easy, make a file called .xinitrc in your home directory and put this in it:

Make sure gdm doesn’t start on boot so uncomment the line saying DISPLAYMANAGER=“<something>” from your /etc/rc.conf . You can now login on your console and when you get a prompt just type “startx”, this should now start fvwm :slight_smile:

thanks works for me :slight_smile:

ok here is the “super happy fun guide to adding stuff to gdm”

This is what i had to do at work on fedora and redhat… I assume it works on other distros:

Note: replace FVWM (and alts) with blackbox, fluxbox, IceWM, etc… for other WMs

this needs to be done as root so su now
$su

Ok now time to make a shell script for gdm:
#cd /etc/X11/gdm/sessions
#nano FVWM

Now put these lines in the file and save/quit:

#!/bin/bash
exec /etc/X11/xdm/Xsessions fvwm

Ok now make the shell script execuatable:
#chmod 755 FVWM

Now we need to edit that Xsession file…
#cd /etc/X11/xdm
#nano Xsession

Now lets scroll down to this big switch/case
find the lines:

Now insert the follwing lines:
fvwm|FVWM)
exec -l $SHELL -c “$SSHAGENT /usr/share/apps/switchdesk/Xclients.fvwm”
;;

Now save & quit
Finally now to make one last file…
#cd /usr/share/apps/switchdesk/
#nano Xclients.fvwm

Inside put:
#!/bin/bash
exec fvwm2

save and quit

Thats all… it should work. I am doing this from memory. Hope this helps

EDIT: this also sets up some stuff for KDM

Personally I detest XDM/KDM/GDM I use startx (then again i just use fvwm). I’d imagine it wouldn’t be so hard to make a short script in .xinitrc to pick a WM from a menu

Any hints for making this work with Ubuntu?

I don’t have the folders:

#cd /etc/X11/gdm/sessions
#cd /etc/X11/xdm
exec /etc/X11/xdm/Xsessions fvwm

I have a folder called /usr/share/xsessions where there is the following files:

gnome.desktop
kde.desktop

I guess it here that I should make a fvwm.desktop?

I don’t have that directory, but if you do then I suppose you’ll have to add it there, look at the KDE and Gnome ones on how to create your Fvwm files.

And just for the record, I have my session files in /etc/X11/Sessions , I have no idea if those files are used though as I use xdm.