Skip to content

Latest commit

 

History

History
34 lines (24 loc) · 1.27 KB

File metadata and controls

34 lines (24 loc) · 1.27 KB

miscellaneous

operating systems

*nix

passwordless sudo

modify the sudoers file ($ sudo visudo) and add the following content:

# passwordless sudo for your-user for all commands.
your-user ALL=(ALL) NOPASSWD: ALL

note: this is a lax security policy, and should be implemented judiciously. it's more reasonable to observe the principle of least privilege, which would usually be implemented as only whitelisting the exact commands a given user needs to run with escalated permissions.

remapping capslock

system-wide approach - in the /etc/default/keyboard (debian) file, set XKBOPTIONS: * ="ctrl:swapcaps" (swaps capslock and ctrl). * ="ctrl:nocaps" (capslock becomes an additional ctrl)

xfce/x session approach - use setxkbmap: * setxkbmap -option ctrl:swapcaps (swaps capslock and ctrl) * setxkbmap -option ctrl:nocaps (capslock becomes an additional ctrl) * to clear all options first: setxkbmap -option * to make persistent across reboots: * add to xfce session startup: Settings → Session and Startup → Application Autostart * or add to ~/.xprofile

avoiding the esc key

Ctrl-[ is a valid escape sequence in at least some (including vi/vim/nvim) terminal applications.