如何更改GDM登录屏幕墙纸?


14

如何更改GDM 3.6壁纸?我不是说桌面背景,而是登录时的墙纸(GDM 3.6)。

谢谢


谢谢您的回答,

我确切地知道你的意思。最近我安装了LightDm,但是今天我卸载了它,并用GDM替换了它。Ubuntu-Tweak不显示登录屏幕外观按钮。我认为是因为当前未安装LightDM。有人知道图像存储在哪里吗?


我不敢相信这不是重复的,但是我只花了10分钟进行搜索,却一无所获... +1,希望您能把它排序。
汤姆·布鲁斯曼

Answers:



4
  1. 将要使用的图像复制到/usr/share/gnome-shell/theme文件夹中

    sudo gedit /usr/share/gnome-shell/theme/gnome-shell.css
    
  2. 搜索以下部分

    #lockDialogGroup {
    background: #2e3436 url(noise-texture.png);
    background-repeat: no-repeat;
    
  3. 将图像名称更改为您的图像

  4. 背景设置为重复不重复

  5. 保存文件

注销,您的新背景就在那里


3

按照Arch Linux Wiki上的说明进行操作:

https://wiki.archlinux.org/index.php/GDM#Log-in_screen_background_image

这是您需要做的:

1.提取gnome-shell-theme bianry

创建并运行以下脚本(/usr/local/bin/extractgst.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.编辑gnome-shell-theme.gresource.xml和gnome-shell.css(部分#lockDialogGroup

这将创建目录$HOME/shell-theme/theme。将目录更改为此位置。

然后gnome-shell-theme.gresource.xml在上面的目录中创建文件。

对于以下内容,必须将imagefilename替换为背景图像的文件名。

<?xml version="1.0" encoding="UTF-8"?>
<gresources>
  <gresource prefix="/org/gnome/shell/theme">

    <file>imagefilename</file>

    <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>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-hc.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>

现在,打开gnome-shell.css目录中的-file并按如下所示更改#lockDialogGroup定义:

#lockDialogGroup {
  background: #2e3436 url(imagefilename);
  background-size: [WIDTH]px [HEIGHT]px;
  background-repeat: no-repeat;
}

设置background-size为GDM使用的分辨率,这不一定是图像的分辨率。

3.然后再次编译它

最后,使用以下命令编译主题:

glib-compile-resources gnome-shell-theme.gresource.xml

4.复制编译的gnome-shell-theme文件

并将生成的gnome-shell-theme.gresource-file 复制到/usr/share/gnome-shell目录。

5.重新启动gdm或注销

最终重新启动gdm或仅注销。

完蛋了!


1
我同意并在此处自动化此解决方案:gitlab.com/zachbryant/Bash-Scripts/raw/master/GDM%20Custom%20Bg/…–
Zach

@Zach为什么不发布脚本作为该问题的答案?ping我,我会投票的。。。您至少会从3分提高到13分!
WinEunuuchs2Unix

1

如何更改Gnome 3锁定屏幕背景:

  • GDM背景灰色位于 /usr/share/gnome-shell/theme/noise-texture.png
    • 重命名noise-texture.pngnoise-texture.png.bak(作为根)
    • 在上面的文件夹中复制您选择的背景,并将其重命名为noise-texture.png(作为根)
    • 重新启动gnome-shell:Alt+ F2R然后按Enter

(对gnome-shell的每次更新都会用原始文件替换您的noise-texture.png,因此您在每次gnome-shell升级后都会重复上述步骤)

资源


0

您将需要Ubuntu Tweak,如果尚未安装,则可以通过在终端中运行以下代码来安装它。

sudo add-apt-repository ppa:tualatrix/ppa
sudo apt-get update
sudo apt-get install ubuntu-tweak

然后启动Ubuntu Tweak,并在搜索栏中搜索“登录”,然后单击“登录设置”,然后按搜索栏右上角的解锁按钮。然后,您可以通过更改背景或图标主题来选择自己的登录屏幕。

在此处输入图片说明

这对于GDM登录和LightDM应该都适用。

来源:http//www.techdrivein.com/2011/01/how-to-change-gdmlogin-screen.html


4
这不适用于GDM(3)。
Tommy Brunn

看起来很有希望,但不适用于Ubuntu 13.04
2013年


0

我刚刚去探索。查看/etc/gdm/greeter.gsettings

在终端中,您可以通过输入以下内容来获得对该文件的读取访问权限:

nano /etc/gdm/greeter.gsettings

您将在该文件中看到对:的引用,/usr/share/themes/Adwaita/backgrounds 该引用似乎保留了您要查找的条纹背景。祝好运!

请记住,您需要提升使用sudo来写入此目录。或者,如果您希望使用图形界面,则可以在终端中键入此命令以gedit提升用户身份打开,但请注意不要破坏系统:

gksudo gedit /etc/gdm/greeter.gsettings

不,对我
没用
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.