From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Emacs creates emacs.d/ as root when using sudo Date: Tue, 02 Jul 2019 11:02:34 -0400 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="106087"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: emacs-devel@gnu.org To: Andreas Schwab Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jul 02 17:21:02 2019 Return-path: Envelope-to: ged-emacs-devel@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 1hiKaZ-000RGo-Ke for ged-emacs-devel@m.gmane.org; Tue, 02 Jul 2019 17:20:59 +0200 Original-Received: from localhost ([::1]:54380 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiKTU-0004Kx-Lz for ged-emacs-devel@m.gmane.org; Tue, 02 Jul 2019 11:13:40 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:57447) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hiKIt-0002b0-1X for emacs-devel@gnu.org; Tue, 02 Jul 2019 11:02:44 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hiKIq-0005Kn-Sr for emacs-devel@gnu.org; Tue, 02 Jul 2019 11:02:42 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:31083) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hiKIp-0005IG-7h for emacs-devel@gnu.org; Tue, 02 Jul 2019 11:02:39 -0400 Original-Received: from pmg1.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id 3FF16100B3B; Tue, 2 Jul 2019 11:02:37 -0400 (EDT) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg1.iro.umontreal.ca (Proxmox) with ESMTP id BD19410089B; Tue, 2 Jul 2019 11:02:35 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1562079755; bh=VFzjcOrVg/IoHJhGWi6OSsL9cZaO53gEvTe9KAd2IdU=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=GbsFuO9HX5nbU8EB9PZT4Gg6Ok8v+5zQLRMVAbvvbUpJc7zZDwGjX//+H4k+WNCy3 pih69y/lyrF2qGcMQrP2N9IQGnzFB0pkA8GEiSzGATdir9bfCWSN7nf7mvEGbISybW HB6JHiA2pNgLmi8ksIPQwQQfa/eT8+wUang5lVfweB0Xfzsn1Wcjir0/q+bOtCLsMP ThqOuAI3PSnx7aLo+JWwO/5Wt/gNmuiJ9BzGHzk5/WA/k0GdaBg99wCJkdVxrEh8qm aCGRqqRq9QLAwco4Lr20X+tO6qi5y0Xc/LId9Fc8igCDp2BT6JMkztKdNCT24RREUh EnAmNTYxptcVw== Original-Received: from pastel (76-10-151-214.dsl.teksavvy.com [76.10.151.214]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 91DCA1206C2; Tue, 2 Jul 2019 11:02:35 -0400 (EDT) In-Reply-To: (Andreas Schwab's message of "Tue, 02 Jul 2019 08:34:44 +0200") X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 132.204.25.50 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:238296 Archived-At: >>> $ sudo emacs /etc/default/motd-news >> I'd consider the above as a pilot error. >> If you use sudo naively like above, the $HOME is still that of the >> invoking user, > It's really a misconfiguration of sudo if it doesn't reset HOME. Oh, indeed, I was confusing it with `su`. That confirms it's not a problem on Emacs's side. Stefan