How to use X Windows with Emacs on Windows 10 Bash?

后端 未结 3 980
攒了一身酷
攒了一身酷 2020-12-13 01:16

I am using the Bash on Ubuntu on Windows program to use Emacs for C++. Right now, I can code everything using the keyboard shortcuts, however, I want to select text with my

3条回答
  •  忘掉有多难
    2020-12-13 01:44

    The default emacs will work with Xming and other options. The issue is that the default alternative points to the emacs24-nox command. You need to install 'emacs24' instead, which removes emacs24-nox.

    $ sudo update-alternatives --query emacs
    Name: emacs
    Link: /usr/bin/emacs
    ....
    Status: auto
    Best: /usr/bin/emacs24-nox
    Value: /usr/bin/emacs24-nox
    
    $ sudo apt install emacs24
    
    $ sudo update-alternatives --query emacs
    Name: emacs
    Link: /usr/bin/emacs
    ...
    Status: auto
    Best: /usr/bin/emacs24-x
    Value: /usr/bin/emacs24-x
    

    Make sure that $DISPLAY is set correctly.

    export DISPLAY=localhost:0.0
    

提交回复
热议问题