xiangtingsl 发表于 2023-2-8 08:08

从0到1一步一步玩转openEuler--06 openEuler XFCE 桌面环境的安装和使用

06 openEuler XFCE 桌面环境的安装和使用


06 openEuler XFCE 桌面环境的安装和使用6.1 XFCE简介6.2 XFCE安装方法6.2.1 更新软件源6.2.2 安装字库6.2.3 安装Xorg6.2.4 安装XFCE及组件6.2.5 安装登录管理器6.2.6 设置默认桌面为XFCE 启动6.2.7 使用登录管理器登录XFCE6.2.8 设置开机自启动图形界面6.2.9 重启生效6.3 XFCE图形界面6.4 问题处理

本文介绍常用的openEuler XFCE桌面环境的安装和使用方法,它提供美观易用、安全可靠的图形化操作界面,给用户带来更好的体验。
6.1 XFCE简介


XFCE是一款轻量级 Linux 桌面,当前版本已经将所有部件从 GTK2 更新到 GTK3,从D-Dbus Glib更新到GDBus,大部分组件支持Object Introspection(简称 GI,用于产生与解析 C 程序库 API 元信息,以便于动态语言(或托管语言)绑定基于 C + GObject 的程序库)。优化用户体验,加入新特性,并修补大量BUG。与其它UI界面(GNOME、KDE)相比,XFCE占用的内存和CPU使用量非常小,给用户带来亲切和高效的使用体验。

XFCE支持x86_64和aarch64两种架构。
6.2 XFCE安装方法


安装时,建议新建一个管理员用户。

前提:下载openEuler ISO镜像并已安装系统。
6.2.1 更新软件源


<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n13" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf update -y</pre>

示例命令如下:

<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n15" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf update -y
Last metadata expiration check: 0:45:19 ago on 2022年12月03日 星期六 11时09分36秒.
Dependencies resolved.
=============================================================================================================================
Package                                             Architecture    Version                           Repository       Size
=============================================================================================================================
Upgrading:
NetworkManager                                    x86_64          1:1.32.12-12.oe2203               update          2.2 M
NetworkManager-config-server                        noarch          1:1.32.12-12.oe2203               update         12 k
NetworkManager-libnm                              x86_64          1:1.32.12-12.oe2203               update          1.6 M
acl                                                 x86_64          2.3.1-2.oe2203                  update         51 k
atk                                                 x86_64          2.36.0-2.oe2203                   update          262 k
atk-devel                                           x86_64          2.36.0-2.oe2203                   update          196 k
augeas                                              x86_64          1.13.0-3.oe2203                   update          376 k
authselect                                          x86_64          1.2.4-6.oe2203                  update          189 k
bash                                                x86_64          5.1.8-6.oe2203                  update          1.2 M
bc                                                x86_64          1.07.1-11.oe2203                  update         89 k
bind-libs                                           x86_64          32:9.16.23-11.oe2203            update          1.2 M
bind-license                                        noarch          32:9.16.23-11.oe2203
.
.
.
vim-minimal-2:9.0-1.oe2203.x86_64
wayland-1.19.91-4.oe2203.x86_64                                                         wayland-devel-1.19.91-4.oe2203.x86_64                                                   words-3.0-33.oe2203.noarch
xz-5.2.5-2.oe2203.x86_64
xz-devel-5.2.5-2.oe2203.x86_64                                                         xz-libs-5.2.5-2.oe2203.x86_64
yajl-2.1.0-18.oe2203.x86_64
yum-4.10.0-7.oe2203.noarch
zlib-1.2.11-22.oe2203.x86_64
zlib-devel-1.2.11-22.oe2203.x86_64
Installed:
duktape-2.6.0-1.oe2203.x86_64            elfutils-extra-0.185-13.oe2203.x86_64   grub2-tools-efi-1:2.06-15.oe2203.x86_64
kernel-5.10.0-60.68.0.93.oe2203.x86_64

Complete!
# </pre>
6.2.2 安装字库


<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n17" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install dejavu-fonts liberation-fonts gnu--fonts google--fonts -y</pre>

示例命令如下:

<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n19" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install dejavu-fonts liberation-fonts gnu--fonts google--fonts -y
Last metadata expiration check: 2:44:53 ago on 2022年12月03日 星期六 10时39分32秒.
Package dejavu-fonts-2.37-1.oe2203.noarch is already installed.
Package liberation-fonts-1:2.00.5-4.oe2203.noarch is already installed.
Package gnu-free-mono-fonts-20120503-21.oe2203.noarch is already installed.
Package gnu-free-sans-fonts-20120503-21.oe2203.noarch is already installed.
Package gnu-free-serif-fonts-20120503-21.oe2203.noarch is already installed.
Package google-droid-sans-fonts-20200215-1.oe2203.noarch is already installed.
Package google-noto-cjk-fonts-20170602-9.oe2203.noarch is already installed.
Package google-noto-emoji-fonts-20200916-3.oe2203.noarch is already installed.
Package google-noto-sans-cjk-ttc-fonts-20170602-9.oe2203.noarch is already installed.
Package google-noto-sans-fonts-20181223-1.oe2203.noarch is already installed.
Package google-noto-serif-cjk-ttc-fonts-20170602-9.oe2203.noarch is already installed.
Dependencies resolved.
================================================================================
Package                              Arch   Version         RepositorySize
================================================================================
Installing:
google-crosextra-carlito-fonts       noarch 1.103-1.0.20130920.oe2203
everything 817 k
google-droid-kufi-fonts            noarch 20200215-1.oe2203 OS          70 k
.
.
.
google-noto-serif-malayalam-fonts-20181223-1.oe2203.noarch
google-noto-serif-myanmar-fonts-20181223-1.oe2203.noarch
google-noto-serif-myanmar-vf-fonts-20181223-1.oe2203.noarch
google-noto-serif-sc-fonts-20170602-9.oe2203.noarch
google-noto-serif-sinhala-fonts-20181223-1.oe2203.noarch
google-noto-serif-sinhala-vf-fonts-20181223-1.oe2203.noarch
google-noto-serif-tamil-fonts-20181223-1.oe2203.noarch
google-noto-serif-tamil-slanted-fonts-20181223-1.oe2203.noarch
google-noto-serif-tamil-slanted-vf-fonts-20181223-1.oe2203.noarch
google-noto-serif-tamil-vf-fonts-20181223-1.oe2203.noarch
google-noto-serif-tc-fonts-20170602-9.oe2203.noarch
google-noto-serif-telugu-fonts-20181223-1.oe2203.noarch
google-noto-serif-thai-fonts-20181223-1.oe2203.noarch
google-noto-serif-thai-vf-fonts-20181223-1.oe2203.noarch
google-noto-serif-tibetan-fonts-20181223-1.oe2203.noarch
google-noto-serif-tibetan-vf-fonts-20181223-1.oe2203.noarch
google-noto-serif-vf-fonts-20181223-1.oe2203.noarch
google-roboto-slab-fonts-1.100263-0.9.20150923git.oe2203.noarch

Complete!
# </pre>
6.2.3 安装Xorg


<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n21" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install xorg-* -y</pre>

示例命令如下:

