Skip to content
Yoann Gini edited this page Apr 18, 2021 · 16 revisions

Managing configuration

To configure Hello-IT, you need to provide a config file for the domain com.github.ygini.Hello-IT. It can be deployed via a regular pref file or MDM/MCX settings.

Though MDM or MCX, the "always" mode is recommended for security reasons.

Deployment and management via Chef or Puppet is also possible. Available resources for this kind of deployment are:

Configuration test

During your test, you will certainly use a "manual" plist file. If so, do not forget to clear the macOS cache with the following command:

killall cfprefsd

Also, you will need to understand what's going on in Hello-IT loading system when the result does not match your expectation. Please read the Logs documentation for that.

Content

The content and look of the Hello-IT menu will be customized by a single preference domain. Complexe scenario might lead to an long XML file hard to read.

It's recommended to store the reference config file on a versioning system. Avoid using your MDM as your main source of storage for your reference configuration and always keep access to your previous version. This could avoid you some pain…

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>functionIdentifier</key>
	<string>public.submenu</string>
	<key>settings</key>
	<dict>
		<key>title</key>
		<string>Custom Menu Title</string>
		<key>content</key>
		<array>
			<dict>
				<key>functionIdentifier</key>
				<string>public.test.http</string>
				<key>settings</key>
				<dict>
					<key>URL</key>
					<string>https://raw.githubusercontent.com/ygini/Hello-IT/975ff834701153c3a4cdf91991a9860334645eb9/staticfiles/internet_test.txt</string>
					<key>mode</key>
					<string>md5</string>
					<key>originalString</key>
					<string>ccf41dc8262810b99142b5627d27c25e</string>
					<key>ignoreSystemState</key>
					<true/>
					<key>repeat</key>
					<integer>60</integer>
					<key>title</key>
					<string>Internet</string>
				</dict>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.separator</string>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.submenu</string>
				<key>settings</key>
				<dict>
					<key>content</key>
					<array>
						<dict>
							<key>functionIdentifier</key>
							<string>public.script.item</string>
							<key>settings</key>
							<dict>
								<key>script</key>
								<string>com.github.ygini.hello-it.createDesktop.sh</string>
								<key>title</key>
								<dict>
									<key>en</key>
									<string>Presenter Mode</string>
									<key>fr</key>
									<string>Mode présentateur</string>
								</dict>
							</dict>
						</dict>
						<dict>
							<key>functionIdentifier</key>
							<string>public.open.application</string>
							<key>settings</key>
							<dict>
								<key>app</key>
								<string>Managed Software Center</string>
								<key>title</key>
								<dict>
									<key>en</key>
									<string>Managed Software Center</string>
									<key>fr</key>
									<string>Centre de gestion des logiciels</string>
								</dict>
							</dict>
						</dict>
					</array>
					<key>title</key>
					<dict>
						<key>en</key>
						<string>Self-Service</string>
						<key>fr</key>
						<string>Libre-service</string>
					</dict>
				</dict>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.separator</string>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.open.resource</string>
				<key>settings</key>
				<dict>
					<key>URL</key>
					<string>https://portal.office.com</string>
					<key>title</key>
					<string>Office 365</string>
				</dict>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.open.resource</string>
				<key>settings</key>
				<dict>
					<key>URL</key>
					<string>https://www.dropbox.com/</string>
					<key>title</key>
					<string>Dropbox Business</string>
				</dict>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.separator</string>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.script.item</string>
				<key>settings</key>
				<dict>
					<key>script</key>
					<string>com.github.ygini.hello-it.ip.sh</string>
					<key>repeat</key>
					<integer>60</integer>
				</dict>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.script.item</string>
				<key>settings</key>
				<dict>
					<key>script</key>
					<string>com.github.ygini.hello-it.hostname.sh</string>
					<key>repeat</key>
					<integer>60</integer>
					<key>args</key>
					<dict>
						<key>format</key>
						<string>%C</string>
					</dict>
				</dict>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.separator</string>
			</dict>
			<dict>
				<key>functionIdentifier</key>
				<string>public.quit</string>
			</dict>
		</array>
	</dict>
</dict>
</plist>

As you can see, the initial menu available on the menu bar is defined by the preference itself. Someone with good developer skills could use this to completely change the look of Hello-IT and use popover instead of menu for example.

For the standard Open Source version, you must use public.submenu as initial function.

The key settings.title of the outer dictionary (here set to Custom Menu Title) will be the title displayed in the menu bar. To use the image option (default one or custom as described in Application Description), just remove this value and key to let only the settings.content one.

The displayed name in the menu bar can also be dynamic starting v1.6.0. To use this feature you need both settings.title and settings.computedTitle to be set. Having settings.title will enabled the text mode for Hello IT and set the default content until the script named in settings.computedTitle and stored in /Library/Application Support/com.github.ygini.hello-it/CustomScripts will return something (only the first line will be used).

This is here the only specific information related to the initial menu. Everything else will act as a standard submenu and so, you will find all informations reading the public.submenu documentation.