Windows10-Linux18.04子系统:界面可视化及CMake配置笔记

参考资料

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360003413779-Troubles-with-WSL-toolchain-Test-CMake-run-finished-with-errors-
https://blog.csdn.net/langliu/article/details/80277309
https://blog.csdn.net/weixin_38169562/article/details/99804798


方法

1 安装可视界面:建议完全按照第二个参考链接的方法,此处只是备份一下。

安装必要依赖库

sudo apt-get install xfce4 vnc4server xrdp -y

第一次启动vncserver(xstartup第一次配置后才会生成)

vncserver  :1
vncserver  -kill :1

配置xstartup文件

unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
vncconfig -iconic &
xfce4-session &
————————————————
版权声明:本文为CSDN博主「langliu」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/langliu/article/details/80277309

重启

sudo vncserver -kill :1    #杀死关闭vncserver
vncserver          #vncserver再次重启
sudo service xrdp restart     #重新启动xrdp

修正Windows Linux子系统的编译错误

问题在使用CMake编译项目时遇到,如下:

CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineSystem.cmake:186 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- The C compiler identification is GNU 7.3.0
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCCompiler.cmake:192 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)


-- The CXX compiler identification is GNU 7.3.0
CMake Error at /usr/share/cmake-3.10/Modules/CMakeDetermineCXXCompiler.cmake:190 (configure_file):
configure_file Problem configuring file
Call Stack (most recent call first):
CMakeLists.txt:1 (project)

....

新建wsl.conf文件

sudo vim /etc/wsl.conf

文件内容为:

# /etc/wsl.conf
[automount]
options = "metadata"
enabled = true

重启子系统

Using CMD (Administrator)

net stop LxssManager
net start LxssManager

你可能感兴趣的:(Ubuntu使用记录)