<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n23" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install xorg-* -y
Last metadata expiration check: 0:17:53 ago on 2022年12月03日 星期六 13时37分26秒.
Package xorg-x11-proto-devel-2021.5-1.oe2203.noarch is already installed.
Dependencies resolved.
================================================================================
Package                            Arch   Version             RepositorySize
================================================================================
Installing:
xorg-x11-apps                      x86_64 7.7-23.oe2203       everything 238 k
xorg-x11-apps-debuginfo            x86_64 7.7-23.oe2203       debuginfo554 k
xorg-x11-apps-debugsource          x86_64 7.7-23.oe2203       debuginfo246 k
xorg-x11-apps-help               x86_64 7.7-23.oe2203       everything65 k
xorg-x11-drivers                   x86_64 7.7-28.oe2203       OS         7.8 k
xorg-x11-drv-ati                   x86_64 19.1.0-3.oe2203   OS         156 k
xorg-x11-drv-ati-debuginfo         x86_64 19.1.0-3.oe2203   debuginfo749 k
xorg-x11-drv-ati-debugsource       x86_64 19.1.0-3.oe2203   debuginfo222 k
xorg-x11-drv-ati-help            noarch 19.1.0-3.oe2203   everything 329 k
xorg-x11-drv-dummy               x86_64 0.3.8-1.oe2203      OS          15 k
xorg-x11-drv-dummy-debuginfo       x86_64 0.3.8-1.oe2203      debuginfo   47 k
xorg-x11-drv-dummy-debugsource   x86_64 0.3.8-1.oe2203      debuginfo   16 k
xorg-x11-drv-dummy-help            noarch 0.3.8-1.oe2203      everything17 k
xorg-x11-drv-evdev               x86_64 2.10.6-4.oe2203   OS         113 k
.
.
.
xorg-x11-xauth-help-1:1.1-1.oe2203.noarch
xorg-x11-xbitmaps-1.1.2-1.oe2203.noarch
xorg-x11-xinit-1.4.1-1.oe2203.x86_64
xorg-x11-xinit-debuginfo-1.4.1-1.oe2203.x86_64
xorg-x11-xinit-debugsource-1.4.1-1.oe2203.x86_64
xorg-x11-xinit-help-1.4.1-1.oe2203.noarch
xorg-x11-xkb-utils-7.7-30.oe2203.x86_64
xorg-x11-xkb-utils-debuginfo-7.7-30.oe2203.x86_64
xorg-x11-xkb-utils-debugsource-7.7-30.oe2203.x86_64
xorg-x11-xkb-utils-devel-7.7-30.oe2203.x86_64
xorg-x11-xkb-utils-help-7.7-30.oe2203.noarch
xorg-x11-xtrans-devel-1.4.0-1.oe2203.noarch

Complete!
# </pre>
6.2.4 安装XFCE及组件


<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n25" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install xfwm4 xfdesktop xfce4-* xfce4-*-plugin network-manager-applet *fonts -y</pre>

示例命令如下:

