Show keyboard input in top menu

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


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.

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

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/ 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/

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.

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?

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.

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.

New Contributor III

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" "">
<plist version="1.0">
<dict> <key>visible</key> <true/>

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.