mirror of
https://github.com/LCTT/TranslateProject.git
synced 2025-03-12 01:40:10 +08:00
commit
9f406d20af
@ -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: "robsean"
|
||||
[#]: reviewer: " "
|
||||
[#]: publisher: " "
|
||||
[#]: url: " "
|
||||
|
||||
How to Change Login Screen Background in Ubuntu
|
||||
======
|
||||
|
||||
**This is how you can get rid of that boring login screen background in Ubuntu and set a nice picture to welcome you each time you log on.**
|
||||
|
||||
I, always think that when you boot up your system, a nice login screen should greet you. That itself set the context of your upcoming work or activity that you are about to do. Although, I am not a Windows fan, but I admire how Windows 10 login background changes every day from Bing wallpapers, and it looks nice. Isn’t it?
|
||||
|
||||
A while back, we covered how to [change login background in Fedora][1] and [elementary OS][2]. And now this guide explains how you change it in vanilla Ubuntu with GNOME Shell.
|
||||
|
||||
Login screen background is part of display manager property. This guide uses a script in GitHub created by a user to make it seamless and easy for average user. Otherwise, you have to change the Gnome Display Manager (gdm) CSS files manually after extracting the `.gresource` file, then compile it – which is complicated in general.
|
||||
|
||||
![Ubuntu Login screen - before change][3]
|
||||
|
||||
Ubuntu Login screen – before change
|
||||
|
||||
### Change Login Background in Ubuntu
|
||||
|
||||
- Open a terminal (press CTRL+ALT+T)
|
||||
|
||||
- Download the [GitHub repo][4] using the below command.
|
||||
|
||||
```
|
||||
wget github.com/thiggy01/change-gdm-background/raw/master/change-gdm-background
|
||||
```
|
||||
|
||||
**Note**: If you do not have wget, install it using `sudo apt install wget`
|
||||
|
||||
**Ubuntu 22.04 Jammy Jellyfish** users require an additional code change to make it work because the developer did not fix it in GitHub. So here’s what you need to do.
|
||||
|
||||
Open the `change-gdm-background` file via gedit. Then, go to the following line (#15) and add `|jammy`.
|
||||
|
||||
![script change to allow jammy][5]
|
||||
|
||||
script change to allow jammy
|
||||
|
||||
Then, go to the following two lines (#144 and #184). Change `gdm3.css` to `gdm.css`. As shown below.
|
||||
|
||||
![correct the css file for gdm][6]
|
||||
|
||||
correct the css file for gdm
|
||||
|
||||
And finally, save the file and follow the instructions as below. This workaround is only for Ubuntu 22.04 login screen change.
|
||||
|
||||
- Change the permission of the script to make it executable
|
||||
|
||||
```
|
||||
chmod +x change-gdm-background
|
||||
```
|
||||
|
||||
- Then change the login background wallpaper in Ubuntu using the below command. Change the path of your image.
|
||||
|
||||
```
|
||||
sudo ./change-gdm-background ~/Pictures/tree.jpg
|
||||
```
|
||||
|
||||
This step might require `libglib2.0-dev` package, which will be installed automatically. This is required to extract/compile the `.gresource`.
|
||||
|
||||
And after installation, it would prompt you to restart gdm. Press N, to be on the safe side.
|
||||
|
||||
- Log out and you can see the changed background in Ubuntu.
|
||||
- If you are not seeing the change, try restarting your system and then try to log in.
|
||||
|
||||
![Ubuntu Login screen After Change][7]
|
||||
|
||||
Ubuntu Login screen with background After Change
|
||||
|
||||
### Restore the stock login screen
|
||||
|
||||
The script also provides a feature to revert the stock login screen. It takes a backup of your `.gresource` file before changing it. So, from the terminal, simply run below to restore the original login screen.
|
||||
|
||||
```
|
||||
sudo ./change-gdm-background --restore
|
||||
```
|
||||
|
||||
That should change the login screen back to its original form.
|
||||
|
||||
Let me know whether it worked for you using the comment box below. This should work for all the latest versions of Ubuntu Linux.
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.debugpoint.com/change-login-background-ubuntu/
|
||||
|
||||
作者:[Arindam][a]
|
||||
选题:[lkxed][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者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
|
@ -0,0 +1,107 @@
|
||||
[#]: 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