<pre class="md-fences md-end-block ty-contain-cm modeLoaded" spellcheck="false" lang="bash" cid="n27" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: normal; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install xfwm4 xfdesktop xfce4-* xfce4-*-plugin network-manager-applet *fonts -y
Last metadata expiration check: 0:02:19 ago on 2022年12月03日 星期六 13时56分02秒.
Package abattis-cantarell-fonts-0.301-1.oe2203.noarch is already installed.
Package xorg-x11-fonts-7.5-24.oe2203.noarch is already installed.
Dependencies resolved.
================================================================================
Package                           Arch   Version            RepositorySize
================================================================================
Installing:
bpg-algeti-fonts                  noarch 2.005-12.oe2203      OS          36 k
bpg-chveulebrivi-fonts            noarch 3.002-12.oe2203      OS          29 k
bpg-classic-fonts               noarch 8.500-12.oe2203      everything25 k
bpg-courier-fonts               noarch 4.002-12.oe2203      OS          31 k
bpg-courier-s-fonts               noarch 4.000-12.oe2203      OS          51 k
bpg-dedaena-block-fonts         noarch 3.005-12.oe2203      everything36 k
bpg-dejavu-sans-fonts             noarch 2.28-12.oe2203       everything34 k
bpg-elite-fonts                   noarch 3.000-12.oe2203      OS          35 k
bpg-excelsior-caps-fonts          noarch 2.003-12.oe2203      everything87 k
bpg-excelsior-fonts               noarch 2.03-12.oe2203       OS          24 k
bpg-glaho-fonts                   noarch 9.000-12.oe2203      OS          29 k
bpg-irubaqidze-fonts            noarch 1.000-12.oe2203      everything29 k
bpg-mikhail-stephan-fonts         noarch 2.500-12.oe2203      everything35 k
bpg-mrgvlovani-fonts            noarch 1.002-12.oe2203      everything61 k
bpg-nino-medium-fonts             noarch 4.005-12.oe2203      OS          33 k
bpg-sans-fonts                  noarch 1.005-12.oe2203      OS         122 k
bpg-sans-modern-fonts             noarch 2.025-12.oe2203      OS          34 k
bpg-serif-modern-fonts            noarch 2.028-12.oe2203      OS          44 k
bpg-ucnobi-fonts                  noarch 3.300-12.oe2203      everything35 k
.
.
.
xfce4-volumed-pulse-debugsource-0.2.3-2.oe2203.x86_64
xfce4-wavelan-plugin-0.6.2-1.oe2203.x86_64
xfce4-wavelan-plugin-debuginfo-0.6.2-1.oe2203.x86_64
xfce4-wavelan-plugin-debugsource-0.6.2-1.oe2203.x86_64
xfce4-weather-plugin-0.11.0-1.oe2203.x86_64
xfce4-weather-plugin-debuginfo-0.11.0-1.oe2203.x86_64
xfce4-weather-plugin-debugsource-0.11.0-1.oe2203.x86_64
xfce4-whiskermenu-plugin-2.5.3-1.oe2203.x86_64
xfce4-whiskermenu-plugin-debuginfo-2.5.3-1.oe2203.x86_64
xfce4-whiskermenu-plugin-debugsource-2.5.3-1.oe2203.x86_64
xfce4-xkb-plugin-0.8.2-1.oe2203.x86_64
xfce4-xkb-plugin-debuginfo-0.8.2-1.oe2203.x86_64
xfce4-xkb-plugin-debugsource-0.8.2-1.oe2203.x86_64
xfconf-4.16.0-1.oe2203.x86_64
xfconf-devel-4.16.0-1.oe2203.x86_64
xfdesktop-4.16.0-1.oe2203.x86_64
xfwm4-4.16.0-1.oe2203.x86_64
zziplib-0.13.71-3.oe2203.x86_64

Complete!
# </pre>
6.2.5 安装登录管理器


<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n29" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install lightdm lightdm-gtk -y</pre>

示例命令如下:

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n31" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># dnf install lightdm lightdm-gtk -y
Last metadata expiration check: 0:28:32 ago on 2022年12月03日 星期六 13时56分02秒.
Dependencies resolved.
================================================================================
Package                  Arch      Version               Repository   Size
================================================================================
Installing:
lightdm                  x86_64      1.30.0-13.oe2203      EPOL      193 k
lightdm-gtk                x86_64      2.0.8-1.oe2203      EPOL      123 k
Installing dependencies:
accountsservice            x86_64      0.6.55-1.oe2203       OS          113 k
gnome-themes-standard      x86_64      3.27.90-4.oe2203      OS          2.9 M
lightdm-gobject            x86_64      1.30.0-13.oe2203      EPOL         56 k
systemd-pam                x86_64      249-42.oe2203         update      200 k
Transaction Summary

Install6 Packages

Total download size: 3.5 M
Installed size: 6.3 M
Downloading Packages:
(1/6): accountsservice-0.6.55-1.oe2203.x86_64.r 553 kB/s | 113 kB   00:00
(2/6): lightdm-1.30.0-13.oe2203.x86_64.rpm      788 kB/s | 193 kB   00:00
(3/6): lightdm-gobject-1.30.0-13.oe2203.x86_64. 1.2 MB/s |56 kB   00:00
(4/6): lightdm-gtk-2.0.8-1.oe2203.x86_64.rpm    2.5 MB/s | 123 kB   00:00
(5/6): systemd-pam-249-42.oe2203.x86_64.rpm   2.2 MB/s | 200 kB   00:00
(6/6): gnome-themes-standard-3.27.90-4.oe2203.x 3.1 MB/s | 2.9 MB   00:00
<hr>
Total                                           3.8 MB/s | 3.5 MB   00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing      :                                                      1/1
Installing       : systemd-pam-249-42.oe2203.x86_64                     1/6
Installing       : gnome-themes-standard-3.27.90-4.oe2203.x86_64          2/6
Installing       : accountsservice-0.6.55-1.oe2203.x86_64               3/6
Running scriptlet: accountsservice-0.6.55-1.oe2203.x86_64               3/6
Created symlink /etc/systemd/system/graphical.target.wants/accounts-daemon.service → /usr/lib/systemd/system/accounts-daemon.service.

