Lock the Dock?

SatCure

Registered
My dear old Mum keeps accidentally dragging icons out of the dock (poof!)

Also, some disabled users have the same problem.

I don't think there's anything out there that can "lock" icons in the dock (shame) so has anyone got any suggestions?

Bear in mind that my Mum is 78 and struggles to cope with anything new or different.
 
LOL

My mum is 72, and some how the apps end up in the trash etc, until I set her up as a user and not an admin, so trashing things she can't from not knowing the password. But as for the dock? Good question!

Is the Dock protected from non admin users?
 
sirstaunch said:
Is the Dock protected from non admin users?

Yes you can make a restricted user with only that restriction

Sys Prefs --> Accounts --> + --> Enter Details in --> Parental controls --> Configure --> Some Limits --> Tick All But Modify Dock.

No worries
 
'... --> Configure --> ...', in 'Tiger' (macOS X 10.4.x), should be '--> check box of 'Finder.app & System' --> Configure... -->'.
I like the idea of locking an account's 'Dock's items. After creating such an account, I looked around; but, was unable (in the short time period) to note how Apple locked the 'Dock's items. It would be nice to know and be able to incorporate.

----

A quick solution.

01. Copy ('Safari's 'Edit, Copy' menu item, or 'Command C') the next (single ) line of code ...

do shell script "cp $HOME/Library/Preferences/com.apple.dock.plist $HOME/Library/Preferences/com.apple.dock_.plist"

02. Launch 'Script Editor' ('/Applications/AppleScript/' folder), and do a 'Paste' ('Script Editor's 'Edit, Paste' menu item, or 'Command V').

03. Select 'Script Editor's 'File, Save' menu item ('Command S'), and select 'application' from the 'File Format:' popup menu.

[
Added 26.04.2006

If, by chance, the 'Options:' 'Startup Screen' check box has a check mark, click on the check box to remove the check mark.
]

04. Title the application 'Dock_copier' in the 'Save As:' text edit field, and do a 'Command D' - which will direct 'Script Editor' to save the application to your 'Desktop'.

05. Click the 'Save' button.

Repeat steps 01. through 05. (ignoring the launching of 'Script Editor') with respect to the code below ...

do shell script "cp $HOME/Library/Preferences/com.apple.dock_.plist $HOME/Library/Preferences/com.apple.dock.plist; killall Dock"

... and (in step 04.) titling the application 'Dock_restorer'.

06. Drag the two applications ('Dock_copier' and 'Dock_restorer') to the upper right hard disk drive icon (the boot drive), then double click on the hard disk drive icon (to open its respective window). Naturally, you are free to move the files anywhere you prefer.

07. (Optional) Drag the two applications ('Dock_copier' and 'Dock_restorer') to the 'Dock'.

-----

Summary:

'Dock_copier' will create a copy of 'com.apple.dock.plist' and title it 'com.apple.dock_.plist'.
'Dock_restorer' will replace 'com.apple.dock.com' with a copy of 'com.apple.dock_.plist, and restarts the 'Dock'.

How to use:
Once your mother or you have the 'Dock' as desired, click on the 'Dock's 'Dock_copier' or double click on the 'Dock_copier' application. A backup of 'com.apple.dock.plist' will be created.

At anytime should your mother accidently remove an item or items from the 'Dock', all she or you has to do is click on (the 'Dock's) 'Dock restore'. If 'Dock restore' was accidently removed from the 'Dock' - all one has to do is locate and double click on the 'Dock_restorer' application.

As time goes by and items are added and / or removed from the 'Dock', all your mother or you has to do - is click on the 'Dock's 'Dock_copier' or double click on the 'Dock_copier' application.
 
Based on use of sourcehound's 'Mac HelpMate', here are two additional AppleScript code lines.

Code to 'lock' the 'Dock' ...

do shell script "defaults write com.apple.dock contents-immutable -bool Yes; killall Dock"

... save the code as an application (see the process steps of my first reply) and title it something like - 'Dock_locker'

Code to 'unlock' the 'Dock' ...

do shell script "defaults write com.apple.dock contents-immutable -bool No; killall Dock"

... save the code as an application and title it something like - 'Dock_unlocker'

----

Summary:

'Dock_locker' will prevent items being added to / or removed from the 'Dock'. One can still drag items to a 'Dock' based folder or volume.
'Dock_unlock' will allow items to be added to / or removed from the 'Dock'.

-----

A quick (hopefully - 'objectively' taken) observation of 'Mac HelpMate' - only from using the 'Pref' tab's features.

The popup menus do not reflect the current (actually saved) state of the selectable options.
An example - I can have the 'Dock' oriented anywhere (left, right, and even top), Pinning set to 'start', and Minimization set to 'Scale'; but, 'Mac HelpMate's 'Pref' tab's panel will allows display 'Orientation' as 'bottom', 'Dock Pinning' as 'middle', 'Set my Window Minimization Effect to:' as 'Suck', etc. It is as if 'Mac HelpMate' does not view the 'com.apple.dock.plist' file, and set the respective popup menus accordingly.

'TinkerTool's 'Dock' tab's popup menus do reflect the 'com.apple.dock.plist' setting when launched.
 
I got tired of accidentally pulling stuff out of my dock to be shocked by a poof sound, for the longest time the mac wouldn't lock the dock unless you had the parental controls locked BUT then you are no longer the ADMIN etc, etc! or messing around in terminal (I just don't have those skills), ANYWAY I just found it today thought i would pass it on if you hadn't found it yet. You can't pull anything out of the doc BUT you can pull stuff out of those side finder windows so be-careful, NOW I need to figure out how to lock those hahahaha. Hope this helps!!!
http://mac.softpedia.com/get/Utilities/xMod.shtml
there is also one called Lock dock BUT I haven't used that one. The Code is cool but what if you want to unlock it then what... I like this one.***** from me;)
Emissary
 
Last edited:
I think a 'Lock the Dock' option should be available in Dock Preferences. Sadly it ain't.

Following on from DeltaMac I use Onyx (which is freeware). See image attached.
 

Attachments

  • Screen shot 2010-06-12 at 21.46.14.jpg
    Screen shot 2010-06-12 at 21.46.14.jpg
    96.8 KB · Views: 4
Back
Top