From owner-freebsd-questions@FreeBSD.ORG Mon Apr 11 08:12:29 2005 Return-Path: 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 E4FD616A4CE for ; Mon, 11 Apr 2005 08:12:28 +0000 (GMT) Received: from hosea.tallye.com (joel.tallye.com [216.99.199.78]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4D4FB43D54 for ; Mon, 11 Apr 2005 08:12:28 +0000 (GMT) (envelope-from lorenl@alzatex.com) Received: from hosea.tallye.com (hosea.tallye.com [127.0.0.1]) by hosea.tallye.com (8.12.8/8.12.10) with ESMTP id j3B8CQnx017060 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 11 Apr 2005 01:12:27 -0700 Received: (from sttng359@localhost) by hosea.tallye.com (8.12.8/8.12.8/Submit) id j3B8CPmg017058; Mon, 11 Apr 2005 01:12:26 -0700 Date: Mon, 11 Apr 2005 01:12:25 -0700 From: "Loren M. Lang" To: Kiffin Gish Message-ID: <20050411081225.GB4192@alzatex.com> References: <000f01c53cdf$b8242fc0$9900000a@ZGISH> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="4SFOXa2GPu3tIq4H" Content-Disposition: inline In-Reply-To: <000f01c53cdf$b8242fc0$9900000a@ZGISH> User-Agent: Mutt/1.4.1i X-GPG-Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc X-GPG-Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C cc: freebsd-questions@freebsd.org Subject: Re: Loading .bash_profile under X-Windows X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Apr 2005 08:12:29 -0000 --4SFOXa2GPu3tIq4H Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Apr 09, 2005 at 10:40:01AM +0200, Kiffin Gish wrote: > How can I get terminal under X-Windows to load my .bash_profile (and any > other stuff) that is usually loaded when at the initial prompt? >=20 > A more general question might be: what files (.profile, .login, whatever) > and in what order are loaded every I login via a shell and how are these > settings propagated up through Gnome desktop? =2Ebash_profile, .profile, .login are read on login shells only. When a shell is invoked by the exec() syscall, it's name is prepended with a - to mean it's a login shell and most shells work differently like reading =2Eprofile. For example running ps ax|grep bash on my system yields: =2E.. 81288 q1 Is 0:00.02 bash 88710 q3 Is 0:00.03 -bash (bash) =2E.. The first shell was just started normally and the second was started as a login shell. Connecting to a machine through ssh or logging in on a text console starts a login shell, but running an xterm in X-Windows or running bash from whatever shell your already in isn't since your already logged in. If you start X-Windows with the startx command, your login is considered when you first logged in on the text console and that same environment is propagated to the gui environment, gnome in your case. When you log in from a graphical log in utility, it's a little more complicated. The gui login program, whether it be xdm, gdm, or kdm starts a shell script which eventually starts your gui environment. The problem is that it's not usually the same as your login shell, but whatever shell was used to write the script. In some cases you can write your own shell script called .xsession or .Xclients in your home directory and it can load in .bash_profile and then start gnome. >=20 > Thanks a lot in advance.=20 >=20 > --=20 >=20 > Kiffin Rex Gish > Gouda, The Netherlands >=20 > =20 >=20 >=20 > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" --=20 I sense much NT in you. NT leads to Bluescreen. Bluescreen leads to downtime. Downtime leads to suffering. NT is the path to the darkside. Powerful Unix is. Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc Fingerprint: CEE1 AAE2 F66C 59B5 34CA C415 6D35 E847 0118 A3D2 =20 --4SFOXa2GPu3tIq4H Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQFCWjFpbTXoRwEYo9IRAnHwAJ43C9RKPEetMZYbjGrnADN/IJnDTQCeMT+J AlhorNw58CWjDZmJAcj8d4Q= =0Jra -----END PGP SIGNATURE----- --4SFOXa2GPu3tIq4H--