Installing       : lightdm-gobject-1.30.0-13.oe2203.x86_64                4/6
Running scriptlet: lightdm-1.30.0-13.oe2203.x86_64                        5/6
Installing       : lightdm-1.30.0-13.oe2203.x86_64                        5/6
Running scriptlet: lightdm-1.30.0-13.oe2203.x86_64                        5/6
Created symlink /etc/systemd/system/display-manager.service → /usr/lib/systemd/system/lightdm.service.

Running scriptlet: lightdm-gtk-2.0.8-1.oe2203.x86_64                      6/6
Installing       : lightdm-gtk-2.0.8-1.oe2203.x86_64                      6/6
Running scriptlet: lightdm-gtk-2.0.8-1.oe2203.x86_64                      6/6
Verifying      : accountsservice-0.6.55-1.oe2203.x86_64               1/6
Verifying      : gnome-themes-standard-3.27.90-4.oe2203.x86_64          2/6
Verifying      : lightdm-1.30.0-13.oe2203.x86_64                        3/6
Verifying      : lightdm-gobject-1.30.0-13.oe2203.x86_64                4/6
Verifying      : lightdm-gtk-2.0.8-1.oe2203.x86_64                      5/6
Verifying      : systemd-pam-249-42.oe2203.x86_64                     6/6

Installed:
accountsservice-0.6.55-1.oe2203.x86_64
gnome-themes-standard-3.27.90-4.oe2203.x86_64
lightdm-1.30.0-13.oe2203.x86_64
lightdm-gobject-1.30.0-13.oe2203.x86_64
lightdm-gtk-2.0.8-1.oe2203.x86_64
systemd-pam-249-42.oe2203.x86_64

Complete!
# </pre>
6.2.6 设置默认桌面为XFCE 启动


通过root权限用户设置

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n34" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># echo 'user-session=xfce' >> /etc/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf</pre>

示例命令如下:

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n36" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># echo 'user-session=xfce' >> /etc/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf
# </pre>
6.2.7 使用登录管理器登录XFCE


<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n38" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># systemctl start lightdm</pre>

登录管理器启动后,在右上角左侧选择"xfce-session" 输入用户名、密码登录

示例命令如下:

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n41" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># systemctl start lightdm
# </pre>
6.2.8 设置开机自启动图形界面


<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n43" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># systemctl enable lightdm
systemctl set-default graphical.target</pre>

示例命令如下:

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n45" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># systemctl enable lightdm
#
# systemctl set-default graphical.target
Removed /etc/systemd/system/default.target.
Created symlink /etc/systemd/system/default.target → /usr/lib/systemd/system/graphical.target.
# </pre>
6.2.9 重启生效


<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n47" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># reboot</pre>

示例命令如下:

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n49" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># reboot</pre>
6.3 XFCE图形界面


image-20221203143000259


image-20221203143130619

6.4 问题处理

异常问题:

dm登录界面背景是黑色的?
问题原因:

登录界面是黑色的是因为lghtdm-gtk默认配置文件/etc/lightdm/lightdm-gtk-greeter.conf中没有设置background。

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n62" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># grep background /etc/lightdm/lightdm-gtk-greeter.conf</pre>

