Wednesday, February 11, 2009

Starting gdm or xdm and kde by default in FreeBSD 7.1

After installation, by default FreeBSD gives you a nice terminal based login. I am pretty much happy with that as I have a high-res VESA console (after recompiling the kernel with VESA console support and then setting respective mode using vidcontrol).

But if you are more of a clicky-clicky type of person, you probably want it to start off directly into some graphical greeter and login manager like gdm or xdm.

Starting gdm by default


add
gdm_enable="YES"


in /etc/rc.conf

and reboot. You should get gdm after boot.
One problem I could not come over with gdm is that I could not select or start KDE from it. It would always try to load gnome.
FailSafe Terminal and then running startkde works, but is again not for the clicky-clicky user.

Starting xdm+kde by default


This needs minor serious work.

First, edit /etc/ttys
under #Virtual terminals
change
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm off secure

to
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure


This should start xdm with an xterm console log on virtual tty8 (the one you get when you hit ).

If you want to log in to kde after authenticating in xdm,

create/open ~/.xsession

and make it look like
#!/bin/sh
exec startkde


This will start off kde after authenticating in xdm.

USB mouse under X / kde / gnome in FreeBSD 7.1

During FreeBSD 7.1 installation, many users with USB mouse respond in negative when the setup asks if they have PS2 or serial mouse (as USB =/= serial). And then they end up with kde up and running and no mouse.


The quick way to fix that is to add
moused_enable="YES"
moused_type="auto"

to your /etc/rc.conf file and reboot.
Xorg server picks up the device /dev/sysmouse nicely.