美文网首页
WSL2(Ubuntu2004)+X410使用GUI界面

WSL2(Ubuntu2004)+X410使用GUI界面

作者: acooler15 | 来源:发表于2020-12-26 14:30 被阅读0次

安装xfce

1. 安装xfce4

sudo apt install xfce4

2. 设置DISPLAY变量

WSL 1:

export DISPLAY=127.0.0.1:0.0

WSL 2:

export DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2; exit;}'):0.0

3. 关闭ssh-agentgpg-agent的自动启动(可选)

xfconf-query -c xfce4-session -p /startup/ssh-agent/enabled -n -t bool -s false
xfconf-query -c xfce4-session -p /startup/gpg-agent/enabled -n -t bool -s false

4. 取消锁屏程序

使用xfce4-session启动xfce4,点击“所有系统应用”--“设置”--“会话和启动”的“应用程序自启动”中取消掉“屏幕锁”

安装输入法

这里选择用搜狗输入法(fcitx)

1. 安装fcitx

sudo apt install fcitx

2. 编写/etc/profile.d/fcitx.sh文件

sudo vim /etc/profile.d/fcitx.sh

文件内容:

#!/bin/bash
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx
export XMODIFIERS=@im=fcitx
export DefaultIMModule=fcitx

# 可选,fcitx 自启
# fcitx-autostart &>/dev/null

然后运行source /etc/profile.d/fcitx.sh设置环境变量

3. 安装输入法

下载并安装搜狗输入法或百度输入法(百度输入法可参考压缩包内的doc文档进行安装)。

如果安装过程中提示缺少相关依赖,则执行如下命令解决:sudo apt -f install

4. 运行xfce

xfce4-session

5. 启动Fcitx

若fcitx未启动,则可以点击“所有系统应用”--“系统”--“Fcitx”启动Fcitx

6. 配置Fcitx

点击“所有系统应用”--“设置”--“Fcitx设置”配置输入法

本篇文章由一文多发平台ArtiPub自动发布

相关文章

网友评论

      本文标题:WSL2(Ubuntu2004)+X410使用GUI界面

      本文链接:https://www.haomeiwen.com/subject/dikgnktx.html