3

I would like to change the background images of folders in Mac OS 10.9 based on their name. I can't seem to find any way of changing the background picture in Python or much information about the background picture in general.

I believe things such as background image and icon positioning are stored in the .DS_Store, is it a possibility to modify this to change the image?

If it is not possible in Python is there a suggested language to be able to so this?

user2248702
  • 2,327
  • 4
  • 32
  • 61

1 Answers1

1

I believe things such as background image and icon positioning are stored in the .DS_Store, is it a possibility to modify this to change the image?

you can explore the DS_Store settings using the xattr command, or the ls -@ command if you're using default osx utils.

If it is not possible in Python is there a suggested language to be able to so this?

there is the xattr python package that lets you do this.

For the background images, I found that answer though it's mostly about DMGs.

Though, there's a graphical recipe to actually change a folder's background, I still can't find the extended attribute property being used there…

I did change a folder's background, but there's no extended attributes setting that has been changed because of that. And that folder contains no .DS_Store file as well. That information maybe stored in some Application Support or Preferences database used by the finder…

Finally, you could code your own DS_Store parsing module easily, using the following information:

which tells us that the DS_Store has indeed a background field.

Finally, it looks like perl has a DS_Store module:

Community
  • 1
  • 1
zmo
  • 22,917
  • 4
  • 48
  • 82