summaryrefslogtreecommitdiff
path: root/troubleshooting.md
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2020-06-01 12:13:26 -0400
committerDaniel J Walsh <dwalsh@redhat.com>2020-06-01 14:38:05 -0400
commit8b7c7e8125fae0f3c0c80b7e8d6e41da5bc3912e (patch)
tree928d3fa4657e17e68089557085fbb2111af81627 /troubleshooting.md
parent5f1c23dba9f6e02ed2551aabda371d007e9057e2 (diff)
downloadpodman-8b7c7e8125fae0f3c0c80b7e8d6e41da5bc3912e.tar.gz
podman-8b7c7e8125fae0f3c0c80b7e8d6e41da5bc3912e.tar.bz2
podman-8b7c7e8125fae0f3c0c80b7e8d6e41da5bc3912e.zip
Add information on detach-keys
Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
Diffstat (limited to 'troubleshooting.md')
-rw-r--r--troubleshooting.md39
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