dot rc

Sign in or create your account | Project List | Help

dot rc Git Source Tree

Root/gnome/nautilus-scripts/background

Source at commit 173f1fb1ea163351f940b681b0cb45f6e5eafd3f created 2 years 9 months ago.
By Luciano M. F. Rocha, search for DBUS session server address
1#!/bin/bash
2cmd="gconftool-2 -s /desktop/gnome/background/picture_filename --type string"
3dir="$HOME/Pictures/backgrounds"
4declare -a imgs
5
6export DBUS_SESSION_BUS_ADDRESS=unix:abstract=$(netstat -xl | grep -o '/tmp/dbus.*' | head -1)
7imgs=($dir/*)
8i=$(($RANDOM*${#imgs[*]}/32768))
9image="${imgs[$i]}"
10$cmd "$image"
11

Archive Download this file

Branches:
master