Save application settings and toolbar settings

Hello,
is it possible to save the state of toolbar and application settings (specifically I am interested in favorites Modules), so that some other user would be able to load those settings and get the same toolbar view as me?

These information are saved in to Slicer.ini file. You can copy it over to another user’s profile. However, there are probably some other folder names that you don’t want to move over (such as temporary file folders, which may not be accessible to the other user).

You can also write a short Python script that the user can copy-paste into the Python console (or create batch file that is executed by Slicer) to update settings. For example, to add “Segmentations” module to the favorite module list:

favoriteModules = list(qt.QSettings().value('Modules/FavoriteModules'))
if 'Segmentations' not in favoriteModules and slicer.util.confirmOkCancelDisplay("Update favorite modules list and restart the application?"):
  favoriteModules.append('Segmentations')
  favoriteModules = qt.QSettings().setValue('Modules/FavoriteModules', favoriteModules)
  slicer.app.restart()