Last active

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist

Use DBus calls to set the current user's wallpaper

View set-wallpaper.sh
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#!/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
Something went wrong with that request. Please try again.