From owner-freebsd-questions@freebsd.org Fri May 1 03:06:54 2020 Return-Path: Delivered-To: freebsd-questions@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7A2CD2D0199 for ; Fri, 1 May 2020 03:06:54 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.126.130]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass Class 2 CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 49Cxx874N3z4PGX for ; Fri, 1 May 2020 03:06:52 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.223.160.45]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.167]) with ESMTPA (Nemesis) id 1M4rkF-1jUdGJ3SmF-001wah; Fri, 01 May 2020 05:06:48 +0200 Date: Fri, 1 May 2020 05:06:48 +0200 From: Polytropon To: Brandon helsley Cc: "freebsd-questions@freebsd.org" Subject: Re: Xdm Message-Id: <20200501050648.f5a0ab6a.freebsd@edvax.de> In-Reply-To: References: Reply-To: Polytropon Organization: EDVAX X-Mailer: Sylpheed 3.1.1 (GTK+ 2.24.5; i386-portbld-freebsd8.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K1:wTzopPWR2AreXAtpzYCsziYdejjhMuQnA5NjoGnPE5lD7Qwj7O4 +92ZnERel3qUFTIKyHMaF3aBEGG3VDn1B5p1p5X0sOv1EHCB3q0wx+pdkWdsNuhEjCeEt4G 2pM1jPrZvobNVG+jfsB8sfLqQBDyKo+qNW1/AKkYvruuXnP/Jmtg+rMpoQmm0CUMiCgPpVK Y0VWa/YAoA12GXwPTPHdQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:6G2TwvsHFIc=:w8EAup0otV029HXM/D7/Pn eWUDBrZjGsBzfRNLoVA6CX9dZbpf++nAys/OUxPSNedZZ/ISw14DRpZbiHmawvH6we2Jhp8IN sN5AvtR7EQ3m+EmPxFhpsOppBTOrHSkKx6EEzQENGtkXyYA4DyKkgHyH01tTyRjRG6k4thl6m a4guBT1EbTYWw7NbYtTxUEGoz3VyOLUqGjP6gOb6Pl/grm7PRjs/jnyJ9KzEcGGSSVQKzpLs4 a5xUA27CT7alkxK/dlpt1de0QR1hV0PF81WKGauM5o0U/2TAe4qCxc8ngAJI7/Xb/qJk6P7Je 0D5NrGasTGLdC9LcUbQXV05h3jahFuJYPuHxoQNJTjubuZZnK8zfsZAbIB3IFMgujmjlPJNZb yOBtJQ1Ro6rBi55pHOdQ7HS/hgWGTazdH/mUTdHb1xH3COdfZt4wvWwEUbFIezFof9gYDaNqO LY6DAneOgXzUIE7WqGmBBmtP3Mvo2j2lXWo5U66c4UGWNULKkhTM3SsktlTW62lATz28qfcZX pC38N9nECMvPBtTBXtj2GR1/WM9S2Icac0SjeB4FgMcJV+8wBfQ2tX36RvnLcF8ny7jNcD5kS wTKnB8g7ECtdjwNWgwkG/Il+fv5Z7jqkMVKNrD5nGxKd92eRV9x05gfLcNkVVUrbme+BaLz00 Ut2Vm/zEcgJo3PwvqJkxAHFzqwbrUW6erPTzBEezaieL/EJeoPAqHoExNG2DUV1v4YJszK97P OZIwjMrJuJGFtWwzOf2sEcasypmZVL3LZp6bG0frhtJ+8vngb0xs9GjbtqYGznKGSQpwRoQEW Ob7Z25CxNsvqfvpZ+W5aIbo0aUEdoqgZJc4zJOidjFNCe02+vC5/y4gaMAqfF5lKIwI4XiGT/ piEJXHaQbkYgxid3/qjw== X-Rspamd-Queue-Id: 49Cxx874N3z4PGX X-Spamd-Bar: ++++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@edvax.de has no SPF policy when checking 212.227.126.130) smtp.mailfrom=freebsd@edvax.de X-Spamd-Result: default: False [4.74 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; HAS_REPLYTO(0.00)[freebsd@edvax.de]; TO_DN_SOME(0.00)[]; MV_CASE(0.50)[]; HAS_ORG_HEADER(0.00)[]; RCPT_COUNT_TWO(0.00)[2]; FREEMAIL_TO(0.00)[hotmail.com]; RECEIVED_SPAMHAUS_PBL(0.00)[45.160.223.94.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.86)[0.861,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; MID_CONTAINS_FROM(1.00)[]; RCVD_IN_DNSWL_NONE(0.00)[130.126.227.212.list.dnswl.org : 127.0.5.0]; R_SPF_NA(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[130.126.227.212.rep.mailspike.net : 127.0.0.17]; RCVD_COUNT_TWO(0.00)[2]; IP_SCORE(0.47)[ip: (1.55), ipnet: 212.227.0.0/16(-1.22), asn: 8560(2.06), country: DE(-0.02)] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 May 2020 03:06:54 -0000 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, ...