openEuler 24.03 LTS 配置 XFCE 桌面环境 | IT运维网
  • 本站启用了账户登录密码错误就锁定模式,如有人误操作被锁请邮件(yvan.lu@ityww.cn)告知我账户名。
  • 本站为个人技术性站点,上面会更新一些系统、网络、存储、虚拟化及云计算等相关的文章,与大家一起参考、学习和交流。
  • 欢迎访问本网站;本站QQ交流群:654792529;如果您觉得本站非常有看点,那么赶紧使用Ctrl+D收藏吧!

openEuler 24.03 LTS 配置 XFCE 桌面环境

国产系列 yvan 4周前 (02-27) 256次浏览 已收录 0个评论

一、配置三方Mirror源

官方源有时会有不稳定现象,建议配置三方Mirror源,配置方法参考如下文章:

openEuler 24.03-LTS 配置三方Mirror源

一、说明 官方源有时会有不稳定现象 二、配置Mirror 1、备份源文件:cp /etc/yum.repos. […]

二、配置 XFCE

1、升级系统:dnf update -y

[root@openeuler ~]# dnf update -y
Last metadata expiration check: 0:10:48 ago on Thu 27 Feb 2025 04:39:57 PM CST.
Dependencies resolved.
=====================================================================================================
 Package                            Architecture Version                      Repository        Size
=====================================================================================================
Upgrading:
 NetworkManager                     x86_64       1:1.44.2-3.oe2403            update           2.0 M
......此处省略......
 iptables-nft                       x86_64       1.8.9-3.oe2403               everything       131 k

Transaction Summary
=====================================================================================================
Install    3 Packages
Upgrade  157 Packages

Total download size: 537 M
Downloading Packages:
(1/160): iptables-nft-1.8.9-3.oe2403.x86_64.rpm                      526 kB/s | 131 kB     00:00
......此处省略......
(160/160): linux-firmware-20240811-1.oe2403.noarch.rpm               9.5 MB/s | 247 MB     00:25
-----------------------------------------------------------------------------------------------------
Total                                                                 12 MB/s | 537 MB     00:44
everything                                                            20 kB/s | 3.0 kB     00:00
Importing GPG key 0xB675600B:
 Userid     : "openeuler <openeuler@compass-ci.com>"
 Fingerprint: 8AA1 6BF9 F2CA 5244 010D CA96 3B47 7C60 B675 600B
 From       : https://mirrors.huaweicloud.com/openeuler/openEuler-24.03-LTS/everything/x86_64/RPM-GPG-KEY-openEuler
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: filesystem-3.16-6.oe2403.x86_64                                             1/1
......此处省略......
  Running scriptlet: systemd-udev-255-35.oe2403.x86_64                                       318/318
  Verifying        : iptables-nft-1.8.9-3.oe2403.x86_64                                        1/318
......此处省略......
  Verifying        : yum-4.16.2-3.oe2403.noarch                                              318/318

Upgraded:
  NetworkManager-1:1.44.2-3.oe2403.x86_64
......此处省略......
  yum-4.16.2-6.oe2403.noarch
Installed:
  grub2-tools-efi-1:2.12-31.oe2403.x86_64             iptables-nft-1.8.9-3.oe2403.x86_64
  kernel-6.6.0-78.0.0.71.oe2403.x86_64

Complete!

因为含有Kernel版本升级,建议重启下系统。

2、安装字库:dnf install -y dejavu-fonts liberation-fonts gnu-*-fonts google-*-fonts

[root@openeuler ~]# dnf install -y dejavu-fonts liberation-fonts gnu-*-fonts google-*-fonts
Last metadata expiration check: 0:04:45 ago on Thu 27 Feb 2025 04:52:31 PM CST.
Package google-droid-sans-fonts-20200215-1.oe2403.noarch is already installed.
Dependencies resolved.
=====================================================================================================
 Package                                       Arch   Version                       Repository  Size
=====================================================================================================
Installing:
 dejavu-fonts                                  noarch 2.37-3.oe2403                 update     4.9 M
......此处省略......
 liberation-fonts                              noarch 1:2.1.5-1.oe2403              OS         1.6 M
Installing dependencies:
 gnu-free-fonts-common                         noarch 20120503-21.oe2403            OS         128 k
 google-noto-fonts-common                      noarch 20181223-2.oe2403             everything  14 k

Transaction Summary
=====================================================================================================
Install  259 Packages

Total download size: 1.4 G
Installed size: 2.2 G
Downloading Packages:
(1/259): gnu-free-fonts-common-20120503-21.oe2403.noarch.rpm         614 kB/s | 128 kB     00:00
......此处省略......
(259/259): google-noto-serif-sc-fonts-20170602-11.oe2403.noarch.rpm  5.5 MB/s |  56 MB     00:10
-----------------------------------------------------------------------------------------------------
Total                                                                 12 MB/s | 1.4 GB     02:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                             1/1
  Installing       : google-noto-fonts-common-20181223-2.oe2403.noarch                         1/259
......此处省略......
  Running scriptlet: google-droid-kufi-fonts-20200215-1.oe2403.noarch                        259/259
  Verifying        : gnu-free-fonts-common-20120503-21.oe2403.noarch                           1/259
......此处省略......
  Verifying        : dejavu-fonts-2.37-3.oe2403.noarch                                       259/259

Installed:
  dejavu-fonts-2.37-3.oe2403.noarch
......此处省略......
  liberation-fonts-1:2.1.5-1.oe2403.noarch

Complete!

3、安装Xorg:dnf install -y xorg-*

[root@openeuler ~]# dnf install -y xorg-*
Last metadata expiration check: 0:11:46 ago on Thu 27 Feb 2025 04:52:31 PM CST.
Package xorg-x11-font-utils-1:7.5-44.oe2403.x86_64 is already installed.
Package xorg-x11-fonts-7.5-25.oe2403.noarch is already installed.
Package xorg-x11-utils-7.5-31.oe2403.x86_64 is already installed.
Dependencies resolved.
=====================================================================================================
 Package                                   Arch        Version                 Repository       Size
=====================================================================================================
Installing:
 xorg-x11-apps                             x86_64      7.7-23.oe2403           everything      242 k
......此处省略......
 zlib-devel                                x86_64      1.2.13-2.oe2403         OS               91 k

Transaction Summary
=====================================================================================================
Install  162 Packages

Total download size: 102 M
Installed size: 366 M
Downloading Packages:
(1/162): bzip2-devel-1.0.8-7.oe2403.x86_64.rpm                       177 kB/s |  37 kB     00:00
......此处省略......
(162/162): xorg-x11-server-source-1.20.11-34.oe2403.noarch.rpm       399 kB/s | 2.4 MB     00:06
-----------------------------------------------------------------------------------------------------
Total                                                                4.1 MB/s | 102 MB     00:24
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                             1/1
  Installing       : libXfont2-2.0.6-1.oe2403.x86_64                                           1/162
......此处省略......
  Running scriptlet: xorg-x11-fonts-others-7.5-25.oe2403.noarch                              162/162
  Verifying        : SDL-1.2.15-40.oe2403.x86_64                                               1/162
......此处省略......
  Verifying        : xorg-x11-server-source-1.20.11-34.oe2403.noarch                         162/162

Installed:
  SDL-1.2.15-40.oe2403.x86_64
......此处省略......
  zlib-devel-1.2.13-2.oe2403.x86_64

Complete!

4、安装XFCE及组件:dnf install -y xfwm4 xfdesktop xfce4-* xfce4-*-plugin network-manager-applet *fonts

[root@openeuler ~]# dnf install -y xfwm4 xfdesktop xfce4-* xfce4-*-plugin network-manager-applet *fonts
Last metadata expiration check: 0:15:12 ago on Thu 27 Feb 2025 04:52:31 PM CST.
Package dejavu-fonts-2.37-3.oe2403.noarch is already installed.
......此处省略......
Package xorg-x11-fonts-7.5-25.oe2403.noarch is already installed.
Dependencies resolved.
=====================================================================================================
 Package                                  Arch    Version                          Repository   Size
=====================================================================================================
Installing:
 R-sysfonts                               x86_64  0.8.3-1.oe2403                   everything  863 k
......此处省略......
 xdg-desktop-portal-gtk                   x86_64  1.14.1-1.oe2403                  EPOL        150 k

Transaction Summary
=====================================================================================================
Install  756 Packages

Total download size: 888 M
Installed size: 2.9 G
Downloading Packages:
(1/756): abattis-cantarell-fonts-0.303.1-3.oe2403.noarch.rpm         479 kB/s | 113 kB     00:00
......此处省略......
(756/756): webkit2gtk3-2.38.2-9.oe2403.x86_64.rpm                    6.8 MB/s |  19 MB     00:02
-----------------------------------------------------------------------------------------------------
Total                                                                 10 MB/s | 888 MB     01:28
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Running scriptlet: texlive-base-9:20210325-8.oe2403.x86_64                                     1/1
  Preparing        :                                                                             1/1
  Running scriptlet: texlive-base-9:20210325-8.oe2403.x86_64                                   1/756
