From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Pepijn Kenter Newsgroups: gmane.emacs.help Subject: Re: GNU emacs locks files modified with CVS Date: Tue, 16 Dec 2003 10:44:47 +0100 Organization: SURFnet BV Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <3FDED40F.2060503@tpd.tno.nl> References: <3FDDA843.10800@tpd.tno.nl> <3FDDF7BA.3090109@yahoo.com> Reply-To: kenter_remove_spam@tpd.tno.nl NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1071568901 20259 80.91.224.253 (16 Dec 2003 10:01:41 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 16 Dec 2003 10:01:41 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Dec 16 11:01:38 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 1AWC1K-0003Do-00 for ; Tue, 16 Dec 2003 11:01:38 +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 1AWCwW-0002Dy-CC for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Dec 2003 06:00:44 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed.icl.net!newsfeed.fjserv.net!newsfeed.esat.net!feeder2.news.heanet.ie!surfnet.nl!news.surfnet.nl!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 41 Original-NNTP-Posting-Host: tpd221025064.tpd.tno.nl Original-X-Trace: news.surfnet.nl 1071567908 25028 134.221.25.64 (16 Dec 2003 09:45:08 GMT) Original-X-Complaints-To: usenet@news.surfnet.nl Original-NNTP-Posting-Date: Tue, 16 Dec 2003 09:45:08 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1 X-Accept-Language: en Original-Xref: shelby.stanford.edu gnu.emacs.help:119367 Original-To: help-gnu-emacs@gnu.org 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:15307 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:15307 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.