From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <140e7ec30803262245r28c07e43hde53b899fd752127@mail.gmail.com> Date: Thu, 27 Mar 2008 14:45:25 +0900 From: sqweek To: "Fans of the OS Plan 9 from Bell Labs" <9fans@9fans.net> In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: [9fans] Where to set environments in p9p Topicbox-Message-UUID: 835651ee-ead3-11e9-9d60-3106f5b1d025 On Thu, Mar 27, 2008 at 2:20 PM, Hongzheng Wang wrote: > I have a question about the settings in p9p (plan 9 from user space), > such as setting the default font ($font). Wherever you want. The environment is not something p9p specific, and how it gets initialised in somewhat dependent on your shell, OS, and distribution. > According to the documents, $PLAN9/rcmain and $home/lib/profile are > two places to put configurations stuff, say environments etc, which > would be read by rc shell when invoked by `-l' option. But it is not > convenient if we use default shell, say Bash, instead of rc. You're right, rc is beautifully simple compared to bash. It goes something like this: bash login shell: reads /etc/profile and ~/.bash_profile bash interactive non-login shell: reads ~/.bashrc bash non-interactive non-login shell: reads nothing unless you've set BASH_ENV. If you run /bin/sh instead of /bin/bash these rules totally change. You'll find the details in bash(1) (maybe). -sqweek