mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-29 21:41:00 +08:00
translated
This commit is contained in:
parent
97009c70f9
commit
ddf1228f2c
@ -1,139 +0,0 @@
|
|||||||
[#]: subject: (How to Change Lock and Login Screen Wallpaper in elementary OS)
|
|
||||||
[#]: via: (https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/)
|
|
||||||
[#]: author: (Arindam https://www.debugpoint.com/author/admin1/)
|
|
||||||
[#]: collector: (lujun9972)
|
|
||||||
[#]: translator: (geekpi)
|
|
||||||
[#]: reviewer: ( )
|
|
||||||
[#]: publisher: ( )
|
|
||||||
[#]: url: ( )
|
|
||||||
|
|
||||||
How to Change Lock and Login Screen Wallpaper in elementary OS
|
|
||||||
======
|
|
||||||
This tutorial explains the steps you need to change lock and login
|
|
||||||
screen background in elementary OS. This will replace the default grey
|
|
||||||
background.
|
|
||||||
Changing the lock or login screen background grey default wallpaper in elementary OS is a bit difficult. The typical greeter configuration change with the path of the image file would not work.
|
|
||||||
|
|
||||||
Unfortunately, it’s not an easier solution because the grey background is an image file and its data is hard coded in the greeter and need to be recompiled with new image to make it work.
|
|
||||||
|
|
||||||
Here’s how.
|
|
||||||
|
|
||||||
![Lock / Login screen background elementary OS \(Odin\)][1]
|
|
||||||
|
|
||||||
### Change Lock and Login Screen Background – elementary OS
|
|
||||||
|
|
||||||
* Open a terminal in your elementary OS.
|
|
||||||
* Install git and following dependencies for [greeter package][2].
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt install git
|
|
||||||
```
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo apt install -y gnome-settings-daemon libaccountsservice-dev libgdk-pixbuf2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev liblightdm-gobject-1-dev libmutter-6-dev libwingpanel-dev libx11-dev meson valac
|
|
||||||
```
|
|
||||||
|
|
||||||
* Go to temporary /tmp directory and clone the latest greeter master branch from GitHub.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
cd /tmp
|
|
||||||
git clone https://github.com/elementary/greeter.git
|
|
||||||
```
|
|
||||||
|
|
||||||
* After cloning is complete, open the path `/tmp/greeter/data` in a file manager.
|
|
||||||
|
|
||||||
|
|
||||||
* The elementary OS uses a PNG file of 100×100 px as default background in the login screen/lock screen. The image is tiled, and it gives an impression of grey background.
|
|
||||||
|
|
||||||
|
|
||||||
* Rename your desired wallpaper image with `texture.png` and overwrite the following file in the path.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
![gray background is created using this file][3]
|
|
||||||
|
|
||||||
```
|
|
||||||
/tmp/greeter/data/texture.png
|
|
||||||
```
|
|
||||||
|
|
||||||
* Open the file `/tmp/greeter/compositor/SystemBackground.vala` in a text editor and replace the following line –
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
![change the path of image][4]
|
|
||||||
|
|
||||||
```
|
|
||||||
resource:///io/elementary/desktop/gala/texture.png
|
|
||||||
```
|
|
||||||
|
|
||||||
With –
|
|
||||||
|
|
||||||
```
|
|
||||||
resource:///io/elementary/greeter/texture.png
|
|
||||||
```
|
|
||||||
|
|
||||||
* Save the file.
|
|
||||||
|
|
||||||
|
|
||||||
* Open the terminal again and build `greeter` using the following commands.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
cd /tmp/greeter
|
|
||||||
meson _build --prefix=/usr
|
|
||||||
sudo ninja install -C _build
|
|
||||||
```
|
|
||||||
|
|
||||||
![building greeter][5]
|
|
||||||
|
|
||||||
* If you face any build error, let me know in the comment below. You should not be seeing any error, as I have tested it.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
[][6]
|
|
||||||
|
|
||||||
SEE ALSO: elementary OS 5.1 Hera Released. Here’s What’s New
|
|
||||||
|
|
||||||
After the above commands are complete, you can test the login screen by running lightdm in test mode –
|
|
||||||
|
|
||||||
```
|
|
||||||
lightdm --test-mode --debug
|
|
||||||
```
|
|
||||||
|
|
||||||
If it looks good, reboot the system. And you should be seeing your wallpaper in the login screen in elementary OS.
|
|
||||||
|
|
||||||
This guide should work in [elementary OS 6 Odin][7], elementary OS 5 Juno and below.
|
|
||||||
|
|
||||||
### Closing Notes
|
|
||||||
|
|
||||||
I hope this guide helps you to change the background of lock or login screen in your elementary OS. Honestly, its 2021 and changing a background image of login screen requires compilation of code surprises me.
|
|
||||||
|
|
||||||
If you run into error, let me know in the comment box below.
|
|
||||||
|
|
||||||
* * *
|
|
||||||
|
|
||||||
--------------------------------------------------------------------------------
|
|
||||||
|
|
||||||
via: https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/
|
|
||||||
|
|
||||||
作者:[Arindam][a]
|
|
||||||
选题:[lujun9972][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/lujun9972
|
|
||||||
[1]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/elementary-OS-Login-Screen-in-Odin-1024x768.jpg
|
|
||||||
[2]: https://github.com/elementary/greeter
|
|
||||||
[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/gray-background-is-created-using-this-file.jpg
|
|
||||||
[4]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/change-the-path-of-image-1024x450.jpg
|
|
||||||
[5]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/building-greeter.png
|
|
||||||
[6]: https://www.debugpoint.com/2019/12/elementary-os-hera-released/
|
|
||||||
[7]: https://www.debugpoint.com/tag/elementary-os-6
|
|
@ -0,0 +1,130 @@
|
|||||||
|
[#]: subject: (How to Change Lock and Login Screen Wallpaper in elementary OS)
|
||||||
|
[#]: via: (https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/)
|
||||||
|
[#]: author: (Arindam https://www.debugpoint.com/author/admin1/)
|
||||||
|
[#]: collector: (lujun9972)
|
||||||
|
[#]: translator: (geekpi)
|
||||||
|
[#]: reviewer: ( )
|
||||||
|
[#]: publisher: ( )
|
||||||
|
[#]: url: ( )
|
||||||
|
|
||||||
|
如何在 elementary OS 中改变锁定和登录屏幕的壁纸
|
||||||
|
======
|
||||||
|
本教程解释了在 elementary OS 中改变锁定和登录屏幕背景的步骤。这将取代默认的灰色背景。
|
||||||
|
|
||||||
|
在 elementary OS 中改变锁屏或登录屏背景的灰色默认壁纸是有点困难的。典型的用图像文件的路径改变 greeter 配置是行不通的。
|
||||||
|
|
||||||
|
不幸的是,这不是一个更简单的解决方案,因为灰色背景是一个图像文件,它的数据在 greeter 中是硬编码的,需要用新的图像重新编译才能使其发挥作用。
|
||||||
|
|
||||||
|
下面是方法。
|
||||||
|
|
||||||
|
![Lock / Login screen background elementary OS \(Odin\)][1]
|
||||||
|
|
||||||
|
### 改变 elementary OS 锁定和登录屏幕背景
|
||||||
|
|
||||||
|
* 在 elementary OS 中打开一个终端。
|
||||||
|
* 为 [greeter包][2]安装 git 和以下依赖项。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install git
|
||||||
|
```
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo apt install -y gnome-settings-daemon libaccountsservice-dev libgdk-pixbuf2.0-dev libgranite-dev libgtk-3-dev libhandy-1-dev liblightdm-gobject-1-dev libmutter-6-dev libwingpanel-dev libx11-dev meson valac
|
||||||
|
```
|
||||||
|
|
||||||
|
* 进入临时的 /tmp 目录,从 GitHub 克隆最新的 greeter 主分支。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
cd /tmp
|
||||||
|
git clone https://github.com/elementary/greeter.git
|
||||||
|
```
|
||||||
|
|
||||||
|
* 克隆完成后,在文件管理器中打开路径 `/tmp/greeter/data`。
|
||||||
|
|
||||||
|
|
||||||
|
* 初级操作系统使用一个 100×100px 的 PNG 文件作为登录屏幕/锁屏的默认背景。该图像是平铺的,给人一种灰色背景的感觉。
|
||||||
|
|
||||||
|
|
||||||
|
* 用 `texture.png` 重命名你想要的墙纸图像,并在路径中覆盖以下文件。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
![gray background is created using this file][3]
|
||||||
|
|
||||||
|
```
|
||||||
|
/tmp/greeter/data/texture.png
|
||||||
|
```
|
||||||
|
|
||||||
|
* 在文本编辑器中打开文件 `/tmp/greeter/compositor/SystemBackground.vala`,并替换下面一行:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
![change the path of image][4]
|
||||||
|
|
||||||
|
```
|
||||||
|
resource:///io/elementary/desktop/gala/texture.png
|
||||||
|
```
|
||||||
|
|
||||||
|
为:
|
||||||
|
|
||||||
|
```
|
||||||
|
resource:///io/elementary/greeter/texture.png
|
||||||
|
```
|
||||||
|
|
||||||
|
* 保存该文件。
|
||||||
|
|
||||||
|
|
||||||
|
* 再次打开终端,使用以下命令构建 `greeter`。
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
cd /tmp/greeter
|
||||||
|
meson _build --prefix=/usr
|
||||||
|
sudo ninja install -C _build
|
||||||
|
```
|
||||||
|
|
||||||
|
![building greeter][5]
|
||||||
|
|
||||||
|
* 如果你遇到任何构建错误,请在下面的评论中告诉我。你应该不会看到任何错误,因为我已经测试过了。
|
||||||
|
|
||||||
|
|
||||||
|
上面的命令完成后,你可以在测试模式下运行 lightdm 来测试登录屏:
|
||||||
|
|
||||||
|
```
|
||||||
|
lightdm --test-mode --debug
|
||||||
|
```
|
||||||
|
|
||||||
|
如果看起来不错,重新启动系统。而你应该在 elementary OS 的登录屏上看到你的墙纸。
|
||||||
|
|
||||||
|
这个指南应该可在 [elementary OS 6 Odin][7]、elementary OS 5 Juno 及以下版本中可用。
|
||||||
|
|
||||||
|
### 结束语
|
||||||
|
|
||||||
|
我希望本指南能帮助你在 elementary OS 中改变锁屏或登录屏的背景。老实说,在 2021 年改变登录屏的背景图像需要编译代码,这让我很吃惊。
|
||||||
|
|
||||||
|
如果你遇到错误,请在下面的评论栏里告诉我。
|
||||||
|
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
via: https://www.debugpoint.com/2021/07/change-lock-login-screen-background-elementary-os/
|
||||||
|
|
||||||
|
作者:[Arindam][a]
|
||||||
|
选题:[lujun9972][b]
|
||||||
|
译者:[geekpi](https://github.com/geekpi)
|
||||||
|
校对:[校对者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/lujun9972
|
||||||
|
[1]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/elementary-OS-Login-Screen-in-Odin-1024x768.jpg
|
||||||
|
[2]: https://github.com/elementary/greeter
|
||||||
|
[3]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/gray-background-is-created-using-this-file.jpg
|
||||||
|
[4]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/change-the-path-of-image-1024x450.jpg
|
||||||
|
[5]: https://www.debugpoint.com/blog/wp-content/uploads/2021/07/building-greeter.png
|
||||||
|
[7]: https://www.debugpoint.com/tag/elementary-os-6
|
Loading…
Reference in New Issue
Block a user