From owner-freebsd-questions@FreeBSD.ORG Tue Jun 14 14:09:32 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BBE9C16A41C for ; Tue, 14 Jun 2005 14:09:32 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.FreeBSD.org (Postfix) with ESMTP id 79F5543D1D for ; Tue, 14 Jun 2005 14:09:32 +0000 (GMT) (envelope-from list-freebsd-2004@morbius.sent.com) Received: from frontend3.messagingengine.com (frontend3.internal [10.202.2.152]) by frontend1.messagingengine.com (Postfix) with ESMTP id 085D8CA524E for ; Tue, 14 Jun 2005 10:09:31 -0400 (EDT) X-Sasl-enc: mbccb3lQTChw9Oi4GeZV7gPd32lQHFhgzuDFNJ8QjFiy 1118758170 Received: from gumby.localdomain (dsl-80-41-77-167.access.as9105.com [80.41.77.167]) by frontend3.messagingengine.com (Postfix) with ESMTP id 86007AE for ; Tue, 14 Jun 2005 10:09:28 -0400 (EDT) From: RW To: freebsd-questions@freebsd.org Date: Tue, 14 Jun 2005 15:09:27 +0100 User-Agent: KMail/1.8 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200506141509.27301.list-freebsd-2004@morbius.sent.com> Subject: KDM and .bash_profile problem 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: Tue, 14 Jun 2005 14:09:32 -0000 I think it used to be the case that if you used kdm to login, then .bash_profile would not get sourced by bash (because it's not a login shell). However it appears that the Xsession script in /usr/local/share/config/kdm now sources .bash_profile explicitly if bash is your shell. My problem is that when .bash_profile is sourced this way, I only pick-up environmental variables, and any aliases or bash functions don't work. They work as expected when I login via a virtual-terminal, so I don't think it is my script. For those who don't have kdm, this is the Xsession file: -------------------------------------------------------------------------- #! /bin/sh # Xsession - run as user session=$1 # Note that the respective logout scripts are not sourced. case $SHELL in */bash) [ -z "$BASH" ] && exec $SHELL $0 "$@" set +o posix [ -f /etc/profile ] && . /etc/profile if [ -f $HOME/.bash_profile ]; then . $HOME/.bash_profile elif [ -f $HOME/.bash_login ]; then . $HOME/.bash_login elif [ -f $HOME/.profile ]; then . $HOME/.profile fi ;; # ...OTHER SHELL CASE ENTRIES SNIPPED # esac [ -f /etc/xprofile ] && . /etc/xprofile [ -f $HOME/.xprofile ] && . $HOME/.xprofile case $session in "") exec xmessage -center -buttons OK:0 -default OK "Sorry, $DESKTOP_SESSION is no valid session." ;; failsafe) exec xterm -geometry 80x24-0-0 ;; custom) exec $HOME/.xsession ;; default) exec /usr/local/bin/startkde ;; *) eval exec "$session" ;; esac exec xmessage -center -buttons OK:0 -default OK "Sorry, cannot execute $session. Check $DESKTOP_SESSION.desktop." --------------------------------------------------------------------------