修改gdm登陆主题

pic

1. 保存下面的文件为theme.sh, 然后执行 sh theme.sh
#!/bin/sh
workdir=${HOME}/shell-theme
if [ ! -d ${workdir}/theme ]; then
mkdir -p ${workdir}/theme
fi
gst=/usr/share/gnome-shell/gnome-shell-theme.gresource
for r in `gresource list $gst`; do
gresource extract $gst $r >$workdir${r/#\/org\/gnome\/shell/}
done  
2. 进入shell-theme文件夹,此时你会看到你解压出来的文件,通过名字我们也可以知道某个文件事干什么的

接下来你需要建立一个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.svg</file>
    <file>close.svg</file>
    <file>corner-ripple-ltr.png</file>
    <file>corner-ripple-rtl.png</file>
    <file>dash-placeholder.svg</file>
    <file>filter-selected-ltr.svg</file>
    <file>filter-selected-rtl.svg</file>
    <file>gnome-shell.css</file>
    <file>gnome-shell-high-contrast.css</file>
    <file>logged-in-indicator.svg</file>
    <file>filename</file>
    <file>more-results.svg</file>
    <file>no-events.svg</file>
    <file>no-notifications.svg</file>
    <file>noise-texture.png</file>
    <file>page-indicator-active.svg</file>
    <file>page-indicator-inactive.svg</file>
    <file>page-indicator-checked.svg</file>
    <file>page-indicator-hover.svg</file>
    <file>process-working.svg</file>
    <file>running-indicator.svg</file>
    <file>source-button-border.svg</file>
    <file>summary-counter.svg</file>
    <file>toggle-off-us.svg</file>
    <file>toggle-off-intl.svg</file>
    <file>toggle-on-us.svg</file>
    <file>toggle-on-intl.svg</file>
    <file>ws-switch-arrow-up.png</file>
    <file>ws-switch-arrow-down.png</file>
  </gresource>
</gresources>

** 注意: xml文件里面有一个filename,markdown不好标注,那里要改成你自己的背景图片的名称**

3. 打开gnome-shell.css,找到#lockDialogGroup 修改如下
	#lockDialogGroup {
		background: #2e3436 url(filename);
		background-size: [WIDTH]px [HEIGHT]px;
		background-repeat: no-repeat;
	}
4. 最后重新编译gresource文件,通过如下命令
	 glib-compile-resources gnome-shell-theme.gresource.xml  

然后将生成的gnome-shell-theme.gresource文件复制到/usr/share/gnome-shell,替换原有的gresource文件即可,来张效果图:
<br>

picpic

转载于:https://my.oschina.net/pointeraddress/blog/855914

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值