CUBISTCODE

CUBISTCODE

Set a Random Desktop on Linux using this Python script

#!/usr/bin/env python

import os
import random

#set this to where your desktops are
desktops_directory="/home/jtree/Pictures/Backgrounds"
random_file = os.path.join(desktops_directory,random.choice(os.listdir(desktops_directory)))
os.execlp("hsetroot","hsetroot","-fill",random_file)


Tags: python, random, scripts

Rate This Article:



Privacy Policy | Copyright/Trademark Notification