Manjaro --Gnome更换登录页背景图片

manjaro 如何更换login界面的背景图片,默认的带斜杠的图片想换掉,试过乌班图的解决方式未能生效,哪位有相关教程链接,感谢您能在reply里粘贴下,多谢!

#!/usr/bin/sh

使用方式 IMAGE=/usr/local/images/whatever.png sh login-background.sh

if [ "$IMAGE" = "" ]; then
IMAGE=$(
dbus-launch gsettings get org.gnome.desktop.screensaver picture-uri |
sed -e "s/'//g" |
sed -e "s/^file:////g"
)
fi

if [ ! -f $IMAGE ]; then
echo "unknown IMAGE $IMAGE"
exit 1
fi

echo ''
echo 'using the following image as login background:'
echo $IMAGE
echo ''

if [ -d ~/tmp ]; then
CREATED_TMP="0"
else
mkdir -p ~/tmp
CREATED_TMP="1"
fi

WORKDIR=~/tmp/gdm-login-background
GST=/usr/share/gnome-shell/gnome-shell-theme.gresource
GSTRES=$(basename $GST)

mkdir -p $WORKDIR
cd $WORKDIR
mkdir theme

for r in gresource list $GST; do
gresource extract $GST $r >$WORKDIR$(echo $r | sed -e 's/^/org/gnome/shell////g')
done

cd theme
cp "$IMAGE" ./

echo "
#lockDialogGroup {
background: #2e3436 url(resource:///org/gnome/shell/theme/$(basename $IMAGE));
background-size: cover;
background-repeat: no-repeat;
}" >>gnome-shell.css

echo '<?xml version="1.0" encoding="UTF-8"?>

' >"${GSTRES}.xml"
for r in ls *.*; do
echo " $r" >>"${GSTRES}.xml"
done
echo '
' >>"${GSTRES}.xml"

glib-compile-resources "${GSTRES}.xml"

sudo mv "/usr/share/gnome-shell/$GSTRES" "/usr/share/gnome-shell/${GSTRES}.backup"
sudo mv "$GSTRES" /usr/share/gnome-shell/

rm -r $WORKDIR

if [ "$CREATED_TMP" = "1" ]; then
rm -r ~/tmp
fi

以上脚本,暂时不敢执行,还请各位指教是否可行

curl -L -O http://archibold.io/sh/archibold
chmod +x archibold
sudo mv archibold /usr/bin/

# to know all options
archibold

# in case your lock screen is what you want as login background
archibold login-background

# in case you want a different image as background
# archibold login-background /usr/dir/different/image.png

以上为更简洁的解决方案,尚未验证有效性,待验证

更换gnome登录页背景图片解决方案链接

https://bbs.archlinux.org/viewtopic.php?id=197036

Forum kindly sponsored by