Skip to main content

Utilizing Custom Icon With Self Service+

Updated over 2 weeks ago

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)

  1. Ensure your branding image is set to 256x256.

  2. Upload and convert the branding image to an icon using this website: https://cloudconvert.com/png-to-icns

  3. Download the newly created .icns file.


2. Package the icon

  1. If needed, download and install Composer onto a Mac.

  2. Open Composer.

  3. 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.)

  4. Once the .icns file is in the Users/Shared directory, click and drag the image from Finder into the left hand column of Composer.

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

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

  1.  In Jamf Pro navigate to Settings > Computer Management > Packages.

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

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

  1. In Jamf Pro navigate to Settings > Computer Management > Scripts.

  2. Create a new script. You can give the script whatever Display Name that makes sense.

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

  1. In Jamf Pro, navigate to Computers > Policies > New.

  2. Under General:

    1. Give the policy a name such as Self Service+ Custom Icon.

    2. Utilize the recurring check-in trigger and leave the frequency set to once per computer.

  3. Select the Packages payload and click Configure.

  4. Click Add for both of the packages from step 3.

  5. Select the Scripts payload and chose the script from step 4. Leave the priority of the script set to After.

  6. Select the Files & Processes payload. In the Execute Command input: killall Dock

  7. Scope the policy to a test computer.

Package for Step 3:

Attachment icon
Did this answer your question?