From owner-freebsd-questions@FreeBSD.ORG Wed Mar 4 15:08:05 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EE03E106566B for ; Wed, 4 Mar 2009 15:08:05 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.171]) by mx1.freebsd.org (Postfix) with ESMTP id 84A518FC08 for ; Wed, 4 Mar 2009 15:08:05 +0000 (UTC) (envelope-from lists@bertram-scharpf.de) Received: from marge.bs.l (e180035035.adsl.alicedsl.de [85.180.35.35]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1LeshY1Ruv-0000uz; Wed, 04 Mar 2009 16:08:04 +0100 Received: from bsch by marge.bs.l with local (Exim 4.69) (envelope-from ) id 1LeshX-00080l-TF for freebsd-questions@freebsd.org; Wed, 04 Mar 2009 16:08:03 +0100 Date: Wed, 4 Mar 2009 16:08:03 +0100 From: Bertram Scharpf To: freebsd-questions@freebsd.org Message-ID: <20090304150803.GA30617@marge.bs.l> Mail-Followup-To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Sender: Bertram Scharpf X-Provags-ID: V01U2FsdGVkX1/rgCl0A5AmNciDHHadl0suT68D+lvjFi8CbmX XmERWnuTiD58n4btA17P2ZtjUul0wFVRqK4VhjmvZ3kziI2Hzs /o79Dz6aiL9FqZO0znSQhZPDBmRsnEuFFby0muKiV8= Subject: /bin/sh does not read profile X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Mar 2009 15:08:06 -0000 Hi, from "man sh": Invocation [...] When first starting, the shell inspects argument 0, and if it begins with a dash (`-'), the shell is also consid- ered a login shell. This is normally done automatically by the system when the user first logs in. A login shell first reads commands from the files /etc/profile and then .profile in a user's home directory, if they exist. [...] I use Slim (X login manager) which calls exec /bin/sh - ~/.xinitrc I first wondered why none of my commands in "/etc/profile" and "~/.profile" got executed. Finally, I modified "/usr/src/bin/sh/main.c" to trace what files are read, recompiled the "sh" command and: the only file that is executed is "~/.shrc". I just cannot believe that FreeBSD has such a severe bug. What is going wrong here? Thanks in advance, Bertram -- Bertram Scharpf Stuttgart, Deutschland/Germany http://www.bertram-scharpf.de