无法在 18.10 中更改登录屏幕背景

无法在 18.10 中更改登录屏幕背景

我把桌面和登录界面的背景图片都改了,但是只有桌面图片变了,登录界面还是紫色的 Ubuntu,是不是 bug?

答案1

使用默认显示管理器 gdm3 更改 Ubuntu 18.10 中的登录屏幕背景

我们需要编辑 gdm3.css 文件。

使用您喜欢的编辑器打开文件,我的是 gedit。所以
sudo -H gedit /etc/alternatives/gdm3.css

转到 1981 左右的行号并找到以下内容。

#lockDialogGroup {
  background: none;
  background-color: none;
  background-gradient-direction: vertical;
  background-gradient-start: #6D2169;
  background-gradient-end: #370026; }

改变内容

#lockDialogGroup {
  background: #000000 url(file:///home/pratap/Desktop/1.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; }

此处第 1982 行的 url(file://输入您的实际图片路径)

保存文件,关闭并重新启动以查看更改。

锁屏壁纸图片 在此处输入图片描述

解锁屏幕背景图片 在此处输入图片描述

对于 18.04 同样的办法,只有行号不同 1814,

#lockDialogGroup {
  background: #2c001e url(resource:///org/gnome/shell/theme/noise-texture.png);
  background-repeat: repeat; }

替换以上内容为

#lockDialogGroup {
  background: #000000 url(file:///home/pratap/Desktop/1.jpg);
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center; }

此处第 1815 行的 url(file://输入你实际的图片路径)


答案2

我创建了一个脚本,可以自动执行更改 Gnome 显示管理器 (gdm) 登录背景的过程。

您只需输入脚本名称和所需的图像。您甚至可以恢复原始主题的备份。

您可以在以下位置找到说明https://github.com/thiggy01/gdm-change-login-background

答案3

您可以使用 Gnome 的 Loginized 实用程序。 https://github.com/juhaku/loginized

相关内容