5

I want to get current location of my macOS wallpaper. Is there a file or a command that will allow me to find this data?

I would prefer a way that would allow me to do it from the Terminal.

macOS: Mojave Public Beta

1
  • What version of macOS are you using?
    – IconDaemon
    Commented Jul 29, 2018 at 17:12

1 Answer 1

13

This article from OSXDaily.com should be helpful:

Show the Location Path of Current Wallpaper in Mac OS X

  1. Type the following defaults write command:

defaults write com.apple.dock desktop-picture-show-debug-text -bool TRUE;killall Dock

  1. Go to the desktop to see the path printed over the wallpaper images

  1. After you’ve retrieved the desktop picture (use Command+Shift+G to bring up the Go To Folder window), or done what you have needed to do, you can hide the path text by using the following command:

defaults delete com.apple.dock desktop-picture-show-debug-text;killall Dock


To determine the path for wallpaper via Terminal, execute the following:

osascript -e 'tell app "finder" to get posix path of (get desktop picture as alias)'

6
  • Thanks for your response. I've upvoted it as I didn't precise how I would like to get the data
    – mdmb
    Commented Jul 29, 2018 at 16:37
  • 1
    Updated the answer to include command line to obtain the filesystem path.
    – Nimesh Neema
    Commented Jul 29, 2018 at 16:40
  • 1
    A little Google-Fo reveals that it's possibly a Automator bug in macOS Mojave. Works fine in macOS High Sierra. Links: stackoverflow.com/questions/51299066/… reddit.com/r/MacOSBeta/comments/8yvzll/…
    – Nimesh Neema
    Commented Jul 29, 2018 at 16:45
  • 2
    terminal command tells me the path to the picture on the primary monitor, but not my second or third external monitor, or different virtual desktops. How does one iterate desktops?
    – frumbert
    Commented Jul 30, 2018 at 0:05
  • 3
    Using this on macOS Mojave. It did not work on Public Beta 4 because of permissions problems. With Public Beta 5 it gives Can’t make missing value into type alias..
    – mdmb
    Commented Aug 8, 2018 at 8:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .