From owner-freebsd-questions Wed Feb 3 16:33:27 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id QAA29129 for freebsd-questions-outgoing; Wed, 3 Feb 1999 16:33:27 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from pobox.com (pern-2-180.mdm.mkt.execpc.com [169.207.90.246]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id QAA29118 for ; Wed, 3 Feb 1999 16:33:25 -0800 (PST) (envelope-from hamilton@pobox.com) Received: from pobox.com (localhost [127.0.0.1]) by pobox.com (Postfix) with ESMTP id 4CF2B46A01; Wed, 3 Feb 1999 18:33:15 -0600 (CST) To: Bill Hamilton Cc: freebsd questions Subject: Re: .profile not sourced In-reply-to: Your message of "Wed, 03 Feb 1999 16:29:03 CST." <36B8CDAF.FFDA59A4@finsco.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 03 Feb 1999 18:33:14 -0600 From: Jon Hamilton Message-Id: <19990204003315.4CF2B46A01@pobox.com> Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message <36B8CDAF.FFDA59A4@finsco.com>, Bill Hamilton wrote: } When I open an xterm, my .profile is not sourced. } I have to manually type . .env (in ksh) each time. } This may be one of those RTFM questions, but I don't see it. } } BTW, this is 3.0R, running XFCE window manager on xfree86 . } Other window managers have the same problem. } } What's the trick? /etc/profile and $HOME/.profile are sourced only if the shell is a "login shell". This is determined by whether argv[0] starts with a ``-'' or not, and whether the shell is started with the ``-l'' command line option or not (either/or will cause it to be considered a login shell). The straightforward way to get a login shell in an xterm is to start xterm with the ``-ls'' command line parameter. This is all buried in the ksh(1) and xterm(1) man pages. -- Jon Hamilton hamilton@pobox.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message