......此处省略......
  Running scriptlet: desktop-file-utils-0.27-2.oe2403.x86_64                                 756/756
  Verifying        : ModemManager-glib-1.22.0-2.oe2403.x86_64                                  1/756
......、此处省略......
  Verifying        : zziplib-0.13.72-4.oe2403.x86_64                                         756/756

Installed:
  ModemManager-glib-1.22.0-2.oe2403.x86_64
......此处省略......
  zziplib-0.13.72-4.oe2403.x86_64

Complete!

5、安装登录管理器:dnf install -y lightdm lightdm-gtk

[root@openeuler ~]# dnf install -y lightdm lightdm-gtk
Last metadata expiration check: 0:43:05 ago on Thu 27 Feb 2025 04:52:31 PM CST.
Dependencies resolved.
=====================================================================================================
 Package                          Architecture    Version                      Repository       Size
=====================================================================================================
Installing:
 lightdm                          x86_64          1.30.0-14.oe2403             EPOL            190 k
......此处省略......
 adwaita-gtk2-theme               x86_64          3.28-1.oe2403                EPOL            130 k

Transaction Summary
=====================================================================================================
Install  8 Packages

Total download size: 3.6 M
Installed size: 6.6 M
Downloading Packages:
(1/8): adwaita-gtk2-theme-3.28-1.oe2403.x86_64.rpm                   530 kB/s | 130 kB     00:00
......此处省略......
(8/8): lightdm-1.30.0-14.oe2403.x86_64.rpm                            57 kB/s | 190 kB     00:03
-----------------------------------------------------------------------------------------------------
Total                                                                975 kB/s | 3.6 MB     00:03
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                                             1/1
  Installing       : highcontrast-icon-theme-3.28-1.oe2403.noarch                                1/8
......此处省略......
  Running scriptlet: highcontrast-icon-theme-3.28-1.oe2403.noarch                                8/8
  Verifying        : accountsservice-23.13.9-1.oe2403.x86_64                                     1/8
......此处省略......
  Verifying        : systemd-pam-255-35.oe2403.x86_64                                            8/8

Installed:
  accountsservice-23.13.9-1.oe2403.x86_64        adwaita-gtk2-theme-3.28-1.oe2403.x86_64
  gnome-themes-extra-3.28-1.oe2403.x86_64        highcontrast-icon-theme-3.28-1.oe2403.noarch
  lightdm-1.30.0-14.oe2403.x86_64                lightdm-gobject-1.30.0-14.oe2403.x86_64
  lightdm-gtk-2.0.8-2.oe2403.x86_64              systemd-pam-255-35.oe2403.x86_64

Complete!

6、设置默认桌面为XFCE 通过root权限用户设置:echo ‘user-session=xfce’ >> /etc/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf

[root@openeuler ~]# echo 'user-session=xfce' >> /etc/lightdm/lightdm.conf.d/60-lightdm-gtk-greeter.conf

7、配置登录背景:修改lightdm-gtk默认配置文件(/etc/lightdm/lightdm-gtk-greeter.conf)最后的[greeter]段中增加“ background=/usr/share/backgrounds/xfce/xfce-blue.jpg”
openEuler 24.03 LTS 配置 XFCE 桌面环境

如果是单独配置的需执行命令(systemctl restart lightdm)就生效可以看到背景了。

8、启动XFCE登录管理器:systemctl start lightdm

[root@openeuler ~]# systemctl start lightdm

9、使用登录管理器登录XFCE:确保右上角左侧选择了”xfce-session”,输入用户名和密码后点击“Login”登录。
openEuler 24.03 LTS 配置 XFCE 桌面环境
openEuler 24.03 LTS 配置 XFCE 桌面环境
10、设置开机自启动图形界面:systemctl enable lightdm && systemctl set-default graphical.target

[root@openeuler ~]# 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.
如果默认安装了gdm,建议执行命令(systemctl disable gdm)停用gdm。

IT运维网 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明openEuler 24.03 LTS 配置 XFCE 桌面环境
喜欢 (0)
yvan
关于作者:
聪明来自勤奋、知识在于积累、好记性不如烂键盘!

您必须 登录 才能发表评论!