all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: gebser@speakeasy.net
Subject: Re: GNU emacs locks files modified with CVS
Date: Tue, 16 Dec 2003 09:10:39 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.44.0312160849580.17914-100000@heidegger.mousecar.net> (raw)
In-Reply-To: <3FDED40F.2060503@tpd.tno.nl>


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
= 

  reply	other threads:[~2003-12-16 14:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-15 12:25 GNU emacs locks files modified with CVS Pepijn Kenter
2003-12-15 18:04 ` Kevin Rodgers
2003-12-16  9:44   ` Pepijn Kenter
2003-12-16 14:10     ` gebser [this message]
     [not found] <mailman.138.1071587578.868.help-gnu-emacs@gnu.org>
2003-12-16 14:51 ` Pepijn Kenter
2003-12-16 16:26   ` gebser
2003-12-17  6:42   ` Maurizio Loreti
2003-12-17 15:34     ` gebser
     [not found] <mailman.195.1071679031.868.help-gnu-emacs@gnu.org>
2003-12-17 16:26 ` Kevin Rodgers
2003-12-17 19:03   ` gebser
2003-12-17 16:41 ` Pepijn Kenter
2003-12-17 17:54 ` Maurizio Loreti
2003-12-18 17:19   ` Kevin Rodgers

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=Pine.LNX.4.44.0312160849580.17914-100000@heidegger.mousecar.net \
    --to=gebser@speakeasy.net \
    /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.