个人觉得Ubuntu22.04的登录界面太单调了,锁屏界面也不太喜欢。现在Gnome Settings里面只能改桌面壁纸,记得之前的版本锁屏界面也是可以改壁纸的。于是一顿搜索,发现登录界面还是可以改的,锁屏界面还没有方便的更改方式,有人知道的话可以邮箱联系我,邮箱地址在github的个人信息里面。
下面是更改登录界面的过程,所谓登录界面在Linux里是Display Manager,Gnome的叫GNOME Display Manager (GDM) ,还有其它dm,比如LightDM,当你的系统安装多个dm的时候,你只能选其中的一个,而且这东西会影响其它的软件功能,以前我就遇到切换到LightDM,锁屏快捷键失效,无奈得切换回GDM3。
题外话不多说,开始操作
wget -qO - https://github.com/PRATAP-KUMAR/ubuntu-gdm-set-background/archive/main.tar.gz | tar zx --strip-components=1 ubuntu-gdm-set-background-main/ubuntu-gdm-set-background
看得懂脚本的可以用编辑器打开看看,脚本依赖libglib2.0-dev-bin这个包,该包提供一个叫gresource的工具能操作.gresource结尾的文件,而.gresource文件就是GTK-3的主题CSS文件预编译后的二进制格式数据文件,该脚本就是通过这样的方式更改相关样式的。
测试了下,我还是喜欢图片,内容丰富些。
➜ ~ ls -al ubuntu-gdm-set-background
-rwxrwxr-x 1 mephisto mephisto 10752 Feb 3 12:41 ubuntu-gdm-set-background
➜ ~ file ubuntu-gdm-set-background
ubuntu-gdm-set-background: Bourne-Again shell script, Unicode text, UTF-8 text executable
➜ ~ ./ubuntu-gdm-set-background --help
ubuntu-gdm-set-background script (for changing Ubuntu 20.04, 21.04, 21.10 & 22.04 GDM Background) HELP
there are four options
1. background with image
2. background with color
3. background with gradient horizontal ( requires two valid hex color inputs)
4. background with gradient vertical ( requires two valid hex color inputs)
Tip: be ready with valid hex color code in place of below example like #aAbBcC or #dDeEfF. Change them to your preffered hex color codes.
you may choose colors from https://www.color-hex.com/
Example Commands:
1. sudo ./ubuntu-gdm-set-background --image /home/user/backgrounds/image.jpg
2. sudo ./ubuntu-gdm-set-background --color \#aAbBcC
3. sudo ./ubuntu-gdm-set-background --gradient horizontal \#aAbBcC \#dDeEfF
4. sudo ./ubuntu-gdm-set-background --gradient vertical \#aAbBcC \#dDeEfF
5. sudo ./ubuntu-gdm-set-background --reset
6. ./ubuntu-gdm-set-background --help
RESCUE_MODE, Example Commands:
1. $ sudo ./ubuntu-gdm-set-background --image /home/user/backgrounds/image.jpg rescue
2. $ sudo ./ubuntu-gdm-set-background --color \#aAbBcC rescue
3. $ sudo ./ubuntu-gdm-set-background --gradient horizontal \#aAbBcC \#dDeEfF rescue
4. $ sudo ./ubuntu-gdm-set-background --gradient vertical \#aAbBcC \#dDeEfF rescue
Why RESCUE_MODE?
It is when you try to change the background with some other scripts and then interacted with this script,
there will be some conflicts. In case you ran other scripts to change the background and then tried this script,
found conflicts? then add 'rescue' to the end of the command as mentiond above.
Please note that for 'RESCUE_MODE' active internet connection is necessary
后面图片路径,输入要使用的图片的全路径,别偷懒,重新登录即可生效
➜ ~ sudo ./ubuntu-gdm-set-background --image ~/Pictures/th.jpeg
😕 Seems 'background change is successful'
Changes will be effective after a Reboot (CTRL+ALT+F1 may show the changes immediately)
If something went wrong, log on to tty and run the below command
$ sudo update-alternatives --quiet --set gdm-theme.gresource /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource
sudo ./ubuntu-gdm-set-background --reset
这样登录界面是改好了,操作不当还是有登录界面被改挂的风险,万一出现这种状况,只能远程连接找到对应的文件复原了。这么看来,还是希望官方在Gnome settings里面提供相关配置选项。
另外,bing搜索的主页每天都有一个图片,可以用来当壁纸,还可以。
个人觉得Ubuntu22.04的登录界面太单调了,锁屏界面也不太喜欢。现在Gnome Settings里面只能改桌面壁纸,记得之前的版本锁屏界面也是可以改壁纸的。于是一顿搜索,发现登录界面还是可以改的,锁屏界面还没有方便的更改方式,有人知道的话可以邮箱联系我,邮箱地址在github的个人信息里面。
下面是更改登录界面的过程,所谓登录界面在Linux里是Display Manager,Gnome的叫GNOME Display Manager (GDM) ,还有其它dm,比如LightDM,当你的系统安装多个dm的时候,你只能选其中的一个,而且这东西会影响其它的软件功能,以前我就遇到切换到LightDM,锁屏快捷键失效,无奈得切换回GDM3。
题外话不多说,开始操作
wget -qO - https://github.com/PRATAP-KUMAR/ubuntu-gdm-set-background/archive/main.tar.gz | tar zx --strip-components=1 ubuntu-gdm-set-background-main/ubuntu-gdm-set-background
看得懂脚本的可以用编辑器打开看看,脚本依赖libglib2.0-dev-bin这个包,该包提供一个叫gresource的工具能操作.gresource结尾的文件,而.gresource文件就是GTK-3的主题CSS文件预编译后的二进制格式数据文件,该脚本就是通过这样的方式更改相关样式的。
测试了下,我还是喜欢图片,内容丰富些。
➜ ~ ls -al ubuntu-gdm-set-background
-rwxrwxr-x 1 mephisto mephisto 10752 Feb 3 12:41 ubuntu-gdm-set-background
➜ ~ file ubuntu-gdm-set-background
ubuntu-gdm-set-background: Bourne-Again shell script, Unicode text, UTF-8 text executable
➜ ~ ./ubuntu-gdm-set-background --help
ubuntu-gdm-set-background script (for changing Ubuntu 20.04, 21.04, 21.10 & 22.04 GDM Background) HELP
there are four options
1. background with image
2. background with color
3. background with gradient horizontal ( requires two valid hex color inputs)
4. background with gradient vertical ( requires two valid hex color inputs)
Tip: be ready with valid hex color code in place of below example like #aAbBcC or #dDeEfF. Change them to your preffered hex color codes.
you may choose colors from https://www.color-hex.com/
Example Commands:
1. sudo ./ubuntu-gdm-set-background --image /home/user/backgrounds/image.jpg
2. sudo ./ubuntu-gdm-set-background --color \#aAbBcC
3. sudo ./ubuntu-gdm-set-background --gradient horizontal \#aAbBcC \#dDeEfF
4. sudo ./ubuntu-gdm-set-background --gradient vertical \#aAbBcC \#dDeEfF
5. sudo ./ubuntu-gdm-set-background --reset
6. ./ubuntu-gdm-set-background --help
RESCUE_MODE, Example Commands:
1. $ sudo ./ubuntu-gdm-set-background --image /home/user/backgrounds/image.jpg rescue
2. $ sudo ./ubuntu-gdm-set-background --color \#aAbBcC rescue
3. $ sudo ./ubuntu-gdm-set-background --gradient horizontal \#aAbBcC \#dDeEfF rescue
4. $ sudo ./ubuntu-gdm-set-background --gradient vertical \#aAbBcC \#dDeEfF rescue
Why RESCUE_MODE?
It is when you try to change the background with some other scripts and then interacted with this script,
there will be some conflicts. In case you ran other scripts to change the background and then tried this script,
found conflicts? then add 'rescue' to the end of the command as mentiond above.
Please note that for 'RESCUE_MODE' active internet connection is necessary
后面图片路径,输入要使用的图片的全路径,别偷懒,重新登录即可生效
➜ ~ sudo ./ubuntu-gdm-set-background --image ~/Pictures/th.jpeg
😕 Seems 'background change is successful'
Changes will be effective after a Reboot (CTRL+ALT+F1 may show the changes immediately)
If something went wrong, log on to tty and run the below command
$ sudo update-alternatives --quiet --set gdm-theme.gresource /usr/share/gnome-shell/theme/Yaru/gnome-shell-theme.gresource
sudo ./ubuntu-gdm-set-background --reset
这样登录界面是改好了,操作不当还是有登录界面被改挂的风险,万一出现这种状况,只能远程连接找到对应的文件复原了。这么看来,还是希望官方在Gnome settings里面提供相关配置选项。
另外,bing搜索的主页每天都有一个图片,可以用来当壁纸,还可以。