ANNOUNCE: Custom 64bit FreeBSD 8.1-RELEASE with XFCE packages released

Polytropon freebsd at
Sun Aug 8 10:08:39 UTC 2010

On Sat, 7 Aug 2010 19:33:58 -0500, Antonio Olivares <olivares14031 at> wrote:
> Polytropon,
> So if I delete the file /etc/rc.local and make a file ~/.login, make
> it executable (chmod +x ~/.login), and add the line
>        [ -f /tmp/.X0-lock ] && startx
> in that file and I will have the same result but without loggin in as
> root?

Correct. The user specified by the autologin directive will
be the user who runs the "startx" command, so no need for
using "su".

Here's an example from a working FreeBSD 5 system:


	ttyv0  "/usr/libexec/getty autologin"  cons25l1  on  secure

Intead of "Pc", the profile to be used is named "autologin".



The name "praxis" is the user's account name for the user
to be logged in automatically. All capabilities defined
in "Pc" will also be incorporated.


	mesg y
	[ ! -f /tmp/.X0-lock ] && startx

This makes sure the same username can be used for an SSH
login (and it WON'T try to start another X then), or it
can be used to log in via text mode console. When X is
shut down, the user will be dropped to the text mode CLI.
If you don't want to do that, add "logout" as the next
line in ~/.login, or enclose the whole "startx" line in
a loop. But this can lead to problems when X is not
working properly.

Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...

More information about the freebsd-questions mailing list