Xfce not autostarting after logging in

Xfce used to start up automatically on a FreeBSD 7.1 machine, but as of late this is not happening anymore. This means that the user has to enter "startxfce4" right after entering username and password. The .xsession file has the following contents:

# cat /usr/home/user01/.xsession 
/usr/local/bin/numlockx &
/usr/local/bin/startxfce4

Can someone let me know where to look for the reasons why there is no xfce autostart?

you got no X at boot ?

.xsession will only be read if startx is called from the user. Is it the case ?

Correct. The user enters login name and password and a prompt appears. It used to be the case that Xfce would start automatically instead. Now the user has to know to type in startxfce4 to get to the desktop.

do you have xdm or gdm installed?

Hopefully this will help:

# which xdm
/usr/local/bin/xdm
# which gdm
gdm: Command not found.

If you mean by gdm the GD library, then yes, it is mentioned among the sections in phpinfo().

If you want a gui login prompt xdm/gdm/kdm will help you with that. You were probably using xdm.

The file /etc/ttys will help you set up automatic startup of X. Look for a line similar to this:

ttyv8   "/usr/local/bin/xdm -nodaemon"  xterm   off secure

And replace off with on. This will give you a graphical prompt at boot.

Thank you for your answer. When making the suggested change in /etc/ttys, I get the twm windowing system, instead of xfce. If I subsequently return to the "off" setting, the response is "write failed, filesystem is full" even though I am logged in as root. Please advise.

UPDATE: I have managed to salvage the situation and back to the starting situation. I am back now to where after boot the command line appears and after logging in, the command "startxfce4" will start xfce.

If you are using xdm, you can add

exec startxfce4

to your personal ~/.xinitrc

Thank you for your response and I will try that. So what is the difference between .xsession and .xinitrc? How do I know I am actually using xdm?