I am trying to launch Emacs through a keyboard shortcut on my Debian/xmonad system. Relevant lines from my xmonad.hs
:
~$ cat .xmonad/xmonad.hs
import XMonad
...
main =
xmonad =<< xmobar
(defaultConfig {modMask = mod4Mask, terminal="gnome-terminal"}
`additionalKeysP`
[ ("M-e", spawn "emacs"),
...
])
...
~$ xmonad --recompile
~$
(and even restart, I'm just proving minimal sanity here)
When I use the keyboard shortcut, nothing happens and if I inspect my .xsession-errors
I can see:
~$ tail -n1 .xsession-errors
emacs: standard input is not a tty
If I just start Emacs from the terminal I go in "terminal mode".
Finally:
~$ echo $DISPLAY
:0.0
How can I further debug this?
Further version info:
$ apt-cache policy emacs
emacs:
Installed: 46.1
Candidate: 46.1
Version table:
*** 46.1 995
995 http://ftp.se.debian.org/debian testing/main amd64 Packages
[...]
$ apt-cache policy emacs-nox
emacs-nox:
Installed: (none)
Candidate: 46.1
Version table:
46.1 995
995 http://ftp.se.debian.org/debian testing/main amd64 Packages
[...]
$ emacs --version
GNU Emacs 24.5.1
Copyright (C) 2015 Free Software Foundation, Inc.
GNU Emacs comes with ABSOLUTELY NO WARRANTY.
You may redistribute copies of Emacs
under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
xmonad
problem? If the latter, we might want to migrate you to the Linux and Unix sister site. – Dan May 04 '16 at 13:30emacs -Q
? If you've got a properly installed emacs, running the commandemacs
should start the GUI version. It looks like you do have the GUI version installed, so the fact that it is opening in 'terminal mode' suggests that maybe there's something in your config that's explicitly requesting the non-GUI version. Maybe :/ – Tyler May 05 '16 at 01:31system-configuration-options
andsystem-configuration-features
to see how your emacs was build. Just in case, trytype emacs
to see which emacs binary gets called. – YoungFrog May 05 '16 at 05:41("M-e", spawn "emacs < /dev/tty")
or whatever the appropriate way would be to write this in XMonad? – wvxvw May 05 '16 at 10:28emacs -Q
starts Emacs with a different colour scheme, but still no GUI. – aronisstav May 05 '16 at 11:15type emacs
returnsemacs is hashed (/usr/bin/emacs)
. Thesystem-configuration-options
, when viewed from the console version has a--with-x=no
, but I think that's reasonable (it's the console version after all). – aronisstav May 05 '16 at 11:19/dev/tty
was meant to get rid of the.xsession-errors
message (though not necessarily to eliminate the problem altogether). Do you still get the "input is not a tty" error after you've done that, or is it a different error? Mind you that I don't know what is the correct way to set input for XMonad version of invoking a command, maybe you need to look up its docs to figure out why it's not doing that / what should be done to do that. – wvxvw May 05 '16 at 11:48--with-x=yes
. Let's see what I can do further... – aronisstav May 05 '16 at 11:48