freebsd at edvax.de
Fri May 1 03:06:54 UTC 2020
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
Documentation and example here:
The modern approach, i. e. the one that is recommended now,
is to add the following to /etc/rc.conf:
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":
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.
# startup programs
[ -f ~/.xmodmaprc ] && xmodmap ~/.xmodmaprc
# 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
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).
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions