a1ive / grub

Fork of GRUB 2 to add various features.
GNU General Public License v3.0
138 stars 38 forks source link

Request: Disable menu 'c' and 'e' hotkeys #75

Closed steve6375 closed 4 years ago

steve6375 commented 4 years ago

A naive user can accidentally press 'c' or 'e' key and they are confused by the result and do not know how to recover. The official way to protect from this is to set a password and a user and then modify all menuentry lines to add the user name. Would it be possible to modify the password command (or some other command) so that the 'c' and 'e' hotkeys are disabled (maybe individually?).

a1ive commented 4 years ago

Screenshot_20200915_181041 Screenshot_20200915_181123 I think these instructions are enough for users.

steve6375 commented 4 years ago

If they can read and understand English! The point is that if a USB drive is made for others to use, it is not user friendly. It would be a useful feature for grub2 File Manager, etc. This feature has been requested by technicians who want to provide an easy-to-use, foolproof menu system for others to use in the field.

nguyentumine commented 4 years ago

@a1ive this will break a few features on aioboot. i have heard that many users need the c and e keys to do their own tests.

steve6375 commented 4 years ago

This will be a user-configurable option by adding a command in grub.cfg. Most people will not disable c or e, but if we want to prevent end user from using c or e then we can. Actually, it would be better if we could also still keep the functionality but change the keys so that they are less likely to be accidentally pressed by the user. Maybe an option for shift+e and shift+c ?

e.g. password -shift-enable (user must press shift) password -c-disable (c or shift+c is disabled) password -e-disable (e or shift+e is disabled)

nguyentumine commented 4 years ago

So we must also change the text instructions on the screen? As far as I know we should be able to use variables to toggle these keys on or off.

a1ive commented 4 years ago

export grub_disable_console=1 export grub_disable_edit=1