From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: gebser@speakeasy.net Newsgroups: gmane.emacs.help Subject: Re: GNU emacs locks files modified with CVS Date: Tue, 16 Dec 2003 09:10:39 -0500 (EST) Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: References: <3FDED40F.2060503@tpd.tno.nl> Reply-To: gebser@speakeasy.net NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: sea.gmane.org 1071584113 17287 80.91.224.253 (16 Dec 2003 14:15:13 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2003 14:15:13 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 16 15:15:11 2003 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1AWFyg-00088S-00 for ; Tue, 16 Dec 2003 15:15:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1AWGtB-0002A5-LL for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2003 10:13:33 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1AWGsZ-00025X-JQ for help-gnu-emacs@gnu.org; Tue, 16 Dec 2003 10:12:55 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1AWGry-0001Y0-5H for help-gnu-emacs@gnu.org; Tue, 16 Dec 2003 10:12:49 -0500 Original-Received: from [216.254.0.205] (helo=mail5.speakeasy.net) by monty-python.gnu.org with esmtp (TLSv1:DES-CBC3-SHA:168) (Exim 4.24) id 1AWGrq-0001KH-LE for help-gnu-emacs@gnu.org; Tue, 16 Dec 2003 10:12:10 -0500 Original-Received: (qmail 11316 invoked from network); 16 Dec 2003 14:10:40 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO heidegger.mousecar.net) ([66.93.11.17]) (envelope-sender ) by mail5.speakeasy.net (qmail-ldap-1.03) with DES-CBC3-SHA encrypted SMTP for ; 16 Dec 2003 14:10:40 -0000 Original-To: help-gnu-emacs@gnu.org In-Reply-To: <3FDED40F.2060503@tpd.tno.nl> X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:15321 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15321 There's two ways which will keep/set the DISPLAY variable: First, if the DISPLAY variable is set in user1 and you do "su user2", then the environment of user1 will carry into user2. IOW, you're good. Second, if you, instead, do "su - user2", then you will have a fresh environment, that of user2. If user2's environment doesn't have the DISPLAY variable set properly, you can do this by setting this in user2's ~/.bashrc file... if user2's default shell is bash-- if you're using some other shell, consult the manpage for the proper file and command syntax for setting the environment. hth, ken At 10:44 (UTC+0100) on Tue, 16 Dec 2003 Pepijn Kenter said: = Kevin Rodgers wrote: = > Pepijn Kenter wrote: = > = >> When loged in as user1 type: = >> su user2 = >> emacs file.pro # edit, exit and save the changes = >> emacs file.pro # file.pro is now read only. = >> = >> I can not edit file.pro the second time because it is apperently = >> locked by user2 (as shown in the status line? of emacs). File = >> permissions are correct and the onwner of file.pro (still) is user2. = >> = >> After some googling I think the possible cause is that emacs is = >> inconsistent in the way it handles the USER and LOGNAME variables. = >> Indeed USER is set to user2 whereas LOGNAME is still user1. When I = >> change LOGNAME to user2 the problem disappears. = >> = >> So, what to do? = > = > = > If you want a login shell as user2, use `su - user2`. = > = = I'm sorry, I should have mentioned that I tried that, but then my = DISPLAY environment variable is not set so I can not use the graphical = emacs. I can, of course, set DISPLAY manually but it would be a nuisance = to do that every time I log in as user2. = = It's not quit clear to me when I should use a login shell and when not. = IMO the bash documentation only explaines the differences, not why the = different shells exist. = = I'm guessing the solution will involve tweeking my system, not my emacs = settings, so I probably should go to another newsgroup. Still, any help = from here would be appreciated. = = E.g. where is the DISPLAY variable set normally (when I log in as = user1)? I'm using debian linux. = = Pepijn Kenter. = = _______________________________________________ = Help-gnu-emacs mailing list = Help-gnu-emacs@gnu.org = http://mail.gnu.org/mailman/listinfo/help-gnu-emacs =