From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Tomas Nordin Newsgroups: gmane.emacs.help Subject: Re: How to make emacs stop trying to load /home/sb/.emacs after su to root? Date: Tue, 09 Jul 2019 21:00:11 +0200 Message-ID: <8736jf2fus.fsf@fliptop.i-did-not-set--mail-host-address--so-tickle-me> References: <864l3w18ae.fsf@dod.no> <48B6632F-49C3-4C40-A559-D839FEE11061@easesoftware.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="150180"; mail-complaints-to="usenet@blaine.gmane.org" Cc: help-gnu-emacs@gnu.org To: Perry Smith , Steinar Bang Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Jul 09 21:07:23 2019 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hkvSV-000cqa-Am for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 21:07:23 +0200 Original-Received: from localhost ([::1]:52990 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkvSU-0000WE-Bn for geh-help-gnu-emacs@m.gmane.org; Tue, 09 Jul 2019 15:07:22 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:51363) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkvLk-0003xu-Bo for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 15:00:25 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkvLg-0006Bn-9M for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 15:00:22 -0400 Original-Received: from mout01.posteo.de ([185.67.36.65]:40690) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkvLd-000679-V1 for help-gnu-emacs@gnu.org; Tue, 09 Jul 2019 15:00:18 -0400 Original-Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id B5710160060 for ; Tue, 9 Jul 2019 21:00:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1562698813; bh=q7ROsi7kNFwr+5pj5IyH4oY/GxA3MwuqEBxnYFQrbp4=; h=From:To:Cc:Subject:Date:From; b=ADhX3/XpTtARMcTzP0hWckBZ8uw1ogWTQnItnL/7CjWaHG4BxGCXBlbaG9JH5S0c7 a3N919fdYXvOvH6W4JXqMV1wSwaCz3Iz1pleGLH+7xobhg5xz1WNEnCRdmfojAxC5X qlaqfYE7QlcxPgkTdE7A6fOJlPL3wFm6QlUljyh/wGFjY282hXAH3dOU81uW/oBC9A hyUqW9xxU73dVpmlnOuuxLCD/5Va2JEVJll8bxn3bFbN5n5vi2/l6DRTBG77iXVVtN PjZwWLo0EFoYNsSYSmrNxDivzhdS7d5yg6Ke6YE7rbDHeT2EnS7DeX09U4/bZGLmnS B1WEt+Mcm9u+A== Original-Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 45js8D4F2Sz6tm9; Tue, 9 Jul 2019 21:00:12 +0200 (CEST) In-Reply-To: <48B6632F-49C3-4C40-A559-D839FEE11061@easesoftware.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 185.67.36.65 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.23 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 Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:121129 Archived-At: Perry Smith writes: >> On Jul 8, 2019, at 5:16 PM, Steinar Bang wrote: >>=20 >> debian 10.0 "buster", amd64 >> emacs 26.1 Same here but emacs 27. >>=20 >> I do /bin/su to change the user to root. HOME is set to /root >>=20 >> However emacs still tries to load /home/sb/.emacs I had the same happen here. >>=20 >> How can I make emacs stop loading the original user's .emacs when >> logged in as root? > > Can you do =E2=80=9Cid=E2=80=9D after you do the su? Usually =E2=80=9Csu= - root=E2=80=9D is the suggested method. > The =E2=80=98-=E2=80=98 causes the users environment to get loaded or som= ething. Never looked > too deep into it. After su; # id uid=3D0(root) gid=3D0(root) groups=3D0(root) After su - root; # id uid=3D0(root) gid=3D0(root) groups=3D0(root) but after this latter way of getting root emacs did not try to load /home/tomas/.emacs Just metooing Best regards -- Tomas