# GUI log-in fails



## DavidMcCann (Mar 21, 2010)

I have installed *xdm* and modified /etc/ttys/ to enable VT 8, as described in the handbook. BSD now starts with a graphical log-in, but that refuses to accept my name and password, or to let me log in as root. Have I missed some vital stage?


----------



## Beastie (Mar 21, 2010)

Like creating an executable ~/.xsession file containing the path to your window manager?


----------



## DavidMcCann (Mar 21, 2010)

According to the Handbook, ~/.xsession is run _after_ log-in, so I don't see how it would affect my ability to log in to start with. The window manager ran perfectly well when I logged in to a console and used *startx*. The problem is that *XDM* won't accept a user or password. There is nothing in the Handbook about having to (or how to) tell *XDM* where the users and passwords are kept.


----------



## Beastie (Mar 22, 2010)

DavidMcCann said:
			
		

> According to the Handbook, ~/.xsession is run _after_ log-in, so I don't see how it would affect my ability to log in to start with.


Okay, then I didn't understand what you meant by "refuses to accept my name and password". Are you getting an error or something?
XDM is supposed to run automatically once FreeBSD has finished booting. You then enter your username/password and once you validate, it executes ~/.xsession. If it's missing, then XDM has nothing to execute and it comes right back to the login screen. Could you at least create a valid (and executable) ~/.xsession file? You'll need it anyway.



			
				DavidMcCann said:
			
		

> The window manager ran perfectly well when I logged in to a console and used *startx*.


Perfectly normal if you have a valid ~/.xinitrc file, which has nothing to do with ~/.xsession and XDM.



			
				DavidMcCann said:
			
		

> There is nothing in the Handbook about having to (or how to) tell *XDM* where the users and passwords are kept.


Display managers are just graphical getty/login. They already "know" where to look.


----------



## SirDice (Mar 22, 2010)

Beastie said:
			
		

> XDM is supposed to run automatically once FreeBSD has finished booting. You then enter your username/password and once you validate, it executes ~/.xsession. If it's missing, then XDM has nothing to execute and it comes right back to the login screen. Could you at least create a valid (and executable) ~/.xsession file? You'll need it anyway.


If you have the full Xorg installed it should start with TWM by default if there is no .xsession.

Are there any errors in /var/log/messages, /var/log/Xorg.0.log and/or ~/.xsession-errors?


----------



## DavidMcCann (Mar 22, 2010)

The log-in screen was just bouncing back, so I assumed it was refusing the names or passwords. I did check .xsession-errors, but there was nothing there.

I also assumed the default Xsession file was adequate. Now all I need to know is what to put in .xsession. I'm using JWM, as I couldn't get TWM to work properly; there didn't seem any point in solving that problem, as I'd sooner have no GUI than TWM!

The job of setting up BSD seems endless, compared with Linux â€” or even DOS or CPM! I don't mind editing configuration files, but I just wish the documentation told me the whole story. Last night I found myself singing "We shall overcome" as I worked on it!


----------



## SirDice (Mar 22, 2010)

DavidMcCann said:
			
		

> The job of setting up BSD seems endless, compared with Linux â€” or even DOS or CPM! I don't mind editing configuration files, but I just wish the documentation told me the whole story. Last night I found myself singing "We shall overcome" as I worked on it!


Yes, you do need to configure a few things. Best thing to do is to disable XDM and workout any kinks with Xorg first. Once that's done you can enable XDM again. 

Perhaps you're trying to solve to many problems at once, I know that doesn't work for me. Work step by step. Set up the base OS first, make sure you have IP connectivity. Logins work and you can su or sudo to root. Then move up to plain Xorg. Configure it so it works properly. Then add a window manager or desktop environment. Configure etc..


----------



## DavidMcCann (Mar 22, 2010)

It would be easier to solve problems if they didn't keep appearing. JWM has now vanished for no apparent reason. TWM has switched from the GB keyboard to the US and no longer allows Ctrl-Alt-F1. The console has switched from UTF-8 to some ancient encoding. This is worse than Linux From Scratch.

Thank you, gentlemen, for your time, but I think I need a rest from BSD, perhaps infinite.


----------



## SirDice (Mar 23, 2010)

What have you been editing? 

You rarely need to touch anything besides /etc/rc.conf and /etc/X11/xorg.conf.


----------



## used2bsd (Mar 30, 2011)

*similar problem with xdm*

Hope it's OK to jump in like this. I have FreeBSD 8.2 with KDE 4.5 and fluxbox configured on my multiboot machine. I had a console login earlier and I decided to add xdm to make a graphical login.

I edited /etc/ttys to this:

```
ttyv8 ......
ttyv9 "/usr/local/bin/xdm -nodaemon" xterm on secure
```
I get a login screen but cannot login with my password. Cannot even login as root user. I tried getting into singe user mode but I cannot edit my /etc/ttys file to undo the changes I made.

Any suggestions would be appreciated. (BTW I am completely new to FreeBSD)

Regards,


----------

