Sharing a Specific Photo to the Desktop in High Sierra (10.13.6)

This is one of those "This should be simple" macro. I thought I'd just quickly set up a macro in Photos to quickly share a selected photo to be my desktop wallpaper with just a keystroke.

(Side note: I have to use High Sierra 10.13.6, because of the age of my mid-2010 iMac. That is now the most modern system possible for this machine.)

Back to the simple macro:

I just have to use something like Control-E as the trigger to run a one-step “Select or Show a Menu item”, right?. There are three fields in it:
Menu Title “File”,
Submenu "Share",
Menu item “Set Desktop Picture”.

So simple. I just clicked the dropdown "menu" item at the right side of the Select or Show a Menu item and like magic, it's all filled in for me. Okay. Let's go!

Except it doesn't work. I get a notification saying the Photos Menu item -- which lists the three correct fields -- is “disabled.”


I manually look at the Set Desktop Picture menu item in Photos. It's looking back at me, saying, "What?" It seems enabled enough.

So, how do I get KM to first enable a visually enabled menu item so I can get this to work?

Hi. When you from Finder right click on the picture file there should be a choice to : set as desktop picture.
Not sure how to enable that in KM (how to actively use items from the right click option in KM), but which program are you trying to create this to work from?

I do also use High Sierra.

Thanks for letting me know. However, I’m still unsure how to get this otherwise simple macro to work normally.

Ok. I wondered (above)

Do you have the photos app focused when you hit Ctrl-E? Do you have a photo selected or opened when you hit Ctrl-E?

Yes, I have a specific photo selected. Thank you for asking.

I just tested a macro (that I use for other reasons) below - which does exactly what Vincent suggests - and it works.


You can either have a prompt that tells you to hover over the file or use the mouse coordinates to program it.

you would then have to move the mouse down to create desktop folder and select it, which you can do programmatically.

Hey Peter,

The problem is that the Share menu is dynamically created when you open it, so various items in it DON'T exist until the menu is actually opened by the user.

(Stupid UI on Apple's part – Bad Apple!)

The fix is simple enough though. You just need an extra Select or Show a Menu Item action to show the menu before selecting the “Set Desktop Picture” menu item.

With some apps the pause may need to be enabled and adjusted to allow the menu to properly populate, before you can select the desired item.


Set Desktop Picutre to Selected Image.kmmacros (2.9 KB)

1 Like

Bizarre. I thought a disabled pause would be irrelevant in all situations but clearly you don't think that is the case. Any ideas why, or is it just trial and error that got you there?

Hey Vincent,

The pause is not relevant as such.

It's there just in case it's needed for the Share menu to have time to populate before selecting menu items within it.

Depending upon the speed of your Mac and how many share items there are it's possible for Keyboard Maestro to be too fast to catch the desired menu item after the menu itself is opened.

In that case you can enable the pause and adjust the time as needed.

Does that clarify things?


Ah, that explains it. I didn't realise the intention was to then enable the pause if it didn't work by itself. My mistake.

Thanks so much for solving my puzzle, Chris! It works perfectly now!


1 Like