diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-06-02 06:11:09 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-02 06:11:09 -0400 |
commit | 92f502983885566a0b7bca4ae6c1bc5a8414a482 (patch) | |
tree | 19723ecab7038539402ff6b7aaf1b5ff459c2ef5 | |
parent | 94f2241831e30faf8a087194b3cb4e722b8355cd (diff) | |
parent | 8b7c7e8125fae0f3c0c80b7e8d6e41da5bc3912e (diff) | |
download | podman-92f502983885566a0b7bca4ae6c1bc5a8414a482.tar.gz podman-92f502983885566a0b7bca4ae6c1bc5a8414a482.tar.bz2 podman-92f502983885566a0b7bca4ae6c1bc5a8414a482.zip |
Merge pull request #6455 from rhatdan/detatchkeys
Add information on detach-keys
-rw-r--r-- | troubleshooting.md | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/troubleshooting.md b/troubleshooting.md index 167ee14c3..bad9d8102 100644 --- a/troubleshooting.md +++ b/troubleshooting.md @@ -553,3 +553,42 @@ this, use the following command before logging out: `loginctl enable-linger`. To later revert the linger functionality, use `loginctl disable-linger`. LOGINCTL(1), SYSTEMD(1) + +### 23) Containers default detach keys conflict with shell history navigation + +Podman defaults to `ctrl-p,ctrl-q` to detach from a running containers. The +bash and zsh shells default to ctrl-p for the displaying of the previous +command. This causes issues when running a shell inside of a container. + +#### Symptom + +With the default detach key combo ctrl-p,ctrl-q, shell history navigation +(tested in bash and zsh) using ctrl-p to access the previous command will not +display this previous command. Or anything else. Conmon is waiting for an +additional character to see if the user wants to detach from the container. +Adding additional characters to the command will cause it to be displayed along +with the additonal character. If the user types ctrl-p a second time the shell +display the 2nd to last command. + +#### Solution + +The solution to this is to change the default detach_keys. For example in order +to change the defaults to `ctrl-q,ctrl-q` use the `--detach-keys` option. + +``` +podman run -ti --detach-keys ctrl-q,ctrl-q fedora sh +``` + +To make this change the default for all containers, users can modify the +containers.conf file. This can be done simply in your homedir, but adding the +following lines to users containers.conf + +``` +$ cat >> ~/.config/containers/containers.conf < _eof +[engine] +detach_keys="ctrl-q,ctrl-q" +_eof +``` + +In order to effect root running containers and all users, modify the system +wide defaults in /etc/containers/containers.conf |