按照有关如何从 ubuntu 中删除 KDE 的教程后无法启用 gdm3

ImL*_*mon 6 kde boot-repair 21.04

每次启动时,我现在都必须按 ctrl + alt + f3 并输入以下内容

\n

sudo systemctl start gdm3

\n

如果我不这样做,那么我的电脑将只会停留在 BIOS 徽标上,而不会出现其他任何情况。

\n

这是我遵循的教程https://trendoceans.com/how-to-remove-the-kde-plasma-environment-in-ubuntu/

\n

当我尝试时

\n

sudo systemctl enable gdm3

\n

我明白了

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

编辑:我找到了修复方法sudo dpkg-reconfigure gme3感谢 Reddit 上的人

\n

Md.*_*san 7

我遇到了类似的问题。发生这种情况是因为gdm3.service文件中缺少安装。要解决此问题,首先您必须进入目录,然后在任何编辑器中打开gdm3.service文件。就像:。/lib/systemd/system/sudo nano gdm3.service

添加后:

[安装]
WantedBy=多用户.target

到单元文件的底部gdm3.service,它修复了我运行的问题systemctl enable gdm3。您现在可以成功启用 gdm3。

  • 我遇到了与 OP 相同的问题,这允许我通过 systemctl 启用 gdm3,但我的启动仍然混乱。`sudo systemctl set-defaultgraphic.target` 是为我解决这个问题的。 (2认同)

小智 3

打开终端并键入
sudo systemctl set-default graphical.target
然后重新启动,您就可以直接进入桌面。
如果您想返回,则
sudo systemctl set-default multi-user.target
可以在启动时直接进入控制台。
如果一切都失败了sudo apt-get install ubuntu-desktop