Skip to content

Syncing settings

Do you have multiple computers you’d like to run your slicer on but don’t want to manually keep your settings in sync? This is for you!

These direction are written for OrcaSlicer as that’s what I regularly use, but should be adaptible between other slicers.

Some slicers (e.g. Bambu and OrcaSlicer) include a network / cloud plugin you can enable to sync your settings between computers. This is often the most straightforward way.

If you can easily do so, you can make a shortcut to pass the correct option for your slicer. For OrcaSlicer, this would look like /path/to/orcaslicer --datadir PATH_TO_YOUR_SYNC. This can be done in the KDE menu editor, or easily via a shortcut on Windows. It’s somewhat more obnoxious to do on macOS.

If you’d prefer something a bit more granular, you can use the below approach that creates symlinks to your config.

First off, you need something to physically do the sync. Options include:

  • Dropbox
  • Syncthing
  • Git repository (my preferred method — less automatic but lets you version your changes)

Set up one of these on the computer you’re starting out with.

Then, you’ll need to run the following. Choose PowerShell if you’re on Windows, and Bash if you’re on macOS or Linux:

setup.sh
# SET OR CONFIRM THESE VARIABLES v
SLICER='OrcaSlicer'
SRC="PATH_TO_YOUR_SYNC" # e.g. "$HOME/Dropbox/Slicer Settings"
# SET OR CONFIRM THESE VARIABLES ^
if [[ "${SLICER}" == 'OrcaSlicer' ]]; then
DEST_SUBPATH='user/default'
fi
case $(uname -s) in
Darwin)
DEST="$HOME/Library/Application Support/${SLICER}"
;;
Linux)
DEST="$HOME/.config/${SLICER}"
;;
*)
echo 'Unsupported system; please set $DEST manually and submit a PR!' 2>&1
;;
esac
# ensure SRC is empty; this is a fresh setup
if find "${SRC}" -mindepth 1 -maxdepth 1 | read -r; then
echo "${SRC} contains files -- check the path or run the sync script" 2>&1
fi
mkdir -p "${SRC}"
pushd "${DEST}/${DEST_SUBPATH}" >/dev/null || exit
for d in *; do
echo "backing up ${d}"
cp -r "${d}" "${d}.orig"
mv "${d}" "${SRC}/${d}"
echo "linking ${d}"
ln -s "${SRC}/${d}" "${d}"
done
popd || exit
echo "Successfully copied and linked $SRC to $DEST"

Once you’ve set up your source of truth, you can set up additional machines like so:

new-machine.sh
# SET OR CONFIRM THESE VARIABLES v
SLICER='OrcaSlicer'
SRC="PATH_TO_YOUR_SYNC" # e.g. "$HOME/Dropbox/Slicer Settings"
# SET OR CONFIRM THESE VARIABLES ^
if [[ "${SLICER}" == 'OrcaSlicer' ]]; then
DEST_SUBPATH='user/default'
fi
case $(uname -s) in
Darwin)
DEST="$HOME/Library/Application Support/${SLICER}"
;;
Linux)
DEST="$HOME/.config/${SLICER}"
;;
*)
echo 'Unsupported system; please set $DEST manually and submit a PR!' 2>&1
;;
esac
pushd "${SRC}" >/dev/null || exit
for d in *; do
dest="${DEST}/${DEST_SUBPATH}/${d}"
if [[ -L "${dest}" ]]; then
echo "${d} already linked; skipping"
continue
fi
echo "backing up ${d}"
test -d "${dest}" && mv "${dest}" "${dest}.old"
echo "linking ${d}"
ln -s "${PWD}/${d}" "${dest}"
done
popd >/dev/null || exit