示例命令如下:

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n64" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># grep background /etc/lightdm/lightdm-gtk-greeter.conf
background = Background file to use, either an image path or a color (e.g. #772953)

user-background = false|true ("true" by default)Display user background (if available)

transition-duration = Length of time (in milliseconds) to transition betweenbackground images ("500" by default)

background = overrides default value

user-background = overrides default value

background=

user-background=

# </pre>
问题解决:

在该配置文件最后的段中设置 background=/usr/share/backgrounds/xfce/xfce-blue.jpg;然后systemctl restart lightdm 就可以看到背景了。

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n69" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># vi /etc/lightdm/lightdm-gtk-greeter.conf
systemctl restart lightdm</pre>

示例命令如下:

<pre class="md-fences mock-cm md-end-block" spellcheck="false" lang="bash" cid="n71" mdtype="fences" style="box-sizing: border-box; overflow: visible; font-family: var(--monospace); font-size: 0.9em; display: block; break-inside: avoid; text-align: left; white-space: pre-wrap; background-image: inherit; background-position: inherit; background-size: inherit; background-repeat: inherit; background-attachment: inherit; background-origin: inherit; background-clip: inherit; background-color: rgb(248, 248, 248); position: relative !important; border: 1px solid rgb(231, 234, 237); border-radius: 3px; padding: 8px 4px 6px; margin-bottom: 15px; margin-top: 15px; width: inherit; color: rgb(51, 51, 51); font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration-thickness: initial; text-decoration-style: initial; text-decoration-color: initial;"># cat /etc/lightdm/lightdm-gtk-greeter.conf
LightDM GTK+ Configuration

Available configuration options listed below.

Appearance:

theme-name = GTK+ theme to use

icon-theme-name = Icon theme to use

cursor-theme-name = Cursor theme to use

cursor-theme-size = Cursor size to use

background = Background file to use, either an image path or a color (e.g. #772953)

user-background = false|true ("true" by default)Display user background (if available)

transition-duration = Length of time (in milliseconds) to transition between background images ("500" by default)

transition-type = ease-in-out|linear|none("ease-in-out" by default)

Fonts:

font-name = Font to use

xft-antialias = false|trueWhether to antialias Xft fonts

xft-dpi = Resolution for Xft in dots per inch (e.g. 96)

xft-hintstyle = none|slight|medium|hintfullWhat degree of hinting to use

xft-rgba = none|rgb|bgr|vrgb|vbgrType of subpixel antialiasing

Login window:

active-monitor = Monitor to display greeter window (name or number). Use #cursor value to display greeter at monitor with cursor. Can be a semicolon separated list

position = x y ("50% 50%" by default)Login window position

default-user-image = Image used as default user icon, path or #icon-name

hide-user-image = false|true ("false" by default)

Panel:

panel-position = top|bottom ("top" by default)

clock-format = strftime-format string, e.g. %H:%M

indicators = semi-colon ";" separated list of allowed indicator modules. Built-in indicators include "~a11y", "~language", "~session", "~power", "~clock", "~host", "~spacer". Unity indicators can be represented by short name (e.g. "sound", "power"), service file name, or absolute path

Accessibility:

a11y-states = states of accessibility features: "name" - save state on exit, "-name" - disabled at start (default value for unlisted), "+name" - enabled at start. Allowed names: contrast, font, keyboard, reader.

keyboard = command to launch on-screen keyboard (e.g. "onboard")

keyboard-position = x y[;width height] ("50%,center -0;50% 25%" by default)Works only for "onboard"

reader = command to launch screen reader (e.g. "orca")

at-spi-enabled = false|true ("true" by default) Enables accessibility at-spi-command if the greeter is built with it enabled

Security:

allow-debugging = false|true ("false" by default)

screensaver-timeout = Timeout (in seconds) until the screen blanks when the greeter is called as lockscreen

Template for per-monitor configuration:



background = overrides default value

user-background = overrides default value

laptop = false|true ("false" by default) Marks monitor as laptop display

transition-duration = overrides default value


background=/usr/share/backgrounds/xfce/xfce-blue.jpg
user-background=

theme-name=

icon-theme-name=

font-name=

xft-antialias=

xft-dpi=

xft-hintstyle=

xft-rgba=

indicators=

clock-format=

keyboard=

reader=

position=

screensaver-timeout=

#</pre>
处理后结果:

image-20221203144514243
页: [1]
查看完整版本: 从0到1一步一步玩转openEuler--06 openEuler XFCE 桌面环境的安装和使用