1. Install SSH
WSL's Ubuntu does not seem to have an automatic SSH service, which needs to be installed:
1 | sudo apt install openssh-server |
2. Configure SSH
After the installation is complete, the SSH port can be modified:
1 | sudo sed -i '/Port /c Port 2222' /etc/ssh/sshd_config |
That is, change the port to 2222. If you are really not used to the command line, you can use the pagoda to modify it.
Reference article:
Install Pagoda 7.9.0 Enterprise Edition
https://blog.tsinbei.com/archives/293/
3. Set key login
Reference article:
4. Install the desktop environment
4.1, install X Server
First install X Server in Windows, download address:
VcXsrv Windows X Server
https://sourceforge.net/projects/vcxsrv/
The download speed is very slow, it is recommended to use the Qingbei network disk, the peak download speed is 100Mbps:
Comment first then view it after your comment is approved. Join QQ Group to display all hidden texts.
After the download is complete, click the button all the way to complete the installation, I don’t need to teach you (
4.2, install Ubuntu desktop
implement:
1 | echo "y"|sudo apt-get install ubuntu-desktop unity compizconfig-settings-manager dpkg-reconfigure dbus && service dbus restart |
Then click on X Launch on the Windows desktop:
Keep going to the next step until a black window with no title bar appears, return to WSL, enter:
1 | export DISPLAY=localhost:0 sudo ccsm |
Back to X Launch, configure:
Switch back to WSL and execute:
1 | sudo compiz |
Go back to X Launch again, done!
5. Install Chinese support
implement:
1 | sudo apt-get -y install language-pack-zh-hans |
Will
1 | export DISPLAY=localhost:0 export LANG=zh_CN.UTF-8 export LANGUAGE=zh_CN.UTF-8 export LC_ALL=zh_CN.UTF-8 |
Add to /etc/profile
and reload:
1 | source /etc/profile locale-gen |
The desktop environment will run as the root
user.
refer to
Run any Desktop Environment in WSL
https://github.com/Microsoft/WSL/issues/637
WSL Tutorial (3) Configuring SSH and Desktop Environment
Comments