From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tim X Newsgroups: gmane.emacs.help Subject: Re: CVS-Emacs not reading bash environments? Date: Wed, 19 Dec 2007 18:39:35 +1100 Organization: Posted via Supernews, http://www.supernews.com Message-ID: <87odcn3zgo.fsf@lion.rapttech.com.au> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1198050124 5167 80.91.229.12 (19 Dec 2007 07:42:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 19 Dec 2007 07:42:04 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 19 08:42:15 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1J4tZD-0007zV-Nq for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Dec 2007 08:42:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1J4tYu-00082M-ED for geh-help-gnu-emacs@m.gmane.org; Wed, 19 Dec 2007 02:41:52 -0500 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!tethys.csu.net!nntp.csufresno.edu!sn-xt-sjc-02!sn-xt-sjc-01!sn-post-sjc-02!sn-post-sjc-01!supernews.com!corp.supernews.com!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) Cancel-Lock: sha1:ti6VY+OA53hum2pRyYMZYHlt39c= Original-X-Complaints-To: abuse@supernews.com Original-Lines: 60 Original-Xref: shelby.stanford.edu gnu.emacs.help:154775 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:50201 Archived-At: Sven Bretfeld writes: > Hi > > I have a strange problem. I'm running Emacs 23.0.50.1 from CVS > (Debian-Snapshot) on a Debian Etch notebook with KDE. > > Somehow Emacs doesn't recognize my default CVS repository (CVSROOT) > which is set in ~/.bashrc. > > M-x cvs-update aborts with the message: > > Repository: ????? > Module: > Working dir: ~/somedir/ > > No CVSROOT specified! Please use the `-d' option. > > The problem occurs when I start Emacs using an icon or the KDE > Startmenue or via Alt-F2. However, it works alright when I start Emacs > directly from the shell ($ emacs RET) or within the shell ($ emacs -nw > RET). > > It's also working perfectly on my other two machines which have the > same setup but run an older Emacs snapshot (22.1.50.1). > > How is it possible that Emacs doesn't read environments set in .bashrc > when started in the usual way programs are started in X? And how can I > solve the problem? > > Thanks for help > > Sven At a guess, I'd say that your X session scripts are not running as login scripts and therefore are not sourcing your .bash_profile, but KDE is configured to open shells as a login shell (and hence they do source .bash_profile). There are numerous ways to change this - 1. Change your Xsession script to be a login shell 2. Change the command executed when you click on the icon to call a wrapper script that first sources .bash_profile and then does an exec to emacs I'm running gdm and normally change the first line of the gdm Xsession script to be -login so that i know every program I execute via an icon or menu (I run sawfish, not KDE) will inherit my environment. Some will advise against this and there probably are good reasons not to do it, but I've done it this way for nearly 20 years (originally, most Xsession scripts were setup to be a login shell - not sure why/when this changed). Its possible there may be security reasons, but as most people running Linux these days are really running it as a desktop with just a single user, I don't think you need to worry about some of the so called security concerns quite as much (compared to a multi-user system with real multiple users). Tim -- tcross (at) rapttech dot com dot au