GithubHelp home page GithubHelp logo

tech-otaku / macos-desktop Goto Github PK

View Code? Open in Web Editor NEW
40.0 4.0 12.0 345 KB

Set a user's Desktop image in macOS 10.14 Mojave through macOS 13 Ventura from the command line.

Home Page: https://www.tech-otaku.com/mac/setting-desktop-image-macos-mojave-from-command-line/

License: MIT License

Shell 91.15% Python 8.85%
macos mojave desktop-image catalina big-sur macos-desktop command-line monterey ventura

macos-desktop's Introduction

Set macOS Desktop Image

IMPORTANT: [2023-09-25] This repo has not been updated for macOS 14 Sonoma. The last supported version is macOS 13 Ventura.

The scripts set-desktop-mojave.sh, set-desktop-catalina.sh and set-desktop-big-sur.sh have been removed from the repo in favour of set-desktop.sh which can be used for all macOS versions since macOS 10.14 Mojave.

See A Comparison of Apple-supplied Desktop Images Since macOS 10.14 Mojave

Table of Contents [TOC]

Information on macOS 13 Ventura version.

Information on macOS 12 Monterey version.

Information on macOS 11 Big Sur version.

Information on macOS 10.15 Catalina version

Information on macOS 10.14 Mojave version

macos-desktop's People

Contributors

tech-otaku avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

macos-desktop's Issues

Doesn't work with Catalina

Hey! We branched this over at Mozilla, and we're starting our early-phase 10.15 Catalina testing.

Right now the script isn't working -- we've started working on trying to get things sorted out so hopefully it'll work and made the following changes in our fork: https://github.com/mozilla/macos-desktop/pull/1/files

If we figure out what else is going on to get this working in Catalina we'll let you know.

License Request

First of all, thank you so much for your amazing blog post and this excellent script. We'd like to use your script in production for our macOS deployment at Mozilla (with full attribution of course), but wondered how you'd like to license this project.

Would you be willing to provide a license file for this project?

Support for multiple screens

I was wondering if there was going to be any support for changing the background of multi-screen environments in BigSur? I've noticed this line in the script:

This script should not be used in a dual-monitor environment.

Is that due to some apple limitation?

I keep getting an error

Result of command:
Error: unable to open database "/Library/Application Support/Dock/desktoppicture.db": unable to open database file
/Library/Application Support/JAMF/set-desktop-mojave.sh: line 100: [: -ge: unary operator expected
Error: unable to open database "/Library/Application Support/Dock/desktoppicture.db": unable to open database file
/Library/Application Support/JAMF/set-desktop-mojave.sh: line 107: [: -ge: unary operator expected
Error: unable to open database "/Library/Application Support/Dock/desktoppicture.db": unable to open database file
[message repeats 8 times]
The Desktop image has been set to /Library/Desktop Pictures/Solar Gradients.heic.

'set-desktop-catalina.sh' with macOS Catalina Beta

1. Location of Apple-supplied Desktop Images

In macOS Catalina Beta (19A487l), the Apple-supplied Desktop images are located in /System/Library/Desktop Pictures as opposed to /Library/Desktop Pictures in Mojave which under Catalina now contains individual symbolic links to the images in /System/Library/Desktop Pictures. However, there is no symbolic link to /System/Library/Desktop Pictures/Solid Colors.

set-desktop-catalina.sh "/Library/Desktop Pictures/High Sierra.jpg" will work as it points to the symbolic link, but set-desktop-catalina.sh "/Library/Desktop Pictures/Solid Colors/Dusty Rose.png" will fail as the file doesn't exist at that location.

Suggest using set-desktop-catalina.sh "/System/Library/Desktop Pictures/[Solid Colors]/image.jpg" for non-dynamic Apple-supplied Desktop images.


2. System Preferences Adding Additional Rows to the data and preferences table

In macOS Catalina Beta (19A487l), changing the Desktop image through System Preferences to Catalina Automatic, Catalina Light (Still) or Catalina Dark (Still) sometimes results in an extra row with a value of /Library/Desktop Pictures being added to the data table along with four additional corresponding rows in the preferences table all with key values of 10.

Other changes to the Desktop image through System Preferences sometimes result in an extra row with a value of ~/Library/Caches/com.apple.preference.desktopscreeneffect.desktop/69732352/DSKAppleRootSource being added to the data table along with four additional corresponding rows in the preferences table all with key values of 10.

The inclusion/exclusion of these additional rows doesn't seem to impact the display of the Desktop image nor the integrity of the desktoppicture.db database. In the latter case, the folder ~/Library/Caches/com.apple.preference.desktopscreeneffect.desktop doesn't even exist.

set-desktop-catalina.sh doesn't currently create these additional rows in the data and preferences tables.

Error on lines 194 and 213 - python not found

Hello community,

been trynna do this through a bash script via intune but without much luck. I might be doing something wrong:
I do have python installed

#!/bin/bash mkdir /Users/Shared/Wallpaper cd /Users/Shared/Wallpaper curl -J -o /Users/Shared/Wallpaper/macos-desktop-main.zip https://codeload.github.com/tech-otaku/macos-desktop/zip/refs/heads/main unzip macos-desktop-main.zip cd macos-desktop-main curl -o 29_12_2022.png https://xxxx.blob.core.windows.net/xxx/Wallpaper/29_12_2022.png chmod +x set-desktop.sh ./set-desktop.sh 29_12_2022.png

terminal output:

./set-desktop.sh: line 194: python: command not found ./set-desktop.sh: line 213: python: command not found ./set-desktop.sh: line 213: [: -ge: unary operator expected The Desktop image has been set to '29_12_2022.png'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.