删除 kde-plasma-desktop 后,Gnome 无法正常工作

删除 kde-plasma-desktop 后,Gnome 无法正常工作

以下是我目前所做的一些背景知识。我有一个完美无缺的 gnome3 工作环境,但我想尝试一下 plasma 5 桌面环境,所以我安装了它。该死!这是我犯下的可怕错误。经过几个小时的使用,我只是挠了挠头,觉得它不适合我,gnome 比这个窗口看起来要好得多。一切都乱七八糟。我使用 删除了它sudo apt-get remove --purge kde-plasma-desktop,然后运行了sudo apt-get autoremove。起初,它似乎已经完成了,所以我快速重启了。问题开始了,我有 pop-os,所以重启后它把我带到了 pop-os 终端,换句话说,gui 不起作用。我试了一下,sudo systemctl restart gdm3我恢复了我的 gnome 桌面。我想,我已经修好了它,但重启后,它又把我带到了 pop-os 或 ubuntu 终端。在我尝试了几次之后,我运行了sudo systemctl start gdm3.service它,问题解决了。系统中仍然有一些 kde 应用程序,而且它改变了我的光标、字体、图标。我运行了 sudo systemctl status gdm3,只是为了检查状态。它抛出了以下错误:

    gdm.service - GNOME Display Manager
     Loaded: loaded (/lib/systemd/system/gdm.service; static)
     Active: active (running) since Fri 2020-12-18 19:43:08 IST; 32min ago
    Process: 1044 ExecStartPre=/usr/share/gdm/generate-config (code=exited, status=0/SUCCESS)
    Process: 1099 ExecStartPre=/usr/libexec/gdm-wait-for-drm (code=exited, status=0/SUCCESS)
   Main PID: 1100 (gdm3)
      Tasks: 3 (limit: 12980)
     Memory: 9.3M
     CGroup: /system.slice/gdm.service
             └─1100 /usr/sbin/gdm3

Dec 18 19:43:05 pop-os systemd[1]: Starting GNOME Display Manager...
Dec 18 19:43:08 pop-os systemd[1]: Started GNOME Display Manager.
Dec 18 19:43:15 pop-os gdm-launch-environment][1112]: pam_unix(gdm-launch-environment:session): session opened for user gdm by (uid=0)
Dec 18 19:44:02 pop-os gdm-password][1695]: pam_unix(gdm-password:auth): Couldn't open /etc/securetty: No such file or directory
Dec 18 19:44:13 pop-os gdm-password][1695]: pam_unix(gdm-password:auth): Couldn't open /etc/securetty: No such file or directory
Dec 18 19:44:13 pop-os gdm-password][1695]: gkr-pam: unable to locate daemon control file
Dec 18 19:44:13 pop-os gdm-password][1695]: gkr-pam: stashed password to try later in open session
Dec 18 19:44:13 pop-os gdm-password][1695]: pam_unix(gdm-password:session): session opened for user smehto by (uid=0)
Dec 18 19:44:57 pop-os gdm3[1100]: Gdm: Child process -1202 was already dead.

我再次尝试,sudo systemctl enable gdm3但出现以下错误:

Synchronizing state of gdm3.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable gdm3
The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled using systemctl.
 
Possible reasons for having this kind of units are:
• A unit may be statically enabled by being symlinked from another unit's
  .wants/ or .requires/ directory.
• A unit's purpose may be to act as a helper for some other unit which has
  a requirement dependency on it.
• A unit may be started when needed via activation (socket, path, timer,
  D-Bus, udev, scripted systemctl call, ...).
• In case of template units, the unit is meant to be enabled with some
  instance name specified.

我不知道发生了什么,也不知道那些错误日志指的是什么。

答案1

首先,当您安装时KDE plasma,您将默认显示管理器更改为SDDM,然后将其删除。

这种情况可以这样描述:---您安装了一个应用程序并将其设置为默认应用程序,然后您将其删除,现在系统不知道该做什么。这就是为什么当您重新启动时它会在终端中打开。

解决方案是再次将 gdm3 设为默认显示管理器

在终端中执行sudo dpkg-reconfigure gdm3并从选项中选择gdm3使其成为默认显示管理器了解更多信息

其次,我也遇到过 KDE 应用和软件包在 之后遗留的情况purging。遗憾的是,我没有找到任何简单的方法让一切恢复正常,但我所做的是通过 删除了与 KDE 相关的所有内容Synaptic Package Manager。如果您决定这样做,请小心。

希望这可以帮助 :))

相关内容