Python 更改Arch默认启动背景画面
无聊没事干,练习下python,就用来更改Arch默认启动背景吧
准备工作:一张喜欢的背景图片,我用的是Blackarch自带的PNG格式的,其它的格式没试过。运行完成后重启看下效果
#!/usr/bin/env python
import shutil,os,sys
banner = '''\033[2;34m
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Notice: |
| This python script is test SUCCESSFULLY on Archlinux distrubtion |
| for changed the GRUB's default background |
| It will modifield the config file "/etc/defalut/grub" |
| You can choice one favorite IMAGE.PNG replace defalut |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
\033[0m '''
def change_grub_image(image_name):
try:
grub_config_path = '/etc/default/grub'
contents = 'GRUB_THEME="/usr/share/grub/themes/starfield/theme.txt"'

本文介绍如何利用Python来更改Arch Linux系统的默认启动背景图片,作者通过实践操作,使用了一张PNG格式的背景图片,并在完成代码编写后进行了系统重启以查看效果。
最低0.47元/天 解锁文章
673

被折叠的 条评论
为什么被折叠?



