From owner-freebsd-questions@FreeBSD.ORG Fri Mar 6 02:02:36 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 9D09F106564A for ; Fri, 6 Mar 2009 02:02:36 +0000 (UTC) (envelope-from j65nko@gmail.com) Received: from mail-fx0-f158.google.com (mail-fx0-f158.google.com [209.85.220.158]) by mx1.freebsd.org (Postfix) with ESMTP id 2FB4E8FC12 for ; Fri, 6 Mar 2009 02:02:35 +0000 (UTC) (envelope-from j65nko@gmail.com) Received: by fxm2 with SMTP id 2so182036fxm.43 for ; Thu, 05 Mar 2009 18:02:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=quAgvYtoMcbIMmQV03EuguEzsT4mopmG7egdO7FicbY=; b=Mw7RTWbLld8DFEb03NNyolv02BKmwcO2CMufonWYgNBytrLz60E7eG8jSoLxKWN4K3 2WR3/CyV7QZ2xNdtv/1bftUCB1cpWLoHwcZE3I8q9wynl9XApPt5fuYJ1RNAmBl3UFhr 8klf7Tk+Qk98/9P0xrFlyUa6GOLA9ibIyaQo4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=UiebwhwuMaYsMwI0RHw3W23ECMYl9M8N0CV3EJkfDk3OM4am4gYZOH8HDdcusD8TFe aCggSfYR54Etpjbm9lxiw6NO+GX9KPjdYuwL6IHKFWcGIzAY7+R7BfYs46mKxDWiLVsi r91yHszKsvoNUCdpOulKw/DERMaxF/GfhEXpU= MIME-Version: 1.0 Received: by 10.181.206.7 with SMTP id i7mr587719bkq.126.1236303704079; Thu, 05 Mar 2009 17:41:44 -0800 (PST) In-Reply-To: <20090304150803.GA30617@marge.bs.l> References: <20090304150803.GA30617@marge.bs.l> Date: Fri, 6 Mar 2009 02:41:44 +0100 Message-ID: <19861fba0903051741t58c7c622q12bd4619eda7f4bb@mail.gmail.com> From: J65nko To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: /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: Fri, 06 Mar 2009 02:02:36 -0000 On Wed, Mar 4, 2009 at 4:08 PM, Bertram Scharpf wrote: > 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? > Put the following in a file called ".Xresources" : XTerm*loginShell: true =Adriaan=