From owner-freebsd-questions@freebsd.org Fri May 1 03:59:53 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 8753D2D1657 for ; Fri, 1 May 2020 03:59:53 +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 49Cz6J62jWz4S1C for ; Fri, 1 May 2020 03:59:52 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r56.edvax.de ([94.223.160.45]) by mrelayeu.kundenserver.de (mreue010 [212.227.15.167]) with ESMTPA (Nemesis) id 1MV5nC-1jdoVJ3bOQ-00S3uv; Fri, 01 May 2020 05:59:48 +0200 Date: Fri, 1 May 2020 05:59:47 +0200 From: Polytropon To: Brandon helsley Cc: freebsd-questions@freebsd.org Subject: Re: Xdm Message-Id: <20200501055947.895016a6.freebsd@edvax.de> In-Reply-To: References: <20200501050648.f5a0ab6a.freebsd@edvax.de> 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:c50cHtZb3h4vje1da0wye+hgymBfhLhhy25gEBJ3m3p+71WJPZX wl70wCJtKCwl/4yGqP+m2+QCOtAzay98HGVyEuV3dd1YBO8HFyLT+L2mzE0bgTG4wr02xLb dOO/tq4ZpOFbo0XTSbNV2jM1T4tyO4KUaoDPzZakyr7VTuZXovmjKZCoqB/zMqVCsL5xOOd BkGFGNGrP1U0bOG4rD31w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:lxymaZicWBw=:PwZQSxWJYNHEv5llFrvbnn q1gOoZ74FvMNPQJtCf2WLHSVWZwfa4t3n/RIgbRdUkbHFbWyxzqkZDxwV3wNnxDoJyVxoLmbO x/lssfyRFF/MIDdH/JosOHyi62seEedz3YS2XNZWGtrJodDrMF4ukPNSnCDFo8Zgx97//56qG 87Qjx/dv5mpPiwSHETuuqMJAjXU2dvwHhJbvhLE09iFOxLsruUeT4VbftIT2AY46qYrP4fIe1 Ml8XBgQSQ2R5al8lx/LrYmD6EHQJz68vkDodC6LCOn4pfKIeLTKNXJ1pItkTyVXBVpHi30IxW RoWe8di413rY8q6tnlw9yp0y+PErR8D/pR6YFS0wQr6oyCp1jPkIJ6qJiHh3pnwAiS6KcKYbH 12+iOUNreXPU1cOrVpGngOBEM6Ydxli2RDHEd59dzanwThyHi1a4MBDmb2sfOnZ314r8nvzg2 f/0Pny64TL3t0LjkSq0r6+/tKDioIGkXCyWz2ztoXNQ1lhEawERFPhnOQwwy4z367WXRNl9GJ M6VoklYxRGHXIOtmItt6c5I1COJOr5C2nIBpvR6LogwiT5GE66X+C4ELw9YiAb3hJynp2Htc/ ONs/wA3l26nlziEQWE/aisoyRcYPZZ//+Q0Qw1MQMrw1PD078RcdOU9IRQYmIJEZJAC+2Snzy pBZEwsL0QnP7X1ol+6HSIS1Ls6Zzv0KSnz0ifRYSuFGLbbTHggxHtTPptpAUTYrxsOwDJloU2 gyN27IMqDg3UXChi+ank6PU7Q7RkU3BPZ6SrdnIBhX6Kwa8E4t+/rCLO/txorCbixih7hlS/k txYonv9qjX+ro6+Lt7YZRz1oNUqoMjiMju9yqE1Lmmcp17ru5QO5rLO/jmRGe69+xX4fnOhm8 YS5bqCVNKb8qZYTPfxuA== X-Rspamd-Queue-Id: 49Cz6J62jWz4S1C 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.54 / 15.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]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; MIME_TRACE(0.00)[0:+]; ARC_NA(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[edvax.de]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.68)[0.677,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_SPAM_LONG(1.00)[1.000,0]; RCVD_IN_DNSWL_NONE(0.00)[130.126.227.212.list.dnswl.org : 127.0.5.0]; MID_CONTAINS_FROM(1.00)[]; 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.46)[ip: (1.50), ipnet: 212.227.0.0/16(-1.21), 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:59:53 -0000 Re-including list, hope that's okay; use your "reply all" function or at least reply to the mailing list. :-) On Fri, 1 May 2020 03:29:23 +0000, Brandon helsley wrote: > I don't understand your instructions for xsession entries. > My apologies for wasting you typing. Please continue to help > I'm receptive. THose are files located in your home directory, usually /home/, abbreviated with the ~ synbol. Those files start with a . ("hidden files") and are read during the X startup process. When you're using "startx" to start your X session, .xinitrc will be read. When you use xdm, after successful login it will use .xsession and ignore .xinitrc. .xinitrc ---> startx .xsession ---> xdm The idea to be more flexible, and have your X configuration in only one file, is to use a "cascading approach": If xdm is used, it reads .xsession, which "continues" as .xinitrc; all done. If you use "startx", only .xinitrc will be used; same. The _content_ of .xinitrc depends on what desktop environment you have installed, or which window manager you wish to use. In my case (and therefore the example), it's WindowMaker, plus a few custom additions. For testing, you should be fine using a simple "exec xterm" file. So start by creating the following files: First, ~/.xsession: #!/bin/csh source ~/.cshrc exec ~/.xinitrc I assume you're using FreeBSD's default login shell for dialog users, which is the C shell; if you're using bash or zsh or ksh, you need to change those entries accordingly. Then, ~/.xinitrc: exec xterm Deviation: If you do _not_ need this flexibility, ignore .xinitrc entirely, and just for testing, have exec xterm in your ~/.xsession file. But as you said (later on) you already have a .xinitrc file, let's go with the "cascading approach". This should be enough for first testing, i. e., to see if the login process works as intended. If it's successful, you will see an X terminal, nothing else, no window decorations, but that is not needed for testing. Enter "exit" or press Ctrl+d to exit the terminal - now the xdm login screen should appear again. Do _not_ test this with "root", as I mentioned, only with your user name. Now, if you see that xterm, you can manually enter "fluxbox" for further testing. Note that Fluxbox's logout function will not work as desired - it will quit Fluxbox, but you need to close the X terminal to end the X session (because that is the "controlling process" that keeps X alive). On Fri, 1 May 2020 03:28:15 +0000, Brandon helsley wrote: > I meant ttyv8 like you said. Correct. > I have xinitrc with fluxbox exec in it. Excellent! This should be fully okay (probably "exec fluxbox", maybe something before that). But as I said, xdm will not care for .xinitrc. THat is the reason for the "cascading approach". I'm using xdm here, but I have my configuration in .xinitrc. THat's why .xsession does the following: #!/bin/csh The first line tells the interpreter and the reader that this file is to be processed using the C shell. source ~/.cshrc The second line will source my shell configuration from the C shell's initialisation file for interactive shells. exec ~/.xinitrc The third line will continue execution under the name of ~/.xinitrc. >From the viewpoint of xdm, the execution control is now as follows .xsession -> .xinitrc -> window manager So if the window manager (or desktop environment) exits, the X session will be closed - exactly as desired. > What do I do with xdm to make it work? Well, xdm will read .xsession if it is present. I'm not sure if it's still required to make it executable (could be some "cargo cult"), but in worst case, try: % chmod +x ~/.xsession The permissions should then be -rwxr-xr-x. Verify with "ls -l". > I'm confused about your instructions, do I put in a line > for xdm anywhere Not needed. If you have the /etc/ttys entry, and you see the xdm login screen, everything is fine. You just have to make sure that ~/.xsession "contains the truth", i. e. possible path names are correct, and Fluxbox is installed. Also see the file ~/.xsession-errors for a possible message. On Fri, 1 May 2020 03:29:23 +0000, Brandon helsley wrote: > I don't understand your instructions for xsession entries. > My apologies for wasting you typing. Please continue to help > I'm receptive This is only needed if you wanted to be able to use both xdm and "startx" (can be useful for experimental and learning systems). If you know you will only be using xdm, it's not needed. Ignore .xinitrc, and have .xsession just contain the programs you need for your X session, typically ending in "exec " for your window manager or desktop environment. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...