From owner-freebsd-questions@freebsd.org Sat May 2 07:09:42 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 C2AD22C5A7A for ; Sat, 2 May 2020 07:09:42 +0000 (UTC) (envelope-from per@hedeland.org) Received: from mailout.easydns.com (mailout.easydns.com [64.68.202.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 49DgGt0QHMz3LNy for ; Sat, 2 May 2020 07:09:41 +0000 (UTC) (envelope-from per@hedeland.org) Received: from localhost (localhost [127.0.0.1]) by mailout.easydns.com (Postfix) with ESMTP id 7A222A1421; Sat, 2 May 2020 07:09:41 +0000 (UTC) Received: from mailout.easydns.com ([127.0.0.1]) by localhost (emo13-pco.easydns.vpn [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id h6EoyvJN2p-N; Sat, 2 May 2020 07:09:41 +0000 (UTC) Received: from hedeland.org (81-228-157-209-no289.tbcn.telia.com [81.228.157.209]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mailout.easydns.com (Postfix) with ESMTPSA id 6A5FFA02D4; Sat, 2 May 2020 07:09:37 +0000 (UTC) Received: from pluto.hedeland.org (pluto.hedeland.org [10.1.1.5]) by tellus.hedeland.org (8.15.2/8.15.2) with ESMTPS id 04279ZHj016230 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NO); Sat, 2 May 2020 09:09:36 +0200 (CEST) (envelope-from per@hedeland.org) Subject: Re: Xdm var/log/xdm.log To: Polytropon Cc: Robert Huff , freebsd-questions@freebsd.org References: <20200501051811.2b24d320.freebsd@edvax.de> <20200501053836.76a32eaf.freebsd@edvax.de> <20200501060500.4a89db8b.freebsd@edvax.de> <24235.45694.473965.863585@jerusalem.litteratus.org> <20200501073326.ace7ae66.freebsd@edvax.de> <24236.3691.152243.385927@jerusalem.litteratus.org> <20200501151725.635f7b29.freebsd@edvax.de> From: Per Hedeland Message-ID: <16588249-02ee-b4a1-dbd2-1ec8972ff023@hedeland.org> Date: Sat, 2 May 2020 09:09:35 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:68.0) Gecko/20100101 Thunderbird/68.3.1 MIME-Version: 1.0 In-Reply-To: <20200501151725.635f7b29.freebsd@edvax.de> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 49DgGt0QHMz3LNy X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of per@hedeland.org has no SPF policy when checking 64.68.202.10) smtp.mailfrom=per@hedeland.org X-Spamd-Result: default: False [-0.12 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; RECEIVED_SPAMHAUS_PBL(0.00)[209.157.228.81.khpj7ygk5idzvmvt5x4ziurxhy.zen.dq.spamhaus.net : 127.0.0.11]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-0.49)[-0.494,0]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[hedeland.org]; AUTH_NA(1.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; NEURAL_HAM_MEDIUM(-0.67)[-0.665,0]; R_SPF_NA(0.00)[]; RCVD_IN_DNSWL_LOW(-0.10)[10.202.68.64.list.dnswl.org : 127.0.5.1]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16686, ipnet:64.68.200.0/22, country:CA]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(0.24)[ip: (0.22), ipnet: 64.68.200.0/22(-0.23), asn: 16686(1.29), country: CA(-0.09)]; FROM_EQ_ENVFROM(0.00)[] 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: Sat, 02 May 2020 07:09:42 -0000 On 2020-05-01 15:17, Polytropon wrote: > On Fri, 1 May 2020 07:56:27 -0400, Robert Huff wrote: >> >> Polytropon writes: >> >>> > > > Ok, I will add xsession. >>> > > >>> > > NB: .xsession (the dot is significant). >>> > > >>> > > Or you can do the following, as you said you already have >>> > > a .xinitrc (which xdm will ignore, as mentioned): >>> > > >>> > > % cp .xinitrc .xsession >>> > >>> > From my home directory: >>> > >>> > lrwxrwxr-x 1 huff huff 8 May 1 01:19 .xsession -> .xinitrc >>> > >>> > This implies you want the same environment from both. >>> >>> Will usually work, but doesn't keep C shell initialization >>> (environmental variables, aliases, settings), which might >>> not be a problem if you're not using the C shell for dialog >>> sessions or if you concentrate on GUI entirely. :-) >> >> Once I start X, I do pretty much everything within it. For the >> rest I console-switch. >> (And the first line of the file is "#! /bin/sh". :-) ) >> What is there that one might wish to do that can't be handled out >> of an xterm? > > If I remember correctly, if you use xdm, and start an X terminal > inside the X session, your settings from .cshrc will not be in > effect due to the fact that the invoked shell is not a login shell. I believe you are confusing .cshrc with .login - .cshrc is read by *every* instance of [t]csh unless the -f option is used, while .login is indeed only read by login shells (and thus pretty much useless). > So aliases don't work, environmental variables aren't set, and > so on. That's why the strange "source and continue" approach > in xdm's "user login" file. Possibly the same confusion is the reason, it doesn't serve any practical purpose. Also, the only thing that [t]csh inherits across an exec is the environment variables - aliases and shell variable settings are not inherited. FWIW, while I use tcsh as my interactive shell, both my .xsession and .xinitrc have #!/bin/sh (as all scripts should:-), and there is no mention of .cshrc (nor .tcshrc) in either. I did find one thing I wanted to do in my (normal) xdm login but not every time I do a startx for testing, and thus my .xsession is: #!/bin/sh exec ssh-agent $HOME/.xinitrc --Per