Change login (gdm) background picture or color in GNOME 3

1. Switch to gdm user.

sudo su - gdm -s /bin/bash

2. View dbus information

dbus-launch
DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-eu0FhGDTaj,guid=88e71479abc78714c0d182840000018f
DBUS_SESSION_BUS_PID=1428

3. Set environment variables

export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-eu0FhGDTaj,guid=88e71479abc78714c0d182840000018f
export DBUS_SESSION_BUS_PID=1428
export GSETTINGS_BACKEND=dconf

4. Run ‘dconf-service’

/usr/lib/dconf/dconf-service &

5. Get current picture path and color

gsettings get org.gnome.desktop.background picture-uri
gsettings get org.gnome.desktop.background primary-color

6. Set new picture or color

gsettings set org.gnome.desktop.background picture-uri 'file:///usr/share/backgrounds/hello.jpg'
gsettings set org.gnome.desktop.background primary-color '#3465a4'

Over!

5 thoughts on “Change login (gdm) background picture or color in GNOME 3”

  1. 我这里似乎只能 get 不能 set?dconf-service 启动失败:
    g_dbus_connection_real_closed: Remote peer vanished with error: Underlying GIOStream returned 0 bytes on an async read (g-io-error-quark, 0). Exiting.

    但是上面的都是正常的。

Leave a Reply

Your email address will not be published. Required fields are marked *