Create a gist now

Instantly share code, notes, and snippets.

Use DBus calls to set the current user's wallpaper
#!/bin/sh
#
# Usage: set-wallpaper.sh <filename>
path=`dbus-send --system --print-reply=literally \
--dest=org.freedesktop.Accounts --type=method_call \
/org/freedesktop/Accounts \
org.freedesktop.Accounts.FindUserByName string:"$USER"`
dbus-send --system --print-reply \
--dest=org.freedesktop.Accounts \
--type=method_call $path \
org.freedesktop.Accounts.User.SetBackgroundFile \
string:"$1"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment