下载和安装子系统
子系统安装
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
升级子系统
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get upgrade -y && sudo apt-get dist-upgrade -y && sudo apt-get autoremove -y
远程图形界面的配置
sudo apt-get update
sudo apt-get install xorg
sudo apt-get install xfce4
sudo apt-get install xrdp
sudo sed -i 's/port=3365/port=3365/g' /etc/xrdp/xrdp.ini
sudo echo xfce4-session >~/.xsession
sudo service xrdp restart
cmd输入mstsc
计算机名填写的是 ip地址加端口,由于我这是自己电脑连接自己电脑的操作系统所以是127.0.0.1,而端口号就是上面设置的3365
用户名可以不填写,反正过一会儿要登录的,登录之后填上linux系统的账号密码就行了。
下次需要再用的时候都是需要输入
sudo service xrdp restart
的,输入完毕之后会提示端口是多少。
vcxsrv配置图形化界面
https://sourceforge.net/projects/vcxsrv/
下载完毕之后
https://sourceforge.net/projects/vcxsrv/files/vcxsrv/1.20.1.4/vcxsrv-64.1.20.1.4.installer.exe/download
输入
echo "export DISPLAY=localhost:0.0" >> ~/.bashrc
输入 . ~/.bashrc
安装x11
sudo apt-get install x11-apps
输入xeyes
运行此程序。
如果能看到一个眼睛,说明是正常的启动了一个图形界面。
输入
输入
sudo apt-get install ubuntu-desktop unity compizconfig-settings-manager
再运行这个下载好的桌面配置工具
ccsm
(这是linux上的东西,必须先打开Xlauncher才行)
配置一个要下载的东西
输入compiz
启动默认ubuntu桌面
https://blog.csdn.net/li528405176/article/details/82263534
这里切记一定要在window上打开XLaunch.exe安装配置,
如果没有启动会出现类似这样的错误
root@UE7FM289JKRM95R:/mnt/c/Users/Administrator# ccsm
/usr/lib/python2.7/dist-packages/gtk-2.0/gtk/__init__.py:57: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
Traceback (most recent call last):
File "/usr/bin/ccsm", line 94, in <module>
import ccm
File "/usr/lib/python2.7/dist-packages/ccm/__init__.py", line 1, in <module>
from ccm.Conflicts import *
File "/usr/lib/python2.7/dist-packages/ccm/Conflicts.py", line 26, in <module>
from ccm.Constants import *
File "/usr/lib/python2.7/dist-packages/ccm/Constants.py", line 30, in <module>
CurrentScreenNum = gtk.gdk.display_get_default().get_default_screen().get_number()
AttributeError: 'NoneType' object has no attribute 'get_default_screen'
ccsm linux界面
另外一种方式配置图形界面
https://sourceforge.net/projects/xming/
安装完毕后输入
sudo apt-get install vim-gtk
切换显示
export DISPLAY =:0
试试图形化启动vgim
GVIM
启动gedit
gedit
合并步骤
DISPLAY =:0 gvim
最后吐槽
个人还是喜欢远程控制的那种,这些都感觉非常别扭。
命令安装deb包 ,这个因为图形界面双击打开发现没作用。
安装浏览器
sudo apt-get install --assume-yes firefox firefox-locale-zh-hans
https://blog.csdn.net/weixin_39933336/article/details/116849777
更换源
vi /etc/apt/sources.list
拷贝如下代码
# deb cdrom:[Ubuntu 16.04 LTS _Xenial Xerus_ - Release amd64 (20160420.1)]/ xenial main restricted
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
https://blog.csdn.net/clouderpig/article/details/77574180
火狐浏览器中文乱码解决
https://www.apull.net/html/20200604102131.html