Git Product home page Git Product logo

macos-onedrive-kfm's Introduction

MacOS-OneDrive-KFM (Known Folder Move)

Purpose

Microsoft OneDrive has a super great feature (for Windows) called Known Folder Move. This redirects the Desktop, Documents, and Pictures folders to your OneDrive folder. This allows you to have multiple computers stay in sync. This application brings this same functionality to MacOS through the use of SymLinks thus enabling sync between your Desktop and Documents folders and OneDrive.

Notes

  • This application does not currently work with the Apple Store version of OneDrive. Please use the stand alone version instead. It can be downloaded from here: https://macadmins.software/.

  • OutSet is required for this application.

  • As this applicaiton interacts with User data, please do your own testing for your enviorment. Feel free to submit detailed issues if you find bugs.

Getting started

You can choose to either download a release pkg or build your own. These steps assume that you are using a release, or have already built your own pkg.

  1. Install OneDrive standalone (not the one from the AppStore).

  2. Set preferences. You can either set them with a sudo defaults write command, a .mobileconfig profile, or an MDM profile. A sample.mobileconfig file is included in this repo.

sudo defaults write "/Library/Preferences/com.cambridgeconsultants.onedrive-kfm" EnableKFM -bool YES

sudo defaults write "/Library/Preferences/com.cambridgeconsultants.onedrive-kfm" FixBadFileNames -bool YES

sudo defaults write "/Library/Preferences/com.cambridgeconsultants.onedrive-kfm" TenantID "12345678-1234-1234-1234-1234567891011"

sudo defaults write "/Library/Preferences/com.cambridgeconsultants.onedrive-kfm" OneDriveFolderName "OneDrive - Companyname"

Here is what each setting does:

  • EnableKFM (required) : If set to True then KFM attempts to run. If False or does not exist - the script will just exit. This gives control on a per machine basis of if KFM shall be turned on.

  • TenantID (required) : This is your AzureAD Tenant ID. If you do not know what this is, you can look it up with instructions here.

  • OneDriveFolderName (required) : This is the default name of your OneDrive sync folder. This will be something like "OneDrive - Company Name". This is the directory that OneDrive creates in your home directory for syncing.

  • FixBadFileNames (optional) : If this is set to True, then an attempt is made after setting up KFM to fix file names that are not valid with OneDrive. A report is saved on the desktop letting the user know what was changed. If this is set to False or not set, then no attempt will be made to rename files.

  1. Install OutSet. OutSet is used to run logon/startup scripts on MacOS. This is a dependency of this application.

  2. Install the latest version of MacOS-OneDrive-KFM-X. X.pkg

Building the package

  1. Install munki-pkg and ensure it is in your path

  2. Clone this git repo

cd ~/keep/this/here

git clone https://github.com/synapsepd/MacOS-OneDrive-KFM.git

  1. Edit the build-info.json file to include your certificate information, or remove the cert section alltogether if you will not be signing the package.

  2. MunkiPkg will now create a new build:

munkipkg .

Tips, Tricks, and Troubleshooting

  • Things are not going well. Help!

  • Use your Console.app and filter for 'OneDrive'. This will let you see the output of the scripts.

macos-onedrive-kfm's People

Contributors

csteelatgburg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.