Closed vermiculus closed 2 years ago
Tried the following:
Started the WSL terminal (using WSL1):
emacs --daemon
exit
Then I launched another terminal and successfully launched emacsclient:
export DISPLAY=:0.0
export LIBGL_ALWAYS_INDIRECT=1
setsid emacsclient --create-frame ~ && exit
Used the --create-frame
(alias is just -c
) option to Create a new frame instead of trying to use the current Emacs frame
to make sure a frame is created.
You can probably change the line in the first script from
wsl -d Ubuntu-20.04 bash -c "export DISPLAY=$wslip`:0.0 export LIBGL_ALWAYS_INDIRECT=1 && setsid emacs"
to
wsl -d Ubuntu-20.04 bash -c "emacs --daemon"
And in the second to:
wsl -d Ubuntu-20.04 bash -c "export DISPLAY=$wslip`:0.0 export LIBGL_ALWAYS_INDIRECT=1 && setsid emacsclient -c ~"
Closing this as there was no follow up for almost a month.
Has anyone had luck getting emacsclient to work? I often switch networks, which VcXsrv does not handle well -- usually disconnecting emacs and losing in-progress work.
If I modify
wsl-2_4-*.ps1
to instead startemacs --daemon
instead ofemacs
, the daemon launches successfully:With an additional modified version of wsl-2_4-*.ps1 to start
emacsclient .
instead ofemacs
:I don't see a window (or any debugging information). Using
emacsclient -d
with the display's IP similarly has no effect.Using just
wsl emacsclient .
will launch effectively give meemacs -nw
just fine. I just can't get it to use an X display ☹️