You can type pb_prefs at the MATLAB command line to set preferences for all experiments, e.g. compatibility settings, experiment window size, experiment background color, etc. Setting preferences corresponds to changing default property values for trial, experiment, and device objects. Note you can override any preference in an experiment by setting the object + property in the experiment.
If you see problems like failing to open or close the experiment window (especially on Mac, sometimes on Windows), you may want to use pb_prefs → screen → disable Psychtoolbox sync tests and/or enable system compositor (or on MATLAB versions earlier than R2021a: add lines <cd>screen.doSyncTests = -1; screen.useCompositor = true<cd>; to the pb_prefs script). Note this generally reduces timing precision, but Psychtoolbox recommends not running precise timing experiments on such systems anyway. You can still develop and test precise timing experiments and/or run experiments that don’t need precise timing. See screen object properties doSyncTests, useCompositor for details. For more information from Psychtoolbox, see SyncTrouble.