GNU bug report logs - #14401
su - nobody -c emacs gives "Could not open file: /dev/tty"

Previous Next

Package: emacs;

Reported by: jidanni <at> jidanni.org

Date: Tue, 14 May 2013 17:31:06 UTC

Severity: minor

Tags: moreinfo

Done: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14401 in the body.
You can then email your comments to 14401 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-gnu-emacs <at> gnu.org:
bug#14401; Package emacs. (Tue, 14 May 2013 17:31:07 GMT) Full text and rfc822 format available.

Acknowledgement sent to jidanni <at> jidanni.org:
New bug report received and forwarded. Copy sent to bug-gnu-emacs <at> gnu.org. (Tue, 14 May 2013 17:31:07 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: jidanni <at> jidanni.org
To: bug-gnu-emacs <at> gnu.org
Subject: su - nobody -c emacs gives "Could not open file: /dev/tty"
Date: Wed, 15 May 2013 00:59:27 +0800
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 <at> jidanni2:/$ emacs

Also one can test with su nobody with no -.

$ apt-cache policy emacs-snapshot
emacs-snapshot:
  Installed: 2:20130510-1
  Candidate: 2:20130510-1
  Version table:
 *** 2:20130510-1 0
        500 http://emacs.naquadah.org/ unstable/ Packages
        100 /var/lib/dpkg/status




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14401; Package emacs. (Mon, 30 Sep 2019 15:54:01 GMT) Full text and rfc822 format available.

Message #8 received at 14401 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Kangas <stefan <at> marxist.se>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 14401 <at> debbugs.gnu.org
Subject: Re: bug#14401: su - nobody -c emacs gives "Could not open file:
 /dev/tty"
Date: Mon, 30 Sep 2019 17:53:10 +0200
jidanni <at> 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 <at> 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




Added tag(s) moreinfo. Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Mon, 30 Sep 2019 15:54:02 GMT) Full text and rfc822 format available.

Reply sent to 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>:
You have taken responsibility. (Tue, 01 Oct 2019 02:02:02 GMT) Full text and rfc822 format available.

Notification sent to jidanni <at> jidanni.org:
bug acknowledged by developer. (Tue, 01 Oct 2019 02:02:05 GMT) Full text and rfc822 format available.

Message #15 received at 14401-done <at> debbugs.gnu.org (full text, mbox):

From: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
To: Stefan Kangas <stefan <at> marxist.se>
Cc: 14401-done <at> debbugs.gnu.org
Subject: Re: bug#14401: su - nobody -c emacs gives "Could not open file:
 /dev/tty"
Date: Tue, 01 Oct 2019 10:01:49 +0800
OK I'll close this as it is not a common use case.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 29 Oct 2019 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 4 years and 152 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.