<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_wm_wallpaper(img):
 """Set the wallpaper for non desktop environments."""

    if shutil.which("feh"):
        util.disown(["feh", "--bg-fill", img])

    elif shutil.which("nitrogen"):
        util.disown(["nitrogen", "--set-zoom-fill", img])

    elif shutil.which("bgs"):
        util.disown(["bgs", "-z", img])

    elif shutil.which("hsetroot"):
        util.disown(["hsetroot", "-fill", img])

    elif shutil.which("habak"):
        util.disown(["habak", "-mS", img])

    elif shutil.which("display"):
        util.disown(["display", "-backdrop", "-window", "root", img])

    else:
        logging.error("No wallpaper setter found.")
        return