Jump to content

Search the Community: Showing results for tags 'script'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • InsanelyMac Lounge
    • Front Page News and Rumors
    • Reader News and Reviews
    • Forum Information and Feedback
  • OSx86 Project
    • New Releases and Updates
    • New Users Lounge
    • Developers Corner
    • Tutorials (The Genius Bar)
    • Technical FAQ
    • Installation
    • Post-Installation
    • DSDT and SSDT
    • Hardware Components and Drivers
    • Desktops
    • Notebooks
    • Netbooks
    • Tablets
    • MacMod of the Month
    • Multi-booting and Virtualisation
  • International
    • Your Language
    • Deutsch
    • Español
    • Français
    • Italiano
    • Português
    • Русский
  • Apple World
    • Mac OS X
    • Apple Computers and Hardware
    • iOS Devices
    • Mac Applications
    • Mac Programming and Development
    • iOS Programming and Development
    • Mac Gaming
    • Mac Accessories
  • Discuss and Learn
    • Windows Discussion
    • *nix
    • Apple Opinions and Discussion
    • The Great Debates
    • Internet(s), Servers, and Networks
    • Buying Thoughts, Reviews, and Recommendations
    • Mods and Overclocking
    • The Big Issues [Real Life]
  • Everything Else
    • Creativity
    • Thunderdome (Random Stuff)
    • Laughs
    • The Marketplace


  • Kexts
    • Graphics Cards
    • Audio
    • LAN and Wireless
    • Other
  • Kernels
  • Bootloaders
  • DSDTs
    • Patches
  • Pandora
  • Apps
  • Miscellaneous
  • Customization

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start




Website URL







