mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-12 01:40:10 +08:00
Merge pull request #28161 from wxy/20221025.3-⭐️-How-to-Change-Login-Screen-Background-in-Ubuntu
RP:published/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md
This commit is contained in:
commit
c4f445ef77
@ -0,0 +1,103 @@
|
||||
[#]: subject: "How to Change Login Screen Background in Ubuntu"
|
||||
[#]: via: "https://www.debugpoint.com/change-login-background-ubuntu/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: "robsean"
|
||||
[#]: reviewer: "wxy"
|
||||
[#]: publisher: "wxy"
|
||||
[#]: url: "https://linux.cn/article-15329-1.html"
|
||||
|
||||
如何更改 Ubuntu 的登录屏幕背景
|
||||
======
|
||||
|
||||
![][0]
|
||||
|
||||
> 这篇指南可以让你如何摆脱 Ubuntu 的无趣的登录背景屏幕,并在你每次登录时设置一张漂亮的图片来欢迎你。
|
||||
|
||||
我总是认为,在你启动你的系统后,应该有一个漂亮的登录屏幕来欢迎你。这本身就为你即将开始的工作或活动渲染了愉快的氛围。尽管,我不是一名 Windows 的粉丝,但是我很欣赏 Windows 10 的登录背景都会每天随着 Bing 壁纸进行更改,它看起来好极了,对吧?
|
||||
|
||||
前段时间,我们讨论了如何 [更改 Fedora 的登录屏幕背景][1] 和 [更改 elementary OS 的登录屏幕背景][2] 。现在这篇指南将向你解释,如何更改使用 GNOME Shell 的 Ubuntu 的登录屏幕背景。
|
||||
|
||||
登录屏幕背景是显示管理器(DM)属性的一部分。这篇指南将使用一位用户在 GitHub 中创建的一个脚本,使得普通用户也能简单易用。否则,你需要在提取 `.gresource` 文件后,必须手动更改 <ruby>Gnome 显示管理器<rt>Gnome Display Manager</rt></ruby>(GDM)的 CSS 文件,接下来再编译它。一般来说,这是很复杂的。
|
||||
|
||||
![Ubuntu 登录屏幕 – 在更改前][3]
|
||||
|
||||
### 更改 Ubuntu 的登录背景
|
||||
|
||||
打开一个终端(按下组合键 `CTRL+ALT+T`)。
|
||||
|
||||
使用下面的命令,下载这个 [GitHub 仓库][4] :
|
||||
|
||||
```
|
||||
wget github.com/thiggy01/change-gdm-background/raw/master/change-gdm-background
|
||||
```
|
||||
|
||||
**注意**: 如果你没有 `wget` ,使用 `sudo apt install wget` 来安装它。
|
||||
|
||||
> **Ubuntu 22.04 Jammy Jellyfish** 用户需要更改一些额外的代码来使其工作,因为,在 GitHub 仓库中,开发者没有修复它。因此,在这里你需要自己来更改。
|
||||
>
|
||||
> 使用 gedit 来打开 `change-gdm-background` 文件。接下来,转到下面的行(`#15`) 并添加 `|jammy` 。
|
||||
>
|
||||
> ![脚本更改为允许 jammy][5]
|
||||
>
|
||||
> 接下来,转到下面的两行(`#144` 和 `#184`)。将 `gdm3.css` 更改为 `gdm.css` 。如下图所示。
|
||||
>
|
||||
> ![修正针对 gdm 的 css 文件][6]
|
||||
>
|
||||
> 最后,保存文件,并遵循如下的操作指南。这种解决方法只适用于 Ubuntu 22.04 的登录屏幕的更改。
|
||||
|
||||
更改脚本的权限来使其可执行:
|
||||
|
||||
```
|
||||
chmod +x change-gdm-background
|
||||
```
|
||||
|
||||
接下来,更改 Ubuntu 的登录背景壁纸,使用下面的命令。按照你的图片相应地更改路径:
|
||||
|
||||
```
|
||||
sudo ./change-gdm-background ~/Pictures/tree.jpg
|
||||
```
|
||||
|
||||
这一步骤可能需要 `libglib2.0-dev` 软件包,它将会自动地安装。提取和编译 `.gresource` 会用到它。
|
||||
|
||||
在安装后,它应该会提示你重新启动 GDM 。慎重起见,按下 `N` 按键。
|
||||
|
||||
注销后,你可以看到更改后的 Ubuntu 的背景。
|
||||
|
||||
如果你没有看到更改,尝试重新启动你的系统,然后尝试登录。
|
||||
|
||||
![在更改后的,Ubuntu 的登录屏幕背景][7]
|
||||
|
||||
### 恢复先前的登录屏幕
|
||||
|
||||
该脚本也提供了一种恢复先前的登录屏幕的特色功能。它在更改你的 `.gresource` 文件前,会将其进行备份。因此,恢复先前的登录屏幕,只需要在终端中简单地运行下面的命令。
|
||||
|
||||
```
|
||||
sudo ./change-gdm-background --restore
|
||||
```
|
||||
|
||||
这应该会将其登录屏幕更改回其先前的形式。
|
||||
|
||||
请在下面的评论框中,让我知道这篇指南的内容是否对你有效果,这应该适用于所有的最新版本的 Ubuntu Linux 。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/change-login-background-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[wxy](https://github.com/wxy)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/2021/09/change-login-background-fedora/
|
||||
[2]: https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-before-change-1024x539.jpg
|
||||
[4]: https://github.com/thiggy01/change-gdm-background
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/09/script-change-to-allow-jammy.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/09/correct-the-css-file-for-gdm.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-After-Change-1024x538.jpg
|
||||
[0]: https://img.linux.net.cn/data/attachment/album/202212/08/121701hdfufrlqe4qtdtel.jpg
|
@ -1,107 +0,0 @@
|
||||
[#]: subject: "How to Change Login Screen Background in Ubuntu"
|
||||
[#]: via: "https://www.debugpoint.com/change-login-background-ubuntu/"
|
||||
[#]: author: "Arindam https://www.debugpoint.com/author/admin1/"
|
||||
[#]: collector: "lkxed"
|
||||
[#]: translator: " "
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
如何更改 Ubuntu 的登录屏幕背景
|
||||
======
|
||||
|
||||
**这是让你如何摆脱 Ubuntu 的无趣的登录背景屏幕,并在你每次登录时设置一张极好的图片来欢迎你的指南。**
|
||||
|
||||
我总是认为,在你启动你的系统后,一个极好的登录屏幕来欢迎你,是一件美妙的事。这本身就为你即将开始的工作或活动渲染了愉快的氛围。尽管,我不是一名 Windows 的粉丝,但是我很欣赏 Windows 10 的登录背景都会每天随着 Bing 壁纸进行更改,它看起来好极了,不是吗?
|
||||
|
||||
前段时间,我们讨论了如何 [更改 Fedora 的登录屏幕背景][1] 和 [更改 elementary OS 的登录屏幕背景][2] 。现在这篇指南将向你解释,如何更改使用 GNOME Shell 的 Ubuntu 的登录屏幕背景。
|
||||
|
||||
登录屏幕背景是显示管理器属性的一部分。这篇指南将使用一位用户在 GitHub 中创建的一个脚本,来使普通的用户能够纵享丝滑。否则,在提取 `.gresource` 文件后,你必须手动更改 <ruby>Gnome 显示管理器<rt>Gnome Display Manager</rt></ruby> (gdm) 的 CSS 文件,接下来再编译它 – 一般来说,这是很复杂的。
|
||||
|
||||
![Ubuntu Login screen - before change][3]
|
||||
|
||||
Ubuntu 登录屏幕 – 在更改前
|
||||
|
||||
### 更改 Ubuntu 的登录背景
|
||||
|
||||
- 打开一个终端 (按下组合键 CTRL+ALT+T)
|
||||
|
||||
- 下载 [GitHub repo][4] ,使用下面的命令。
|
||||
|
||||
```
|
||||
wget github.com/thiggy01/change-gdm-background/raw/master/change-gdm-background
|
||||
```
|
||||
|
||||
**注意**: 如果你没有 wget ,使用 `sudo apt install wget` 来安装它
|
||||
|
||||
**Ubuntu 22.04 Jammy Jellyfish** 用户需要更改一些额外的代码来使其工作,因为,在 GitHub 中,开发者没有修复它。因此,在这里你需要自己来更改。
|
||||
|
||||
使用 gedit 来打开 `change-gdm-background` 文件。接下来,转到下面的行 (#15) 并添加 `|jammy` 。
|
||||
|
||||
![script change to allow jammy][5]
|
||||
|
||||
脚本更改为允许 jammy
|
||||
|
||||
接下来,转到下面的两行 (#144 和 #184)。将 `gdm3.css` 更改为 `gdm.css` 。如下图所示。
|
||||
|
||||
![correct the css file for gdm][6]
|
||||
|
||||
修正针对 gdm 的 css 文件
|
||||
|
||||
最后,保存文件,并遵循如下的操作指南。这种解决方法只适用于 Ubuntu 22.04 的登录屏幕的更改。
|
||||
|
||||
- 更改脚本的权限来使其可执行
|
||||
|
||||
```
|
||||
chmod +x change-gdm-background
|
||||
```
|
||||
|
||||
- 接下来,更改 Ubuntu 的登录背景壁纸,使用下面的命令。按照你的图片相应地更改路径
|
||||
|
||||
```
|
||||
sudo ./change-gdm-background ~/Pictures/tree.jpg
|
||||
```
|
||||
|
||||
这一步骤可能需要 `libglib2.0-dev` 软件包,它将会自动地安装。提取/编译 `.gresource` 会用到它
|
||||
|
||||
在安装后,它应该会提示你重新启动 gdm 。慎重起见,按下 N 按键。
|
||||
|
||||
- 注销后,你可以看到更改后的 Ubuntu 的背景。
|
||||
- 如果你没有看到更改,尝试重新启动你的系统,然后尝试登录。
|
||||
|
||||
![Ubuntu Login screen After Change][7]
|
||||
|
||||
在更改后的,Ubuntu 的登录屏幕背景
|
||||
|
||||
### 恢复先前的登录屏幕
|
||||
|
||||
该脚本也提供了一种恢复先前的登录屏幕的特色功能。它在更改你的 `.gresource` 文件前,会将其进行备份。因此,恢复先前的登录屏幕,只需要在终端中简单地运行下面的命令。
|
||||
|
||||
```
|
||||
sudo ./change-gdm-background --restore
|
||||
```
|
||||
|
||||
这应该会将其登录屏幕更改回其先前的形式。
|
||||
|
||||
在下面的评论框中,让我知道这篇指南的内容是否对你有效果,这应该适用于所有的最新版本的 Ubuntu Linux 。
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/change-login-background-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[robsean](https://github.com/robsean)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.debugpoint.com/author/admin1/
|
||||
[b]: https://github.com/lkxed
|
||||
[1]: https://www.debugpoint.com/2021/09/change-login-background-fedora/
|
||||
[2]: https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/
|
||||
[3]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-before-change-1024x539.jpg
|
||||
[4]: https://github.com/thiggy01/change-gdm-background
|
||||
[5]: https://www.debugpoint.com/wp-content/uploads/2022/09/script-change-to-allow-jammy.jpg
|
||||
[6]: https://www.debugpoint.com/wp-content/uploads/2022/09/correct-the-css-file-for-gdm.jpg
|
||||
[7]: https://www.debugpoint.com/wp-content/uploads/2021/09/Ubuntu-Login-screen-After-Change-1024x538.jpg
|
Loading…
Reference in New Issue
Block a user