Date: Fri, 1 May 2020 05:06:48 +0200 From: Polytropon <freebsd@edvax.de> To: Brandon helsley <brandon.helsley@hotmail.com> Cc: "freebsd-questions@freebsd.org" <freebsd-questions@freebsd.org> Subject: Re: Xdm Message-ID: <20200501050648.f5a0ab6a.freebsd@edvax.de> In-Reply-To: <CY4PR19MB1655C8835F43E4D7304D5DD5F9AA0@CY4PR19MB1655.namprd19.prod.outlook.com> References: <CY4PR19MB1655C8835F43E4D7304D5DD5F9AA0@CY4PR19MB1655.namprd19.prod.outlook.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 30 Apr 2020 16:08:34 +0000, Brandon helsley wrote: > I installed xdm and changed entry in ttyv0. When I turn my computer > on it goes to this log in manager but it doesn't let me through > for root or my user. First of all, there are two ways of setting up xdm. The line you should modify in /etc/ttys is supposed to be ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure Not ttyv0, which is the console entry. It should not be changed in order to deal with X. Only change the "off" to "on" in the xdm line. Documentation and example here: https://www.freebsd.org/doc/handbook/x-xdm.html The modern approach, i. e. the one that is recommended now, is to add the following to /etc/rc.conf: xdm_enable="YES" In this case, no modification of /etc/ttys is needed. Furthermore, you should make sure xdm finds a valid initialization file for the user. The name is ~/.xinitrc. However, if you already have a ~/.xsession file for the user (read when you enter the "startx" command), there is no reason to keep duplicate entries. Just use the "cascading approach": In ~/.xsession: #!/bin/csh source ~/.cshrc exec ~/.xinitrc Keep in mind that if you're _not_ going to use FreeBSD's default dialog shell as your login shell, you'll have to change those lines to match your setting, for example, bash or zsh. In ~/.xinitrc: #!/bin/sh # startup programs [ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc numlockx xbinkeys # additional settings xsetroot -solid rgb:3b/4c/7a xset b 100 1000 15 & xset r rate 250 30 & xset s off & xset -dpms & # window manager exec wmaker Always make sure the last line, the "exec" line, contains the correct call for the window manager or desktop environment you want to use. Depending on that, the complexity of the "exec" line can vastly increase. :-) You can find related documentation in The FreeBSD Handbook. In worst case, or for testing, use "exec xterm", and when you exit that terminal, X should be shut down, and you should be back at the xdm login screen. In worst case, let the text "exec xterm" be the only line (for testing) in .xinitrc; this should _always_ work. For testing. The #! line in .xinitrc of course is optional. :-) Allow me a final note: Logging in as root to an X session is discouraged for security reasons. The common way is logging in as a user, and then using tools like su, sudo or super to gain UID 0 privilege, typically from an X terminal or using GUI tools provided by the desktop environment in use (Gnome: gksude, if I remember correctly). -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200501050648.f5a0ab6a.freebsd>