Found 6 results

  1. midi-sama

    [Tool] [AppleScript] UPDD Tool

    Hi, I'm back again with another tool. As you may have seen in my thread, there is a Automator + AppleScript (thanks to @thanh) to make the reinstall/fix for UPDD, so I decided to make one application for everything with no hassle, however, since I'm not a programer, I'm just using AppleScript (for its fairly easy use and scripting). I want you to help me out to fix (also optimize and clean) this script to make it better. Here is the script: -- Start with a welcome screen + password set pwd to text returned of (display dialog ¬ "Hello there This is an AppleScript utility that will help you fix UPDD. First I need your password to continue working of this:" with title ¬ "UPDD Fix Script" with icon note ¬ default answer ¬ "" buttons {"Nope", "Continue ..."} ¬ default button 2 cancel button 1 ¬ with hidden answer) -- Now show dialog for choice set choice to (display dialog ¬ "Hello there, what do you wanna do?" buttons {"Reinstall UPDD", "Start UPDD with time fix", "Exit"} ¬ with title "What do you want to do?" cancel button 3) -- Choice selection if choice = {button returned:"Reinstall UPDD"} then -- Reinscall UPDD case display dialog ¬ "Are you sure you want to reinstall UPDD?" buttons {"No", "Sure"} ¬ default button 2 cancel button 1 set sure_inst to button returned of result -- Starting the install -- TODO: If Nope is selected, loop back to the dialog of choices if sure_inst = "Sure" then -- Install UPDD -- TODO: Add a "Working..." window WHILE it's installing set install_result to do shell script "installer -pkg /Library/UPDD_*.pkg -target /" password pwd with administrator privileges -- Show Install results + updd fix prompt display dialog install_result with title "Install Results" buttons {"OK, now UPDD fix", "OK, I'm done here"} cancel button 2 default button 1 -- UPDD Fix -- TODO: Same as the previous one tell application "UPDD Gestures" to quit saving no do shell script "/usr/sbin/systemsetup -setusingnetworktime off " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setdate '04:05:15'" password pwd with administrator privileges delay 2 tell application "UPDD Gestures" activate end tell delay 2 -- ERROR: for some reason, it may give an error. do shell script "/usr/sbin/systemsetup -setdate '10:12:16' " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setusingnetworktime on " password pwd with administrator privileges display notification "We're done." with title "We're all set." end if -- Done with UPPD Reinstall -- TODO: loop back to the choice menu else if choice = {button returned:"Start UPDD with time fix"} then -- UPDD Fix display dialog ¬ "This will bring back your maching clock back in 2015 then back to the actual internet time, this will momentally break some apps/connections (like synergy and maybe even some websites), make sure there are no active time-sensitive apps running if this can damage it or ruin your work" buttons {"Nope, stop", "OK, continue..."} default button 2 cancel button 1 with title "UPDD Rewind" set reupdd to button returned of result if reupdd = "OK, continue..." then -- TODO: Show a "Working..." window tell application "UPDD Gestures" to quit saving no do shell script "/usr/sbin/systemsetup -setusingnetworktime off " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setdate '04:05:15'" password pwd with administrator privileges delay 2 tell application "UPDD Gestures" activate end tell delay 2 do shell script "/usr/sbin/systemsetup -setdate '10:12:16' " password pwd with administrator privileges delay 2 do shell script "/usr/sbin/systemsetup -setusingnetworktime on " password pwd with administrator privileges display notification "We're done." with title "We're all set." -- TODO: loop back to the choice menu end if end if display dialog "Thank you for using this utility, please check insanleymac.com for more goodies!" buttons {"Thanks", "Get me to InsanelyMac"} with title "Thank you. We're done here." default button 1 cancel button 1 set done to button returned of result if done = "Get me to InsanelyMac" then open location "http://www.insanelymac.com/forum/" delay 1 end if Thanks for any help and feedback
  2. Hello, I made something I think some of you might like. This little bash, command line script will list all of your startup entries for your macOS machine. It does this by listing all plist entries in LaunchDaemon & LaunchAgent folders. (user + system) It can also list system loaded plists or login hooks. You can disable or enable them, this script will move it to ${filename}.disabled. Github repo: https://github.com/HazCod/maclaunch Download: https://github.com/HazCod/maclaunch/releases
  3. I finally got sick and tired of the popping noise that is caused by waking up the audio card after inactivity. I am aware of the antipop program but for some reason it did not work for me. Credit for this idea goes to Robert Tomsick http://www.tomsick.net/projects/antipop.html So I decided to write my own version that works with 10.9 The concept is exactly the same as the antipop program but it actually works (at least for me). Here it is AntiPop.zip All you have to do is set this application as a login item and you will no longer have the popping issue. Limitations: Can not fix initial pop from booting computer. Can not fix pop for waking from sleep. After switching audio sources there may be a pop. First I created this applescript. repeat say " " log "delaying audio sleep" delay 25 end repeat This essentially tells the computer to speak every 25 seconds. However there is nothing to say so it won't bother you, but it will keep the audio from being deactivated. I then saved this script as an application. To remove the icon from the dock I right clicked the application I created and chose "show package contents" Then I opened the contents folder and found it's info.plist. I then added this line to the plist. Bam! Dock icon gone If anyone has any thoughts or suggestions please let me know
  4. This is a small script to repair permissions and rebuild kext caches. Usage: boot with boot arg: kext-dev-mode=1 copy script to your home directory, open terminal and run: sudo ./repairrebuild at the end, the script will reboot your system. now you don´t have to use kext-dev-mode again, use it only to rebuild caches. script content: echo "********************************************************" echo "Before run this script, boot your system with boot arg:" echo "kext-dev-mode=1" echo "use it just to rebuild cache." echo "script by: rodrigocunha@inanelymac" echo "********************************************************" echo "." echo "Fixing ownership and permissions..." chmod -R 755 /System/Library/Extensions/* chown -R root:wheel /System/Library/Extensions/* chown root:admin / echo "Rebuilding kext cache..." kextcache -system-prelinked-kernel kextcache -system-caches echo "." echo "process complete." read -p "press a key to reboot" echo "rebooting..." shutdown -r now
  5. Hackmodford

    DIY Antipop

    This is the same idea as Robert Tomsick's Antipop installer. For some reason it didn't work in mavericks so I decided to make my own implementation. Limitations: Can not fix initial pop from booting computer. Can not fix pop for waking from sleep. After switching audio sources there may be a pop. Download this program. http://www.soma-zone.com/LaunchControl/ and maybe pay this guy It will make it easier to create a custom launchctl Step 1: Create the antipop shell script say " " Save this file to /Library/antipop.sh (I'm not sure if this is the best location but it's where I put my script) Use terminal to make this file executable chmod +x /Library/antipop.sh Step 2: Create a launchctl job using Launch Control like this.
  6. Hi, i started a project to bring the task of creating bootable usb on Linux, in a script form. It's similar to Pandora, but i wrote it from scratch. As of now it lacks a GUI, and i lack GUI coding skills . It can be usefuel for: -People without access to a real MAC. -People without Virtualization support in CPU for VM -People with their OS X installation unbootable (you can avoid installing in VM to create Installer, you can create create Installer directly and faster). -People needing to restore their original MAC (not possible yet, in TODO list, i'd need a tester and i'd probably need work with GUID partitioning. I don't know if real MACs can boot MBR USB). -People who want to do it with Linux because they just want to . The script is currently in testing, if you want to try it out please understand i'll take no responsibility for wiped hard drives or data loss, but i'll help you as i can if you experience any problem. However, i made several tests on both Virtual Machines and real Hardware (and different PCs) with no problem at all, using 10.6/10.7/10.8/10.9 dmg files. Features: Creates a bootable installation usb drive, starting from dmg files (InstallESD.dmg or Mac OS X Install DVD.dmg). CD to USB is implemented, but not tested. Creates osx86 installation HDD images starting from dmg file, those are suitable for VMs. (SEE NOTES BELOW) Extracts a pkg or mpkg file (using "xar", which is self-compiled by the script) Converts dmg files to img (using "dmg2img", which is self-compiled by the script) After the media is ready, you can re-run the tool to access the management menu. It allows: Kext Management Chameleon Modules Management Kernel Management Chameleon repair/update (Re)apply MBR patch (Re)install Smbios (Re)install DSDT Erase Setup (to wipe ALL the usb data and restore the drive to normal use) Logging to html, with ansi2html utility by running "install_osx_log.sh" with same parameters you'd use with normal one USAGE: NOTE: all the commands below must be used without [] charachers. [] indicate you have to change the content according to your needs and specific case!! NOTE: use ./install_osx_quiet.sh to avoid really verbose output. How to setup files: --Chameleon-- You need obtain the following chameleon core files. boot0 boot1h boot Place them in "chameleon" directory. You can either get those files from "i386" archives, or download the pkg and unpack it sudo ./install_osx.sh <package.pkg> <destdir> Where outputdir is a temporary location (not the "chameleon" folder!). You'll find core files in /Core.pkg/usr/standalone/i386. Move the required files in "chameleon" directory. Nolw you can delete as we don't need it anymore Chameleon dylib modules go to "chameleon/Modules" (example Sata.dylib, Resolution.dylib, etc...). You can manage them with "Manage chameleon Modules" menu option, in case you need to add/remove them later. Chameleon Themes go to "chameleon/Themes" (chameleon will use the theme in folder named "Default" at boot, "chameleon/Themes/Default") --Kexts-- Place any kext (they are seen as directories on Linux) in "extra_kexts" directory. You can manage them with "Manage kexts" menu option, in case you need to add/remove them later. --MBR Patch-- Place the following files in "osinstall_mbr" directory OSInstall OSInstall.mpkg They NEED to match the version on DMG, and the script will check that before copying. I plan to add a way to allow multiple filesets for each installer version. --Kernels-- Place them in "kernels" directory. They are not automatically installed, you need to invoke the management menu to swap mach_kernel or add a new kernel to root. As of now kernels are copied as is. To replace main kernel you need to rename the desired kernel to "mach_kernel". This allows multiple kernels on the same installation media. Example: If you leave the filenames as is and, let's say you have a file named "cust_kernel", you'll have to boot with: "cust_kernel" at chameleon prompt. --Tweaks-- Single tweaks, stored in "tweaks" folder, that can extend the script (i plan to convert some internal function to tweak to make it more light-weight) Example of tweak: "Remove Graphic Kexts" "Restore Graphic Kexts" A tweak is like a plugin. If you want to add a tweak (if you are a developer), you must add the string tweakname="My Tweak" So that it will appear in the menu as "My Tweak" in the above example. A tweak can use functions and variables exported from the main script (with "export") How to extract a pkg/mpkg: sudo ./install_osx.sh [pkgfile] [destdir] How to prepare OSX86 usb run sudo blkid To obtain info about your USB Drive (you need the id, Example /dev/sde) sudo ./install_osx.sh [dmg path] [/dev/sdX] where X is the letter you gathered above How to prepare OSX86 image sudo ./install_osx.sh [dmg path] [dest.img] How to manage images and usb drives (management menu) For USB drives: sudo ./install_osx.sh [/dev/sdX] For images sudo ./install_osx.sh [imagefile] DOWNLOAD and PREPARATION: You can get the script from https://github.com/smx-smx/osx86_linux, using git LATEST VERSION: r23 git clone https://github.com/smx-smx/osx86_linux.git OR: You can use the github "Download ZIP" button To check for script updates, just do git pull In script directory. INSTALL THE FOLLOWING DEPENDENCIES: (post if i forgot a dep) On Ubuntu/Mint: sudo apt-get install cpio hfsprogs tput wget parted udisks qemu-utils build-essential zlib1g-dev sudo apt-get build-dep dmg2img I tested it on Arch Linux aswell, but i don't remember the complete set of dependencies i installed. if i recall correctly: udisks - tput - hfsprogs(AUR) - wget - parted - cpio - qemu - base-devel - zlib If you encounter a regression in my script, you can downgrade with git reset --hard HEAD~[number] Where [number] is the number of updates to rollback, e.g 1 to return to previous version, 2 to roll-back 2 updates and so on. (please post any regression or bug) NOTES WARNING: during my tests i found out the best deal is "img" raw format. If you specify VHD/VMDK/VDI your system may freeze or crash. This is due to software limitations on Linux. To work around this problem, i strongly recommend using "img" output if you need Installation Hard Disk images. The script will ask you if you want to convert to VDI/VMDK/VHD at the end of the process, after all the data has been flushed (Virtualbox required, as it contains the "vboxmanage" command, needed to convert img -> something_else). Looks like the main cause of this problem is combining the FUSE NTFS driver with VDI/VMDK/VHD. You can try VDI/VHD/VMDK and post your result. I'll edit these warnings accordingly. Using the Management Menu with an already created VHD/VDI/VMDK should be fine, as the data to be written is a lot smaller (as osx files are already there) WARNING: When outputting the img, it's better to choose a drive with ext filesystem. AVOID NTFS DRIVES, they may perform very very slow or the script may hang. This is due to the ntfs-3g fuse driver. You can choose an ext4 drive, and move the resulting image at the end of the process. WARNING: Some distributions may spit out errors during cp with "cp preserving permissions not supported". I have that problem on ArchLinux, but not on Mint. I suspect there's a regression in linux hfs+ driver. Anyway it should still work fine. NOTICE: You need a lot of disk space for this script. Example for USB: InstallESD.dmg(5.3G) + InstallESD.img(5.4G) + BaseSystem.img(1.3G) = approx 12GB (only for setup data) Example for VDI: InstallESD.dmg(5.3G) + InstallESD.img(5.4G) + BaseSystem.img(1.3G) + mavericks.img(10G) + mavericks.vdi(6G) = approx 28GB (only for setup data)(18 after removing mavericks.img after conversion) The img files are temporary! The script doesn't delete them so it can create USB pendrives faster the next time you run it. If you plan to use it once, or if you need to free some disk space, you CAN DELETE *.img and leave only the dmg file you started with. Here's a look at the finished product, maverick with img converted to vdi option Real HW, Snow Leopard 10.6 Installers prepared from scratch with Linux and this script only.