Show keyboard input in top menu

Harrie
New Contributor III

Hi Guys

am struggling with getting the keyboard input in the top menu (in macOS 10.15.x)
when I do this in terminal it shows me the keyboard input
/usr/bin/defaults write com.apple.TextInputMenu visible -bool true
when I deploy it it doesn't happen, even though the policy is completed
when I do it in files and process it also doesn't show up
I also tried with a logged in user in the script but, ahh well you guessed it

what do I do wrong?
pls help

8 REPLIES 8

mm2270
Legendary Contributor III

The issue is that the command as you have it typed is being run against the root account's plist, not the currently logged in user's plist, since Jamf runs commands, scripts, etc as root. You have to put the full path to the users plist in there and not just the shortened version.

Harrie
New Contributor III

@mm2270 thnx for your reply
I kind of see that coming
how would it look like if I want that for my complete macfleet?

thnx in advance

mm2270
Legendary Contributor III

@Harrie A few ways you can address it.

One way would be to try a Configuration Profile instead of a shell command. A profile gives you the ability in most cases to enforce the setting, whereas a shell command is usually impermanent, meaning the end user can disable the option or change it in some way.
In many cases if you can issue a shell command to apply a setting, especially when making a change to a plist, you can usually convert it into a Configuration Profile for deployment.

Since this is a user setting, it's possible it might need to be sent as a User Level profile, but I haven't tested that out to know for sure. In a lot of cases, even sending them as Computer Level profiles will work.
What you could do is the following. Open Terminal and run the following command:

defaults write ~/Desktop/com.apple.TextInputMenu.plist visible -bool true

This creates a new plist on your Desktop with the setting you want in it and nothing else. Now run this

plutil -convert xml1 ~/Desktop/com.apple.TextInputMenu.plist

This is needed to convert the plist to xml so Jamf can read it.
Now back in Jamf Pro, make a new Configuration Profile, add the Application & Custom Settings payload. Click the Upload File (PLIST file) radio option and then click the Upload PLIST File button. Select the plist you created in the above step to import it. It should show the setting in the plist after being imported and also fill in the preference domain field automatically.

Now just scope to a test machine and deploy it. Try it first as a Computer Level profile to see if it works. It just might. If it doesn't seem to, switch it to a User level profile and send it that way. You may have to take some steps on the test device to get the profile to push down, like logging out/in or running a sudo jamf recon command, etc.

Harrie
New Contributor III

Thnx @mm2270 I just tried to upload the plist after converting it but I get "unable to create object from file" any idea why?

mm2270
Legendary Contributor III

Hmm, not off the top of my head. Unless.... what version of Jamf Pro are you using? Asking because there was a release or two where the Application & Custom Settings payload wasn't taking an uploaded plist file. It was, I believe a bug, since in more recent versions it's working again so I assume Jamf addressed that issue. You might still be on a version that doesn't allow for a file upload in that profile payload.

mm2270
Legendary Contributor III

Can you also copy/paste the contents of that plist file here so I can take a look at it? Just want to be sure it's not a formatting or config issue with the plist.

Harrie
New Contributor III

Hi
We're 10.25.1
here are the contents of that file
<?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>visible</key> <true/>
</dict>
</plist>

mm2270
Legendary Contributor III

OK, 10.25.1 is fine. That's past the versions that had that issue.
The plist looks ok, outside of the formatting here, but the contents look alright.

Let me try uploading it on my end to see if I run into any issues.