# Unable to login in GUI mode after installation



## Ravi S (Jul 21, 2016)

I am trying FreeBSD for the first time. I installed FreeBSD 10.3 it on a GPT partition and got it to boot using Grub. After this I installed xorg, fluxbox, slim with:
`pkg install xorg fluxbox slim`

In /home/username/.xinitrc I put:

```
xterm &
exec fluxbox
```
To /etc/rc.conf I added:

```
slim_enable="YES"
```
Now when I boot I do not see the expected slim splash screen, instead it is a very basic username/password dialog, I think it is the xdm login screen(Note: It's not in console mode, it still is graphical). After I enter the username and password it returns to the same dialog but no error is shown. I am unable to use 
	
	



```
ctrl+alt+Fn
```
(where n is between 1 and 7) as the screen remains fixed at the username/password dialog. The only way I can login is either using SSH or if I comment this line in /etc/ttys:

```
ttyv8    "/usr/local/bin/xdm -nodaemon"    xterm    on  secure
```
Is there any step I am missing or how can I check what is not working as it should.


----------



## spaceille (Jul 21, 2016)

did you create a .xinitrc file in your home directory? If not, do so and add the following line to it: 
	
	



```
exec startfluxbox
```


----------



## SirDice (Jul 21, 2016)

Start here: Handbook: 5.4. Xorg Configuration

Note, for slim your ~/.xinitrc should look something like this:

```
#!/bin/sh

DEFAULT=startfluxbox

[ -n $1 ] && exec $1

# Fallback in case startx is used
exec ${DEFAULT}
```

Do NOT enable XDM or Slim using /etc/ttys!


----------



## Maxnix (Jul 21, 2016)

SirDice said:


> Do NOT enable XDM or Slim using /etc/ttys!



I'm one of those who use /etc/ttys to start XDM; which are the drawbacks?


----------



## SirDice (Jul 21, 2016)

Maxnix said:


> I'm one of those who use /etc/ttys to start XDM; which are the drawbacks?


There's a possible conflict between ttys and xdm. It also makes it rather difficult to restart XDM without restarting the whole system.


----------



## Ravi S (Jul 21, 2016)

I got that I was supposed to use *startfluxbox* instead of *fluxbox* but even after making the change /home/username/xinitrc to:

```
exec startfluxbox
```
I have the same result. As for slim configuration, it should fall back to the default i.e. `exec startfluxbox` but it doesn't


----------



## SirDice (Jul 22, 2016)

Make sure dbus is running. I'm not sure if it's the cause (or if Fluxbox really needs it) but a lot of applications (especially Window Managers) seem to depend on it nowadays. So it doesn't hurt to enable it.

Forget Slim for a minute, disable it for the time being. Does Xorg/Fluxbox start correctly if you use `startx`?


----------



## Ravi S (Jul 22, 2016)

SirDice said:


> Make sure dbus is running. I'm not sure if it's the cause (or if Fluxbox really needs it) but a lot of applications (especially Window Managers) seem to depend on it nowadays. So it doesn't hurt to enable it.
> 
> Forget Slim for a minute, disable it for the time being. Does Xorg/Fluxbox start correctly if you use `startx`?


dbus is enbled in /etc/rc.conf , if I use `startx` the screen just goes blank.


----------



## SirDice (Jul 22, 2016)

Ravi S said:


> if I use  startx the screen just goes blank.


Right, focus on this first. It's an indication things haven't been set up correctly yet. Can you post a Xorg.0.log and provide us some information about your hardware (specifically which videocard)?


----------



## Ravi S (Jul 24, 2016)

SirDice said:


> Right, focus on this first. It's an indication things haven't been set up correctly yet. Can you post a Xorg.0.log and provide us some information about your hardware (specifically which videocard)?


Thanks for your response, I was away for a bit. The complete Xorg.0.log is at http://pastebin.com/jZMs0JHD

I haven't been able to locate anything in the file that would indicate X server failed to load.


----------



## dhenzler (Dec 4, 2017)

I got bitten by modifying /etc/ttys to start XDM.  Now I get a different login screen, which does not recognize my login and password.  I have everything else working... now this.... Ugh!

HELP me !


----------



## SirDice (Dec 4, 2017)

Boot to single user mode, remove the entry from /etc/ttys and start normally.


----------

