仅记录以便日后使用:
- 执行gresource-export.sh,将资源文件备份到$HOME/shell-theme目录
- 将导出的$HOME/shell-theme/theme中的所有文件,保存到gnome-shell-theme.gresource.xml中
- 将想要更新的背景图片放到$HOME/shell-theme/theme下命名为login-background.png,并在xml中增加该文件信息
- 修改导出的gnome-shell.css文件,将lockDialog改为以下内容:
#lockDialogGroup {
background: url(login-background.png);
background-size: 1920px 1080px;
background-repeat: no-repeat; }
- 在$HOME/shell-theme/theme目录下执行
glib-compile-resources gnome-shell-theme.gresource.xml
,生成新的gnome-shell-theme.gresource - 将新的gnome-shell-theme.gresource复制到/usr/share/gnome-shell/下并重启系统即可
- 最终效果:
gresource-export.sh内容:
#!/bin/sh
gst=/usr/share/gnome-shell/gnome-shell-theme.gresource
workdir=${HOME}/shell-theme
for r in `gresource list $gst`; do
r=${r
if [ ! -d $workdir/${r%/*} ]; then
mkdir -p $workdir/${r%/*}
fi
done
for r in `gresource list $gst`; do
gresource extract $gst $r >$workdir/${r
done
gnome-shell-theme.gresource.xml内容:
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/org/gnome/shell/theme">
<file>calendar-arrow-left.svg</file>
<file>calendar-arrow-right.svg</file>
<file>calendar-today.svg</file>
<file>checkbox-focused.svg</file>
<file>checkbox-off-focused.svg</file>
<file>checkbox-off.svg</file>
<file>checkbox.svg</file>
<file>close-window-active.svg</file>
<file>close-window-hover.svg</file>
<file>close-window.svg</file>
<file>corner-ripple-ltr.png</file>
<file>corner-ripple-rtl.png</file>
<file>dash-placeholder.svg</file>
<file>gnome-shell.css</file>
<file>gnome-shell-high-contrast.css</file>
<file>icons/message-indicator-symbolic.svg</file>
<file>key-enter.svg</file>
<file>key-hide.svg</file>
<file>key-layout.svg</file>
<file>key-shift-latched-uppercase.svg</file>
<file>key-shift.svg</file>
<file>key-shift-uppercase.svg</file>
<file>login-background.png</file>
<file>no-events.svg</file>
<file>noise-texture.png</file>
<file>no-notifications.svg</file>
<file>pad-osd.css</file>
<file>page-indicator-active.svg</file>
<file>page-indicator-checked.svg</file>
<file>page-indicator-hover.svg</file>
<file>page-indicator-inactive.svg</file>
<file>process-working.svg</file>
<file>toggle-off-hc.svg</file>
<file>toggle-off-intl.svg</file>
<file>toggle-off-us.svg</file>
<file>toggle-on-hc.svg</file>
<file>toggle-on-intl.svg</file>
<file>toggle-on-us.svg</file>
</gresource>
</gresources>
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)