# Boot to x server



## kutkloon7 (Dec 15, 2015)

Hello, this is my first post! I have worked with Linux Mint before and I thought I'd give FreeBSD a try. So far, everything has been going quite well. In one day, I have most things set up as I want them. However, I still have to login at a terminal after boot. I already tried XDM, but I both don't like it and I can only log in as root, not as a user (the login screen doesn't indicate that the password is wrong but just flashes and shows up again: however, I'd rather not use a login manager if that is possible anyway, so this is not the topic).

I have found this thread but the last post doesn't help me: when I boot, I still get a login screen. I do get some unusual behavior: after the "login:" text, the screen goes black for a couple of seconds and then returns to terminal with a lot of yadayada that indicates that xserver started. It is the same text I get when I run startx and exit again BUT normally I get some text that indicates that xserver shutdown (error: xserver didnt respond or something like that). Also, when I try the suggestion from the other thread and then run startx, it works fine but when I logout I see 'X server already running on display :0' on the terminal.

So it seems that x server does run, but I can't see anything on the screen...
Anybody has an idea how you can log in reliably?

BTW, I have xfce installed and exec startxfce4 in my .xinitrc file (which works fine: the xfce desktop starts when I run startx).


----------



## ondra_knezour (Dec 15, 2015)

kutkloon7 said:


> I do get some unusual behavior: after the "login:" text, the screen goes black for a couple of seconds and then returns to terminal with a lot of yadayada that indicates that xserver started.


It probably really started, try to switch to X console with AltKey+F9


----------



## kutkloon7 (Dec 15, 2015)

I think so too, but I don't see it. All other virtual terminals work and are empty, not nr 8 (it seems there is no terminal, which makes sense because I have 'off' in /etc/ttys for that terminal). It DOES work as I want when I just omit the ampersand in /etc/rc.local, but of course, there are processes that are not started because they are blocked...

In the meantime, I installed slim and I'm having trouble to get it to work as well


----------



## shepper (Dec 15, 2015)

kutkloon7 said:


> BTW, I have xfce installed and exec startxfce4 in my .xinitrc file (which works fine: the xfce desktop starts when I run startx).



I think both x11/slim  and  x11/xdm require an ~/.xsession.  More info here.


----------



## sidetone (Dec 15, 2015)

x11/xdm uses .xsession. x11/slim uses /usr/local/share/xsessions/*.desktop, but slim can also make use of .xsession.

.xinitrc only works from the command line.


----------



## SirDice (Dec 15, 2015)

kutkloon7 said:


> It DOES work as I want when I just omit the ampersand in /etc/rc.local,


How are you starting slim or xdm? The correct way (for slim) is to add to /etc/rc.conf:

```
slim_enable="YES"
```


----------



## kutkloon7 (Dec 15, 2015)

Ah, that explains a lot. I was using .xinitrc to start xfce and I started xdm and slim the same way, by using /etc/ttys.
I installed Mint for now, but I might give it another try during the Christmas break.


----------

