From owner-freebsd-questions@FreeBSD.ORG Tue Dec 17 23:56:08 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id C53414D4 for ; Tue, 17 Dec 2013 23:56:08 +0000 (UTC) Received: from mail-ob0-x235.google.com (mail-ob0-x235.google.com [IPv6:2607:f8b0:4003:c01::235]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 89898199F for ; Tue, 17 Dec 2013 23:56:08 +0000 (UTC) Received: by mail-ob0-f181.google.com with SMTP id uy5so6975535obc.26 for ; Tue, 17 Dec 2013 15:56:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:references:from:content-type:in-reply-to:message-id:date:to :content-transfer-encoding:mime-version; bh=toYKMQswDgpXeK4ivBonzNOEF2prHRAYwsHE0Zi6o+4=; b=Tq3HJlBfM2PAPND3ikFVhApYCmnIgcOK0baU4LchPHIVhA6m9Z+CaA07EpgO3BLjpl rCSbaRZhj34nmkiaPyAueBzGc/yVIJUc661JBJBZjh9CCDROFfI6nyfhu0Epdvaqn/Xs FYd/WDF+bP+7+ZAqxdVL4tlxTtqVC29neOSFi9Ouf8aVEuYZU7o0A94R1tSZn2hK1lHH ggFec/OjAimxwSBl5Q/nf+TdvxUO+rInV14+K/EICPanZOMubrxfAAM+NF+YwEX+5Kva YcvrZIJwWoxg8z6GuEayRyYsJNWDgkUW3kyzO4sKBOQuL7X0FeZ/0T5pPV06CGolZg4k m1ew== X-Received: by 10.60.142.8 with SMTP id rs8mr18378691oeb.34.1387324567776; Tue, 17 Dec 2013 15:56:07 -0800 (PST) Received: from [192.168.1.64] (pool-71-164-130-72.dllstx.fios.verizon.net. [71.164.130.72]) by mx.google.com with ESMTPSA id fz6sm28284396obb.3.2013.12.17.15.56.07 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 17 Dec 2013 15:56:07 -0800 (PST) Subject: Re: System Wide Bash Login Script References: From: Matthew Pherigo Content-Type: text/plain; charset=us-ascii X-Mailer: iPad Mail (11B554a) In-Reply-To: Message-Id: Date: Tue, 17 Dec 2013 17:56:07 -0600 To: Drew Tomlinson , "freebsd-questions@freebsd.org" Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Dec 2013 23:56:08 -0000 Hi Drew! Believe it or not, systemwide bashrc sourcing isn't actually built-in to bas= h by default (though in my opinion, it should be). This behavior of global c= onfig sourcing actually comes from default /etc/profile files that come with= Linux distros. Since FreeBSD uses csh/tcsh by default, of course, it comes w= ith no such thing. However, it's fairly easy to add. The following snippet o= f code goes into your /etc/profile: if [ "$PS1" ]; then if [ "$BASH" ] && [ "$BASH" !=3D "/bin/sh" ]; then if [ -f /usr/local/etc/bash.bashrc ]; then =00=00=00=00=00=00. /usr/local/etc/bash.bashrc fi fi fi If the shell is interactive, is a bash shell, and the file /usr/local/etc/ba= sh.bashrc exists, it sources it. This is the snippet of code I use; I think it was originally from Debian.=20= --Matt > On Dec 17, 2013, at 5:28 PM, Drew Tomlinson wrot= e: >=20 > I'm trying to figure out where the system wide bash login script should be= for FBSD 9.2. I've tried /etc/profile, /usr/local/etc/profile, and I even f= ound reference to creating a .bashrc file in home directories, testing for /= usr/local/etc/profile, and then calling it if it exists. None of this seems= to work. However if I paste the contents into a shell after logging in, I g= et the expected behavior. >=20 > What am I missing? >=20 > Thanks, >=20 > Drew > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.or= g"