Description
With Self Service+ 2.5 and below, custom branding can be configured. When Self Service+ is open, the Custom Branding works fine. When the application is closed the application icon reverts back to the default Self Service+ Icon.
This workflow is a way to workaround that issue until a solution is found.
1. Convert branding image to an icon (.icns)
Ensure your branding image is set to 256x256.
Upload and convert the branding image to an icon using this website: https://cloudconvert.com/png-to-icns
Download the newly created .icns file.
2. Package the icon
If needed, download and install Composer onto a Mac.
Open Composer.
Take the icns file from step 1 and place it into the
/Users/Shared
directory. (An alternate shared directory can be utilized instead if necessary.)Once the .icns file is in the
Users/Shared
directory, click and drag the image from Finder into the left hand column of Composer.Inside of the Users/Shared directory in Composer select the package. On the bottom right hand corner of Composer set the permissions to:
Owner = Root
Group = Admin
Mode = 775
Select the Build as PKG button on the top of the Composer window and save the package to a directory on that computer.
3. Upload the icon pkg and the attached filecon-installer.pkg to Jamf Pro
In Jamf Pro navigate to Settings > Computer Management > Packages.
Upload the packages from step 2 and the attached fileicon-installer.pkg (located at the bottom of this article) to Jamf Pro. For more information see Package Management in the Jamf Pro Documentation.
Set the priority. The number of the priority doesn’t really matter, just make sure the icns package has a higher priority than the FileIcon-Installer.pkg.
4. Input the script to change the icon to Jamf Pro
In Jamf Pro navigate to Settings > Computer Management > Scripts.
Create a new script. You can give the script whatever Display Name that makes sense.
Copy the following script and paste it into the Script field under the Script tab followed by save. See the note below the script.
#!/bin/bash
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
# INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
# FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
# Variables
APP_PATH="/Applications/Self Service+.app"
ICON_PATH="/Users/Shared/IconName.icns "
FILEICON_BIN="/usr/local/bin/fileicon"
# Check if app exists
if [[ ! -d "$APP_PATH" ]]; then
echo "Application not found at: $APP_PATH"
exit 0
fi
# Check if icon file exists
if [[ ! -f "$ICON_PATH" ]]; then
echo "Icon file not found at: $ICON_PATH"
exit 0
fi
# Check if fileicon is installed
if [[ ! -x "$FILEICON_BIN" ]]; then
echo "fileicon not installed. Please deploy it via package."
exit 0
fi
# Apply the icon (fileicon returns 1 even when successful)
"$FILEICON_BIN" set "$APP_PATH" "$ICON_PATH" || echo "fileicon returned a non-zero code, but icon may still be applied."
# Clear icon cache
find /private/var/folders/ -name com.apple.dock.iconcache -exec rm -f {} \; 2>/dev/null
find /private/var/folders/ -name com.apple.iconservices -exec rm -rf {} \; 2>/dev/null
# Restart Finder and Dock
killall Finder 2>/dev/null || true
killall Dock 2>/dev/null || true
echo "Custom Finder icon successfully applied to $APP_PATH."
exit 0
Note: Set the "ICON_PATH" variable on line 5 of the script to match the path to, and file name of, the .icns file that was packaged in step 2.
5. Create a policy that deploys the above items
In Jamf Pro, navigate to Computers > Policies > New.
Under General:
Give the policy a name such as Self Service+ Custom Icon.
Utilize the recurring check-in trigger and leave the frequency set to once per computer.
Select the Packages payload and click Configure.
Click Add for both of the packages from step 3.
Select the Scripts payload and chose the script from step 4. Leave the priority of the script set to After.
Select the Files & Processes payload. In the Execute Command input:
killall Dock
Scope the policy to a test computer.
Package for Step 3: