From a951a2ac4240613a8303cd8ccbad6833cd4632c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=85=AD=E5=BC=80=E7=AE=B1?= Date: Sun, 30 Oct 2022 03:15:30 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=89=8B=E5=8A=A8=E9=80=89=E9=A2=98][tech]:?= =?UTF-8?q?=2020221025.3=20=E2=AD=90=EF=B8=8F=20How=20to=20Change=20Login?= =?UTF-8?q?=20Screen=20Background=20in=20Ubuntu.md?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...to Change Login Screen Background in Ubuntu.md | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 sources/tech/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md diff --git a/sources/tech/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md b/sources/tech/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md new file mode 100644 index 0000000000..af8661718c --- /dev/null +++ b/sources/tech/20221025.3 ⭐️ How to Change Login Screen Background in Ubuntu.md @@ -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: " " + +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