Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Currently I'm running dvtm inside a terminal, and vim inside dvtm. When I press Ctrl+z intending to suspend vim, dvtm got suspended instead. I didn't have this problem with screen or tmux, so I think it must be dvtm doing something wrong (or not doing something right). How can I fix that?

Update: I was wrong, this is not a problem with dvtm. Indeed I was using the dtach+dvtm combo and wrongly assumed that dvtm was at fault. The problem is really with dtach.

share|improve this question
I've just tried on Debian lenny (dvtm 0.4.1) and Ubuntu 10.04 (dvtm 0.5.2), and the behavior is the expected one (Ctrl+Z suspends vim). – Gilles Feb 17 '11 at 21:44
@Gilles You are right, dvtm is not the problem. Please see my edit. – phunehehe Feb 18 '11 at 2:14
up vote 8 down vote accepted

Update (new answer):

dtach has a -z option with the description "Disable processing of the suspend key". Confusing if you ask me, but its effect seems to be that the Ctrl+Z is passed through to Vim instead of being caught by dtach.

More general answer: a program like dtach or dvtm has pretty much absolute control over what gets passed through to whatever's running "inside" of it. It's like having a secretary take dictation -- you can say what you like, but the secretary controls what actually appears on the paper. So if you want the end program to receive the Ctrl+Z, you have to get all of the middle layers to cooperate, whether that be through command line options or source code editing.

Looks to me like this is a bug in dvtm. From inspection of the source code, it's not catching the SIGTSTP signal, which is what is sent to your terminal's foreground application when you press Ctrl+z. Since it's not catching the signal explicitly, it falls back on default behavior and gets suspended. What dvtm needs to do is catch this signal and pass it along to one of its windows.

share|improve this answer
Thanks for your effort, but sorry it was my mistake. dtach is the one responsible for this, not dvtm. – phunehehe Feb 18 '11 at 2:15
@Gilles: You're right, and on further inspection, dvtm does what you've described. And now that I've actually tried it instead of just assuming things and poking around in the source, I'm seeing the correct behavior as well. – Jander Feb 18 '11 at 2:17

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.