MacOS desktop background won’t change

610 Views Asked by At

I was playing around with a python script that downloads and changes the wallpaper, and suddenly the wallpaper went black and won’t change even through the preferences menu. The dock also stopped working and I am no longer able to switch apps using cmd + tab.

I tried restarting the computer, resetting the PRAM, deleting both the com.apple.finder.plist and the com.apple.desktop.plist files, and running a defaults write com.apple.finder CreateDesktop true; killall Finder command. If I run a killall Dock it says they there are no Dock processes running.

The python script I was playing with was just running a simple osascript:

/usr/bin/osascript<<END
tell application "Finder"
set desktop picture to POSIX file "%s"
end tell

Nothing worked. Any ideas on how I could fix this problem? Im on Monterey.

1

There are 1 best solutions below

0
On

I found a solution. It was hidden in a comment on another similarly related stack overflow question here.

As described by one of the comments, the problem happened after trying to set a malformed image file as my background. I followed the suggested step to delete my ~/Library/Application Support/Dock directory, which solved the problem instantly.