1.首先 使用 sudo tasksel 选择安装 Xfce 4 环境 或者 通过 sudo apt install kali-defaults kali-root-login desktop-base xfce4 xfce4-places-plugin xfce4-goodies 安装

在安装的过程中(可能)会要求我们选择提供图形化系统登录界面的图形管理程序(A display manage is a program that provides graphical login for the X Windows System.),只有一个显示管理器可以管理给定的 X server (X server 是用于管理图形化界面的服务器端程序),但是如果当前系统中安装了多个显示管理器包,就需要选择一个默认的显示管理器(Only one display manage can manage a given X server, but multiple display manager packages are installed. Please select which display manager should run by default.),这里我选择的默认显示管理器是 “gdm3”, 如图 1:

1
图 1

切换桌面:

update-alternatives --config x-session-manager

回显如下:

root@kali:~# update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

  Selection    Path                    Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gnome-session   50        auto mode
  1            /usr/bin/gnome-session   50        manual mode
  2            /usr/bin/startxfce4      50        manual mode
  3            /usr/bin/xfce4-session   40        manual mode

Press <enter> to keep the current choice[*], or type selection number:

输入 3 以启动 Xfce4,回显如下:

root@kali:~# update-alternatives --config x-session-manager
There are 3 choices for the alternative x-session-manager (providing /usr/bin/x-session-manager).

  Selection    Path                    Priority   Status
------------------------------------------------------------
* 0            /usr/bin/gnome-session   50        auto mode
  1            /usr/bin/gnome-session   50        manual mode
  2            /usr/bin/startxfce4      50        manual mode
  3            /usr/bin/xfce4-session   40        manual mode

Press <enter> to keep the current choice[*], or type selection number: 3
update-alternatives: using /usr/bin/xfce4-session to provide /usr/bin/x-session-manager (x-session-manager) in manual mode

卸载 Gnome 桌面环境:

apt remove gnome-core
apt remove gnome-shell

重启系统:

重新登录系统之后可以看到已经成功地将 Kali Linux 的桌面环境更换为 Xfce 4,如图 

2

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