Any way to disable "Show recent applications in Dock"?

hedenstam
New Contributor III

Mojave brought "Show recent apps in Dock" enabled by default.
There are no Config profiles or policies that can control this and what worked before "defaults write $UsrLib/com.apple.dock show-recents -bool false" does not work anymore.

Any ideas how to get the "Show recent apps in Dock" disabled?

13 REPLIES 13

talkingmoose
Moderator
Moderator

This still works for me on macOS 10.14.2:

defaults write com.apple.dock show-recents -bool FALSE

If you run it while a user is logged in, you'll have to follow it with killall Dock for the dock to read the setting.

I'm curious why you'd want to manage this setting. Most every OS is going to introduce some new thing or productivity enhancement. Something like this is very personal. Some will like it. Others may not. I wouldn't choose for them.

milesleacy
Valued Contributor

My suggestion is similar to @talkingmoose ’s second point.

Rather than trying to insulate users from change and new features, I prefer to educate them.

I prefer not to disable new default functionality in a macOS release. Instead, I post links to Apple support articles describing the new feature(s), what they’re intended for, and if available, how to turn them off. If a particular user likes inverted scrolling or not having recent items in the Dock, they’re free to change the setting for themselves.

Apple are the masters of UX. I’d be doing my organization a disservice if I denied everyone access to the latest features out of fear of complaints from a few malcontents.

mistacabbage
Contributor

Can this be done from a built-in configuration profile yet?

Chubs
Contributor

@mistacabbage Yep if you feel like writing a plist for it. I've created one that does just this for a really particular instructor and uploaded it into custom settings.

Apologies on reviving an old thread.

<?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>show-recents</key>
    <false/>
</dict>
</plist>
I find your lack of faith disturbing

kbremner
New Contributor III

@Chubs Where are you pushing this plist file?

Chubs
Contributor

@kbremner I just upload it into a profile under Custom Settings with the preference domain of com.apple.dock

It works great.

I find your lack of faith disturbing

mm2270
Legendary Contributor III

@kbremner You would create a plist file with the settings listed above, like on your Desktop or some place like that, and then for good measure run the following command in Terminal on the final plist file (change path accordingly)

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

Then in Jamf Pro, create a new Configuration Profile and add the Custom Settings payload. There you should be able to upload the plist file. The UI will read the domain (com.apple.dock) and the setting(s) in the file. It can then be deployed out to computers.

That being said, I do agree with the comments above from @talkingmoose and @milesleacy that, if possible, its best to leave Dock settings alone, at least in the case of individual one to one Mac type deployments. The only thing we ever set in the past in regards to the Dock was just the default set of Dock icons. But users were always free to change that up however they wanted afterwards.
If this is for a kiosk Mac or a lab or something, then I could understand wanting to disable that feature though.

Chubs
Contributor

@mm2270 That's exactly what we use it for - our computer labs. Staff machines we leave alone for the most part.

I find your lack of faith disturbing

larry_barrett
Valued Contributor

Settings - Computer Management - Dock Items
The way I'm approaching this is to add all apps. If you build the policy using the Dock Items field you can remove from dock any app you don't want to stay (including recently opened apps). I use terminal alot when working on my lab devices. Instead of manually right clicking it and remove from dock I have a Self Service policy to reset dock. As long as you've flagged the apps to Remove from Dock, it will remove the Recent Apps applications too.

Just tested this successfully on Catalina using Terminal as an example.

I run the dock reset policy at login (but mainly as a Self Service item), files and processes = sleep 5; killall Dock

Works 100% in Catalina.

Chubs
Contributor

@larry_barrett seems a bit of overkill where a simple plist does the trick - even in Catalina.

I find your lack of faith disturbing

larry_barrett
Valued Contributor

@Chubs This is literally the easiest way to maintain a dock for my students. YMMV.

kbremner
New Contributor III

I was using that exact content for my plist and pushing it to com.apple.dock but it wasn't working....until I ran plutil -convert xml1 ~/Desktop/com.apple.dock.plist from terminal and now it works great....must have been an issue with how I was creating the plist file. Thanks for the help.

howie_isaacks
Valued Contributor II

I got sick of this setting, especially after a bunch of apps like the Zoom plugin app launched while my enrollment script was running. I wrote a script that writes the false setting for "show-recents". So far it has worked really well every time I have deployed a new Mac. The policy containing the script runs as part of my enrollment script that launches when the desktop appears. I did not include a "killall Dock" command since the user has to logout at the end of the setup process to start FileVault. I did not want to use a configuration profile. I wanted users to be able to turn on this setting if they wanted it. It is useful to me sometimes when I'm working on certain tasks. I don't keep every app in my Dock, so having the recent apps there is convenient sometimes. 

 

#!/bin/sh

#Removes setting to display recent apps in the Dock

#Who is the current user?
currentuser=`/bin/ls -l /dev/console | /usr/bin/awk '{ print $3 }'`

#Change Dock setting to not show recent apps
/usr/bin/defaults write "/Users/$currentuser/Library/Preferences/com.apple.dock.plist" show-recents -bool false

#Change ownership of the Dock plist file to the current user.
chown $currentuser "/Users/$currentuser/Library/Preferences/com.apple.dock.plist"