Application startup script open option is confusing

I find the application startup script setting confusing.

The default behavior is to try to open .slicerrc.py file with the editor registered for .py extension. If the user never actually done anything with .py extension, the click doesn’t do anything, but throw an error:

ShellExecute ‘file:///C:/Users/Murat/.slicerrc.py’ failed (error 31), even if the file exists.

As a user, I was expecting the open icon not actually try to open and edit the file, but give me a file browser that I can navigate to and choose to use with Slicer. We are distributing a .slicerrc.py file that we find useful for working with large datasets (disable compression etc…) that other can benefit from. But most of our users are never going to actually edit a python code. So the intention is that they simply navigate to it.

Can this be altered?

I agree, the “open” icon may be misleading. Probably we should replace it by an “edit” icon but right now we don’t have such icon in Slicer core. If you can create one or find one that allows unrestricted usage and modification without attribution then please send it to us.

Path of rc file can be overridden in ‘SLICERRC’ environment variable. I don’t see how or why it should be possible to override in the application.

I would not recommend to distribute .slicerrc.py file to people who have never edited a Python file. Instead, you can register custom options in Application Settings. See for example how a custom “settingspanel” is added in DICOM module.