Executable Text Files preference considered unhelpful
Current behavior
The Preferences dialog has a 3-way option to choose the behavior when activating (e.g. double-clicking, pressing Return) an executable text file (i.e., a text file with the executable bit set).
- Display them: This is the default. Executable text files behave as regular text files when activated (e.g. opens in Gedit).
- Run them: Activating executable text files runs them as a CLI program (but without any Terminal window). Note: the "Open with Other Application" option is still available in the context menu.
-
Ask what to do: Activating executable text files pops up the following dialog:
- Display corresponds to the "Display them" option.
- Run corresponds to the "Run them" option.
- Run in Terminal is only available through this dialog.
The preference is backed by the org.gnome.nautilus.preferences executable-text-activation
GSettings key.
Problems
- By default, it appears to be a missing feature.
- The file context menu offers no way to execute the script.
- People don't know in advance a preference exists. See askubuntu page.
- The wording of the options is not clear if you don't know in advance what it does.
- They used to be more verbose (see screenshots in the askubuntu page), but that's still bad.
- The option to always "Run them" is arguably unsafe.
- The ability to "Run in Terminal" when choosing "Ask what to to" is not mentioned in the preferences.
Proposal
Remove the option from the preferences and implement one of 2 alternatives:
Alternative 1
Default to always ask what to do. Also, improve the design of the dialog.
Advantages:
- Highest discoverability.
- Easy to implement.
- Possibility of keeping the GSettings key around as a hidden setting.
Disadvantages:
- Always asking with a dialog may be annoying.
- Design mockups for the dialog are missing.
Alternative 2
Keep current default, but add "Run as a Program" action to the context menu.
Advantages:
- Easiest to implement
- More discoverable than in the Preferences
- Double-click behavior is consistent (with non-executables and with current default)
- No need to ask: the Run action is chosen explicitly.
Disadvantages:
- For people who execute text files often, this may be more exhausting.
- Maybe a keyboard shortcut could be provided to compensate for this?