Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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

I'm configuring xmonad. I changed the terminal to terminal="urxvt" but I don't like that it spawn three processes per each terminal I open:

~$ ps -fea --forest
fake 16042 12136  0 11:22 ?        00:00:00          \_ /bin/sh -c urxvt
fake 16043 16042  0 11:22 ?        00:00:00          |   \_ urxvt
fake 16044 16043  0 11:22 pts/2    00:00:00          |       \_ bash

How can I fix that? Can I remove the /bin/sh -c urxvt process?

share|improve this question
up vote 1 down vote accepted

Internally XMonad uses spawn in XMonad.Core:

spawn :: MonadIO m => String -> m ()

spawn. Launch an external application. Specifically, it double-forks and runs the String you pass as a command to /bin/sh.

So if one wants to only change the terminal value, rather than using say executeFile directly, one would have to use exec in the shell command, terminal="exec urxvt", which would remove the extra /bin/sh by causing it to exec the command rather than the shell being the process's parent.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .