No users in GDM list on FreeBSD? Here’s a fix

14 May 2010

So today GNOME finally finished compiling on this Compaq Evo N610c laptop which I installed FreeBSD 8.0 on the other day. It only took about 3 days to compile. (Only! Mind you, it pulled in all sorts of stuff, like Epiphany, which includes WebKit.)

After making sure GDM would come up on startup by adding this to /etc/rc.conf

dbus_enable="YES"
hald_enable="YES"
gnome_enable="YES"

(For some reason, lshal wouldn’t run if gnome_enable="YES" was the only line.)

…I was dismayed to discover that there were no users showing up in the GDM login form. Not even the “Other” option was available to let me log in manually.

Frustrated, I went to search Google. I started typing “freebsd gdm” and then Google Suggest popped up:

FreeBSD GDM no users

Looks like I’m not the only one Googling for that. Turns out I couldn’t find anything on Google — nobody seems to have been bothered to write anything up in an FAQ (which is why I’m writing this post).

On the offchance, I looked in /var/log/messages, and saw some messages quite like the following:

console-kit-daemon[60290]: WARNING: kvm_getenvv failed: cannot open /proc/60378/mem

Turns out FreeBSD doesn’t mount /proc by default, but it is required for GDM to work properly (and, I’d hazard a guess, OpenOffice.org and a whole lot of other stuff). You can easily enable procfs by adding this line to /etc/fstab:

proc /proc procfs rw 0 0

Then, reboot (or if you’re a clever clogs and mounted /proc by hand with mount, restart GDM /usr/local/etc/rc.d/gdm restart), and you should see the users in the login form!

12 replies

  • Tim says:

    Thanks! This solved a problem I’d been having for a while but hadn’t bothered investigating (I just used auto login :-).

  • Martin says:

    Thanks a lot!!! I spent weeks trying to fix this, without success. THANKS!

  • Rick Lemon says:

    This is an awesome tip. Didn’t even think of this. Thanks!

  • draakon says:

    Thank you a ton!
    I was already about to rip my hair out! ^ ^

  • Dmitry says:

    Thanks a lot!

  • kapz says:

    Thanks a gazillion! You Da Man!!!! :)

  • Bala says:

    Thanks!

  • Arthur says:

    Thank you. Makes me wonder why FreeBSD is phasing out procfs though.

    • Jeremy says:

      Perhaps that’s a good thing. It’ll force GNOME to make GDM work without /proc, which will go further to making it work better out-of-the-box on FreeBSD.

    • Arthur says:

      Some further reading tells me /proc is being phased out in FreeBSD because of security concerns in favor of sysctl and a collection of (system) binaries.

      This also makes much more sense to me from the perspective of servers where many processes/users have their own chrooted or (better yet) BSD-jailed filesystem(s), obviating the need to mount /proc in each of those separately.

      Also, I can’t find /proc mounted on any osx or linux machines (both desktop and server) I have access to, so let’s hope it’s a trend.

    • Jeremy says:

      Odd, /proc should be mounted on all Linux machines. OpenOffice.org, for example, will not launch unless it is mounted.

  • I too wish to thank you!

Leave a reply

Change your avatar.