更改登录屏幕背景后登录屏幕出错(Ubuntu 19.04)

更改登录屏幕背景后登录屏幕出错(Ubuntu 19.04)

我的问题发生在我尝试更改登录屏幕的背景后。我已更改了文件/usr/share/gnome-shell/theme/Yaru/gnome-shell.css和这个 /usr/share/gnome-shell/theme/gdm3.css。我从这个更改了

#lockDialogGroup {
  background-color: #2C001E; }

对此

#lockDialogGroup {
   background-image: url(file:///home/rico/Pictures/login/wolf.jpg);
   background-repeat: no-repeat;
   background-size: cover;
   background-position: center; }

但是当我重新启动时,屏幕显示如下

图像

我已将所有内容更改为默认设置,但错误仍然存​​在。有没有办法恢复更改,或者在最坏的情况下,我该如何重新安装它?

答案1

根据我们之前的评论/聊天......

我们发现,您的 /usr/share/gnome-shell/theme/Yaru/gnome-shell.css 文件内容已被更改。

要恢复更改,您需要从新安装的 Ubuntu 19.04 中获取 /usr/share/gnome-shell/theme/Yaru/gnome-shell.css 文件,或从正在运行的 Ubuntu 19.04 文件中获取未更改的 gnome-shell.css 文件。

这是文件,https://we.tl/t-BjnNI9u9Si我刚刚安装了 Ubuntu 19.04 的全新副本。

下载此文件后,打开它,复制所有内容。

运行以下命令打开文件

sudo -H gedit /usr/share/gnome-shell/theme/Yaru/gnome-shell.css

删除文件中的所有内容/usr/share/gnome-shell/theme/Yaru/gnome-shell.css,然后粘贴从上述链接下载的文件复制的内容。

保存文件并关闭..

下载这两个文件https://we.tl/t-7Tq96QZy6n并用这些下载的文件替换/usr/share/gnome-shell/modes/ubuntu.json和。/usr/share/gnome-shell/modes/yaru.json

检查哪个文件用于替代 gdm3.css 文件。

运行sudo update-alternatives --config gdm3.css并选择文件所属的数字/usr/share/gnome-shell/theme/Yaru/gnome-shell.css

例子:

pratap@i7-4770:~$ sudo update-alternatives --config gdm3.css
[sudo] password for pratap: 
There are 2 choices for the alternative gdm3.css (providing /usr/share/gnome-shell/theme/gdm3.css).

  Selection    Path                                               Priority   Status
------------------------------------------------------------
* 0            /usr/share/gnome-shell/theme/Yaru/gnome-shell.css   15        auto mode
  1            /usr/share/gnome-shell/theme/Yaru/gnome-shell.css   15        manual mode
  2            /usr/share/gnome-shell/theme/gnome-shell.css        10        manual mode

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

现在..你的登录屏幕和解锁屏幕都将具有默认外观,因为它是作为全新安装的 Ubuntu 19.04 安装的

要更改登录屏幕背景,请参阅此链接。无法在 18.10 中更改登录屏幕背景

相关内容