Sierra Login Wallpaper

raymondap
Contributor

In the past, we've set our login window wallpaper to our logo by placing our custom wallpaper at /Library/Caches/com.apple.desktop.admin.png

This no longer appears to work in Sierra. Has anyone been able to get this working?

12 REPLIES 12

kstrick
Contributor III

check out this article....

[https://onemoreadmin.wordpress.com/2016/09/24/apples-efi-logonui-managing-macos-sierras-wallpaper/](link URL)

raymondap
Contributor

Yeah, I had checked that out; the best I could get was a blurred unreadable logo.
It seems like Apple doesn't want you to do this anymore, and because it's such a hack, we'll probably be forced to just accept the default.

kstrick
Contributor III

I got it to mostly work, but i've seen some inconsistencies, and haven't yet verified if it's staying with filevault....
I think you could enforce with MDM, but that would mean that user's couldn't change it at all (I believe).

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.
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!!

WhippsT
Contributor

I was able to get this to work today... I used the info from THIS article. What I ended up doing was:

  1. Create the desired wallpaper as a PNG with an Alpha Channel (Transparency). Label the file "com.apple.desktop.admin.png".
  2. Use Composer to make a PKG to drop that file into /var/tmp/.
  3. Create a script with the following:
#!/bin/sh

osxversion=`/usr/bin/defaults read /System/Library/CoreServices/SystemVersion.plist ProductVersion`

# Sierra
if [[ "$osxversion" == *10.12* ]]
    then

        /bin/rm -rf /Library/Caches/com.apple.desktop.admin.png

        /bin/cp -R /var/tmp/com.apple.desktop.admin.png /Library/Caches/com.apple.desktop.admin.png

        /usr/sbin/chown root:wheel /Library/Caches/com.apple.desktop.admin.png

        /bin/chmod 644 /Library/Caches/com.apple.desktop.admin.png

        /usr/bin/chflags uchg /Library/Caches/com.apple.desktop.admin.png
fi

4. Run the PKG and the script on the desired machine(s).
5. Get another cup of coffee...

Danty2
New Contributor

Cornoir -- your technique worked perfectly! I have been trying for at least a year to create a non-blurred login screen for my iMac.

Thanks,
Danty

jmahlman
Valued Contributor

How do you get past SIP??

apizz
Valued Contributor

@jmahlman If you're looking to lock the Desktop background and not allow people to change, just use a config profile. You can copy a local file somewhere on the machine and specify the path to the image in the profile.

Otherwise we run the following to at least initially set the wallpaper and let users change:

#!/bin/bash

WALLPAPER="/Library/Scripts/TMS_Script_Resources/Masters.jpg"
USER=$(/bin/ls -l /dev/console | /usr/bin/awk '{print $3}')
LOG="/Library/Logs/TMSTech/SetDefaultDesktopWallpaper.log"

writelog() {
    /bin/echo "${1}"
    /bin/echo $(date) "${1}" >> "$LOG"
}

writelog "---------- START ----------"

if [ -f $WALLPAPER ]; then
    writelog "Wallpaper: Found. Setting wallpaper for ${USER} ..."

    /usr/bin/osascript -e 'tell application "System Events" to set picture of every desktop to ("/Library/Scripts/TMS_Script_Resources/Masters.jpg" as POSIX file as alias)'

    if [ $? = 0 ];then
        writelog "Wallpaper: Successfully changed for ${USER}!"
    else
        writelog "Wallpaper: Failed to be changed for ${USER}."
    fi
else
    writelog "Wallpaper: Not Found. Exiting script ..."
    exit 1
fi

writelog "---------- DONE ----------"

exit

sebastianl
New Contributor III

@WhippsT Care to elaborate on which snapshot you use to capture the changes?

Thanks.

TomDay
Release Candidate Programs Tester

@WhippsT Your script worked awesome with a policy, copied over the file etc but my login wallpaper will not change. I am thinking I am doing something wrong with the transparency, any chance you've done this for High Sierra and can share the completed png?

Cornoir
Contributor II

Just an update with my procedure I mentioned previously.
Have tested and works 100% with High Sierra 10.13.4.

nikgio
New Contributor III

I tried copying the modified com.apple.desktop.admin.png to /var/tmp while capturing it in Composer, but after the capture, I looked through the files and did not see the addition of that file. All I did was start a new and modified snapshot, drag the file into /var/tmp, and then create snapshot. I built it anyway and tried to deploy. I got an error in JAMF saying no such file or directory in /var/tmp.

I created the file like the comments above instructed, making sure it had an alpha channel. I'm running High Sierra and modified the script to say 10.13. But I really think it's that Composer is not picking up the fact that I dropped that file into /var/tmp. Any suggestions?