I'm running a set of processes using the
screen command on my Ubuntu server. The idea is that the process should ideally not be cancelled or be under the risk of being cancelled by mistake
I find that using Ctrl + a d is a really risky hotkey for detaching the screen, since using Ctrl+d terminates it.
Is there any way to change the detach hotkey to something else? For example, can I change Ctrl+a d to Ctrl+q?
I tried using an alias, but that didn't work for keyboard commands.
Got this from the screen man page.
To view the bindings in use, press CTRL+a, release and then press ?.
As you indicated d is used to detach.
To change bindings on the fly, you can enter a command mode by pressing CTRL+a then press :
To set a binding, type
bind . So to set a new binding for detach type
bind z detach.
To remove an existing binding you omit the command portion. So to remove an existing binding for d, you type
You can place these commands in a
.screenrc in the user's home directory to make them persist.