Custom Login Background for High Sierra - Share?

TomDay
Release Candidate Programs Tester

Been having trouble deploying our custom login background ever since 10.12 dropped and still no luck with 10.13. I've read countless posts, including this really popular one, I can get my image to copy over to the correct location with appropriate permissions but the image never shows up, at login, it's still the default blurred image. I think I might be doing something wrong with the transparency and layers of the image. Anyone have a 10.13 image they are using for login backgrounds that they can share?

13 REPLIES 13

donmontalvo
Esteemed Contributor III

We tested Configuration Profile:

Restrictions > Functionality > [x] Lock desktop picture [defaultPath]

We never moved forward with it, since we are trying not to tinker/tamper with users' space.

Just a thought, not saying it is a good/bad idea, just a business decision.

But for image format we used in testing is PNG at the largest resolution we have out in the environment, seems to work.

We dropped the PNG into /Library/Company/DesktopPattern/desktopPattern.png, owned by root:wheel, set to 644.

--
https://donmontalvo.com

georgecm12
Contributor III

I've followed that blog you linked to, and it works... sometimes. It seems to be very intermittent. I've mostly given up on it.

Cornoir
Contributor II

Take a look at this thread.

https://www.jamf.com/jamf-nation/discussions/21605/sierra-login-wallpaper

I have tested my way up to OSX 13.2 and it still works and I have not had to deal with SIP.
If it does not work try the other thread comments.

TomDay
Release Candidate Programs Tester

@donmontalvo For us it's not intrusive on the users space, I just want to be able to set a login background that contains a custom image with our company seal. Makes for a nice look on the machines we own and manage.

@Cornoir I've commented on that thread and the script combined with a policy works beautifully. The issue is that the image never appears as the login background, so I think there is something with the image I am doing incorrectly.

jalcorn
Contributor II

@TomDay did you ever figure this out?

Look
Valued Contributor III

Here is ours.
We deliver this file to this location with the permissions shown.
-r--r--r--@ 1 root admin /Library/Caches/com.apple.desktop.admin.png
This will force the login picture and make it unchanging until a macOS or cache clearing process changes or deletes it.
There for we have an EA as follows.

#!/bin/bash
if [[ "$(ls -l /Library/Caches/com.apple.desktop.admin.png | awk '/-r--r--r--/')" ]]; then
echo "<result>TRUE</result>"
else
echo "<result>FALSE</result>"
fi

This populates a smart group of devices and a daily policy for when it is FALSE which simply re-applies the original package to fix the issue.
It does mean for a short while after a macOS update you have the wrong picture and this will stay displayed until the first login or restart, but it seems to be fairly effective at maintaining the company image.

TomDay
Release Candidate Programs Tester

@jalcorn Nope, I threw in the towel and had to move on, though @Look just posted something cool i'll have to check out.

marktaylor
Contributor

We use the same method as @Look with our custom image renamed as com.apple.desktop.admin.png and its been working well since 10.12.

Cornoir
Contributor II

Here is the process to change the login window background screen to show a custom image and for that image to not show up as blurred. The 2 processes mentioned previously are both used for this. Tested on OS X 10.13.4 and below.
1 - Place you custom image in the /Library/Desktop Pictures/ folder
2 - Rename Sierra.jpg to SierraBKUP.jpg
3 - Rename your custom image to Sierra.jpg and restart. You now have a custom, but blurred login window screen.
4 - Go to /Library/Caches/ and open in Preview the com.apple.desktop.admin.png file.
5 - In Preview go to Tools -> Show Inspector. Take note of the Image size (pixels).
6 - In Preview open your original custom image. Go to Tools -> Adjust Size.
7 - Change the Width & Height (pixels) to match the Image Size from Step 5. Export the file in PNG format with the name com.apple.desktop.admin into the /Library/Caches and restart.
Viola!!

nikgio
New Contributor III

I'm having the same issue you are. I created the PNG file with transparency (best I could) and tested the script. It runs fine, but still doesn't change the login screen background. Following...

marck
New Contributor III

Thought I'd add what I've done that appears to work.

As originally posted you should review Erik Gomez "APPLE’S EFI LOGONUI – MANAGING MACOS SIERRA’S WALLPAPER" at https://blog.eriknicolasgomez.com/2016/09/24/apples-efi-logonui-managing-macos-sierras-wallpaper/ .There may be newer info there than when this thread started. Also read the comments there.

Key info as I see it.
There are two variations of the background image, blurred and un-blurred.
You need both a .png and .jpg image if you want un-blurred
The files needs to use exactly the correct names
The images can not have EXFI data in them.
Permissions are important.

Blurred Login Window version

Make your default desktop image and save it as a .jpg being sure there is no EXFI info in the file. You can open the file in Preview and save save it to remove the EXFI.

Put the image at "/Library/Desktop Pictures/High Sierra.jpg"

Set the file permissions as follows, the chflags setting my not really be needed.

/usr/sbin/chown root:wheel /Library/Desktop Pictures/High Sierra.jpg
/bin/chmod 755 /Library/Desktop Pictures/High Sierra.jpg
/usr/bin/chflags uchg /Library/Desktop Pictures/High Sierra.jpg

Run this undocumented defaults command, it makes the Login Window use a blurred version of the "High Sierra.jpg"

defaults write /Library/Preferences/com.apple.loginwindow ForceDefaultDesktop -bool true

Un-blurred Login Window version

Make your default desktop image and save it as both a .jpg and .png being sure there is no EXFI info in the file. You can open the file in Preview and save save it to remove the EXFI.

Put the .jpg at "/Library/Desktop Pictures/High Sierra.jpg"
Put the .png at "/Library/Caches/com.apple.desktop.admin.png"

Set the file permissions as follows, the chflags setting my not really be needed.

/usr/sbin/chown root:wheel /Library/Desktop Pictures/High Sierra.jpg
/bin/chmod 755 /Library/Desktop Pictures/High Sierra.jpg
/usr/bin/chflags uchg /Library/Desktop Pictures/High Sierra.jpg

/usr/sbin/chown root:wheel /Library/Caches/com.apple.desktop.admin.png
/bin/chmod 755 /Library/Caches/com.apple.desktop.admin.png
/usr/bin/chflags uchg /Library/Caches/com.apple.desktop.admin.png

DO NOT run the defaults command.

kextcache
Updating the Kernel Extensions cache as noted in Erik's blog does not appear to really be necessary for standard setups.

MzLoretta
New Contributor

@cornoir Your solution worked like a charm. I even tried using Onyx software and that didn't work. Using Sierra 10.12

MacMaul
New Contributor II

I was able to change the Mojave default user desktop by using @marck 's instructions but I had to name our custom jpeg file to "Mojave.heic". Also, I don't use the ForceDefaultDesktop command with Mojave and the login screen ends up being the replaced Mojave.heic file. I'm using a single .pkg installer to install our custom El Capitan.jpg, Sierra.jpg, High Sierra.jpg and Mojave.heic and a postinstall script that only runs the ForceDefaultDesktop command if the OS is High Sierra or lesser:

#!/bin/sh
## postinstall

# Determine OS version
osvers=$(sw_vers -productVersion | awk -F. '{print $2}')

# If OS is 10.13 or less, run the loginwindow defaults command
if [[ ${osvers} -le 13 ]]; then
    defaults write /Library/Preferences/com.apple.loginwindow ForceDefaultDesktop -bool true
fi

exit 0