Subject: su - nobody -c emacs gives "Could not open file: /dev/tty"

From: [email-masked]
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@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