Horje
cron can't change wallpaper ubuntu Code Example
cron can't change wallpaper ubuntu
#!/bin/bash
# you must set some environment variables
# before cron can change your wallpaper
# please go see the source answer on askubuntu.com for more details

user=$(whoami)

fl=$(find /proc -maxdepth 2 -user $user -name environ -print -quit)
while [ -z $(grep -z DBUS_SESSION_BUS_ADDRESS "$fl" | cut -d= -f2- | tr -d '\000' ) ]
do
  fl=$(find /proc -maxdepth 2 -user $user -name environ -newer "$fl" -print -quit)
done

export DBUS_SESSION_BUS_ADDRESS=$(grep -z DBUS_SESSION_BUS_ADDRESS "$fl" | cut -d= -f2-)

/usr/bin/gsettings set org.gnome.desktop.background picture-uri file:////the/path/to/your/image




Shell

Related
check swiftly version linux Code Example check swiftly version linux Code Example
why can't i find execute option in ubuntu properties Code Example why can't i find execute option in ubuntu properties Code Example
open folder vim Code Example open folder vim Code Example
bash return specific lines from history Code Example bash return specific lines from history Code Example
see ADS content Code Example see ADS content Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
11