# Startx on boot



## NeoTerra (Jun 15, 2012)

Hello everyone, I know this is my first post but I am really stumped on this issue.

I want X (then fluxbox, but I got that covered in the .xinitrc) to start on boot, without going to the console to login first.

I edited the /etc/ttys file to the on position:

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

However now when *F*reeBSD boots it goes straight to the XDM logon screen. When I put in root for the username and the root password, it just loops back to the XDM login screen. It won't even recognize my other user (who is a member of the wheel group).

Ideally I want to use the SLiM login manager, but I figured I'd try to figure out the XDM one first. I read the handbook and it isn't helping. I searched google and this forum and couldn't find anything that dealt with my issue specifically.

I'd really appreciate any help, thanks.


----------



## wblock@ (Jun 16, 2012)

With xdm, I believe it will use .xsession instead of .xinitrc.


----------



## NeoTerra (Jun 16, 2012)

Alright, but how do I start X at boot? I don't want it to go to console at all.


----------



## kpa (Jun 16, 2012)

Last time I used x11/slim I started it from /etc/rc.conf instead of /etc/ttys:


```
slim_enable="YES"
```

I remember that x11/slim used ~/.xinitrc instead of ~/.xsession.


----------



## NeoTerra (Jun 16, 2012)

kpa said:
			
		

> Last time I used x11/slim I started it from /etc/rc.conf instead of /etc/ttys:
> 
> 
> ```
> ...



I actually found that using the /etc/rc.conf method created more problems than I needed. Anyways, I figured out how to fix it all. Marking as [Solved] now. 

I thank you and wblock@ for your time.


----------



## wblock@ (Jun 16, 2012)

FreeBSD will always boot with the console, it will just start a login manager if enabled in /etc/ttys.  The login manager starts X, and usually will show a graphical login screen.

Please describe what you did to enable xdm or slim.  It may be helpful for others.


----------



## NeoTerra (Jun 16, 2012)

Well I just added the line in the /etc/ttys file.


```
ttyv8   "/usr/local/bin/slim"  xterm   on secure
```

Then however I ran into issues logging on as a non-root user. Simple fix to that was to copy my .xinitrc file from /root to /usr/home/user. Then had to fix permissions:


```
cd /usr/home/user
chmod 755 .xinitrc
```

SLiM now works


----------

