all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Tim X <timx@nospam.dev.null>
To: help-gnu-emacs@gnu.org
Subject: Re: CVS-Emacs not reading bash environments?
Date: Wed, 19 Dec 2007 18:39:35 +1100	[thread overview]
Message-ID: <87odcn3zgo.fsf@lion.rapttech.com.au> (raw)
In-Reply-To: mailman.5170.1198007379.18990.help-gnu-emacs@gnu.org

Sven Bretfeld <sven.bretfeld@gmx.ch> 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

       reply	other threads:[~2007-12-19  7:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.5170.1198007379.18990.help-gnu-emacs@gnu.org>
2007-12-19  7:39 ` Tim X [this message]
2007-12-18 19:49 CVS-Emacs not reading bash environments? Sven Bretfeld
2007-12-18 22:12 ` Andrea Vettorello

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87odcn3zgo.fsf@lion.rapttech.com.au \
    --to=timx@nospam.dev.null \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.