From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Kangas Newsgroups: gmane.emacs.bugs Subject: bug#14401: su - nobody -c emacs gives "Could not open file: /dev/tty" Date: Mon, 30 Sep 2019 17:53:10 +0200 Message-ID: References: <8738tpjy4w.fsf@jidanni.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="260528"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 14401@debbugs.gnu.org To: =?UTF-8?Q?=E7=A9=8D=E4=B8=B9=E5=B0=BC?= Dan Jacobson Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Sep 30 17:55:45 2019 Return-path: Envelope-to: geb-bug-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 1iEy1Y-0015bF-4j for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 17:55:44 +0200 Original-Received: from localhost ([::1]:54154 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iEy1W-0000Yk-8Y for geb-bug-gnu-emacs@m.gmane.org; Mon, 30 Sep 2019 11:55:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37017) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iExzu-0007RH-OE for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 11:54:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iExzt-0000Vw-RY for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 11:54:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iExzt-0000Vq-Ok for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 11:54:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iExzt-0003ZW-Ly for bug-gnu-emacs@gnu.org; Mon, 30 Sep 2019 11:54:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: <8738tpjy4w.fsf@jidanni.org> Resent-From: Stefan Kangas Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 30 Sep 2019 15:54:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14401 X-GNU-PR-Package: emacs Original-Received: via spool by 14401-submit@debbugs.gnu.org id=B14401.156985880913632 (code B ref 14401); Mon, 30 Sep 2019 15:54:01 +0000 Original-Received: (at 14401) by debbugs.gnu.org; 30 Sep 2019 15:53:29 +0000 Original-Received: from localhost ([127.0.0.1]:60268 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iExzM-0003Xn-PK for submit@debbugs.gnu.org; Mon, 30 Sep 2019 11:53:28 -0400 Original-Received: from mail-pl1-f172.google.com ([209.85.214.172]:33873) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iExzL-0003XZ-1b for 14401@debbugs.gnu.org; Mon, 30 Sep 2019 11:53:27 -0400 Original-Received: by mail-pl1-f172.google.com with SMTP id k7so4076447pll.1 for <14401@debbugs.gnu.org>; Mon, 30 Sep 2019 08:53:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=QbhFXZRzrQuNbmU4IzLavpbHxhwFTPPO2/QyEhWmM2w=; b=FouAxvf2KyiLGkVeBn3k9BHEmEPlgCHJvsH7UGrJqLfDVvH+Qcsy5SZ5LpLdHCmMpA ez8Jry4qu+kgsCY9kWMkN5cCeIlqc3HdXmxmn7Z1xTEQL/fbPs5Tfk3tT6Qcyhbi6+L9 YncdBk2FJ8rp1Ng0O4x8CZrtjM2Oli37Ityb+aQItHmWRUojBWMHoj+O3S1oWIJh3bsx MOH69y/EOfqFh/W0RMcBUYWW9gBdn40tTAHGY2zSoMSl7TneWbRUrbSJ6WZW9FtvOxmR 8yaoa1tNWYH8s70fQX5atsIWopYBAn/tlSzKy592rgVH5Gh3XebfN3WfGK30K1KR4/3T pUow== X-Gm-Message-State: APjAAAXZDrclplqdTeg73fRMHYoTOIFnlpeZTNJzs+5Y2B3kf/BQZfBb B/g9Gd6WSTtLhUwCmgrhi5TdCKkrDRFXmpV55Jc= X-Google-Smtp-Source: APXvYqy3TNf+C8iywcdamJ00prPQfWQXT6zTe/bA5S0zbe239i3tswVM74Dv2WKIAE0LYXc5hWxVzn1p9xL5BBOQtRU= X-Received: by 2002:a17:902:a515:: with SMTP id s21mr21642482plq.259.1569858801297; Mon, 30 Sep 2019 08:53:21 -0700 (PDT) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:167916 Archived-At: jidanni@jidanni.org writes: > Odd, > > # (unset DISPLAY; su - nobody -c emacs) > No directory, logging in with HOME=/ > emacs: Could not open file: /dev/tty > > doesn't work anymore. One needs two steps, > > # (unset DISPLAY; su - nobody) > No directory, logging in with HOME=/ > nobody@jidanni2:/$ emacs > > Also one can test with su nobody with no -. I can't reproduce the recipe easily since the user nobody has no password on my machine. Is this a bug in Emacs though? To me, it seems more like some quirk of how su works in this case. Does the above work with other programs, for example "top" or something? Best regards, Stefan Kangas