Closed deisi closed 5 years ago
I haven't used arch linux, but when I searched for the error message, then these arch linux threads that are marked as [Solved] appeared: https://bbs.archlinux.org/viewtopic.php?id=230828 https://bbs.archlinux.org/viewtopic.php?id=206743
If you haven't read them already, then they might have some useful information.
Okay, I must admit, that I didn't find them sry, but on the other hand, they hop on the DISPLAY
thing I wrote about and that I had checked. However, I found out, that something in emacs is overwriting this display variable and sets it wrognly.
So i my normal shell I have:
malte@pcbonn29:~$ env | grep DISPLAY
DISPLAY=:1
But when I open spacemacs and then open a shell with: M-x shell
I get
malte@pcbonn29:~$ env | grep DISPLAY
WAYLAND_DISPLAY=wayland-0
DISPLAY=:0
And thus it doesn't work any more. I tried setting the variable within the emacs.desktop
file with:
Exec=env DISPLAY=:1 emacs %F
but I still get the same. So something overwrites this when I start emacs with spacemacs. Just to double check, I started emacs from the .desktop file with adding -Q
and then the DISPLAY
is correctly set.
I now changed the variable during runtime with:
setenv
from within emacs and then it works again. So I have a workaround, but I still wonder how and why spacemacs/myconfig changes it.
I think DISPLAY=:1
is very uncommon, so can it be that it really is a bug. Maybe spacemacs always sets it to DISPLAY=:0
and ignores the env. Because DISPLAY=:0
is correct for 99.9% of the people they have no problem.
This is what I'm seeing on the latest develop
branch with updated packages.
It's not arch linux, but it might be a useful data point.
env | grep DISPLAY
shows:
M-x shell
: DISPLAY=:0
M-x shell
shows: DISPLAY=w32
The .spacemacs.env
file (it can be opened in Spacemacs with SPC f e e
) shows:
DISPLAY=:0
in UbuntuDISPLAY=w32
in Windows 10(emacs-lisp git helm html javascript markdown multiple-cursors org
(shell :variables shell-default-shell 'eshell)
spell-checking treemacs version-control)
(autohotkey auto-completion colors emacs-lisp ess git
(go :variables go-backend 'lsp)
helm html ibuffer imenu-list javascript lsp markdown multiple-cursors org
(shell :variables shell-default-shell 'eshell)
spell-checking syntax-checking treemacs version-control)
Ah this is extremely useful, thank you so much, so I think I know what happened.
When I installed spacemacs I was using DISPLAY=:0
. After some time, I changed stuff on my arch linux box, I installed and deinstalled nvidida drivers and stuff. During this process, DISPLAY
became :1
. I actually don't know why, but okay.
So I guess this is a wont fix, because this problem is a result of the buffering of env variables that spacemacs does. I guess it is for performance reasons. The only way of preventing somebody experiencing the same might be to improve the documentation about this env
buffer. I didn't know it and while I was googeling all sorts of spacemacs and DISPLAY things I never came across this.
Adding a me too so google search will catch this. My DISPLAY
was changed to :1
also but Spacemacs always sets DISPLAY
to :0
even on recreation.
This makes restart-emacs
package fail to restart GUI Spacemacs (SPC q r
or SPC q R
...). It can restart spacemacs in terminal though.
Set DISPLAY=:1
in spacemacs.env fixed this problem.
Thanks
I get the following Issue when I try to open e.g. a pdf from dired with
!evince
Emacs Version: 26.2
Spacemacs: Git develop 1aa0af260ead9a7dfb8b84ea6246a4773bcf7eaa
environment variable of DISPLAY is set:
If I run emacs with
emacs -Q
I it works. The issue popped up after updating from a really old spacemacs version and config. Sadly I don't know what version exactly.I use the same config on another machine and don't have the issue. Both run gnome3 with arch linux. I'm out of Ideas. Anybody has a suggestion?
My config is: