Mac OS X: completely delete geektool (Bash script)

Source: Internet
Author: User

Although geektool has many functions that are attractive to individual users, in our network environment, it may randomly cause Users unable to exit normally, so it is not suitable for network users. Although the installation package of geektool provides the deletion of its own program, it is an app. in the network environment, the administrator can copy the package to the target machine, run an apple script, and delete it, but it is a little troublesome, so based on your own experience, the following is a delete script, suitable for running all the machines in the network through ard to execute Unix commands, It is straightforward and quick.

 

#! /Bin/bash <br/> # revoke <br/> # Remove geektool <br/> # revoke <br/> sudo killall geektool <br/> If test-E/usr/libexec/plistbuddy; then <br/> ln-F/usr/libexec/plistbuddy/usr/sbin/plistbuddy <br/> else <br/> echo "No plistbuddy utility fo Und! "<Br/> Exit 1 <br/> fi <br/> sudo Rm-fr/library/preferencepanes/geektool. prefpane <br/> sudo Rm-fr/library/preferences/org. tynsoe. geektool. plist <br/> sudo Rm-fr ~ /Library/preferences/org. tynsoe. geektool. plist <br/> Index = 0 <br/> foundit = false <br/> while [$ index-lt 100]; DO <br/> geektoolapp = 'plistbuddy 2> & 1-c "Print: autolaunchedapplicationdictionary: $ Index"/library/preferences/loginwindow. plist | grep "does not exist" '<br/> If ["$ geektoolapp" = ""] <br/> then <br/> geektoolapp = 'plistbuddy-c "Print: autolaunchedapplicationdictionary: $ Index "/library/preferences/loginwindow. plist | grep "geektool" '<br/> If ["$ geektoolapp" = ""] <br/> then <br/> echo "not found... $ Index "<br/> else <br/> foundit = true <br/> echo" found and deleted geektool. APP entry '$ Index' "$ foundit <br/> plistbuddy-c" delete: autolaunchedapplicationdictionary: $ Index "/library/preferences/loginwindow. plist <br/> Break <br/> fi <br/> else <br/> # echo "reach the end of entry of loginwindow. plist "<br/> Break <br/> fi <br/> let Index = index + 1 <br/> done <br/> exit 0

 

Tony Liu

Fall 2009 in Calgary

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.