Xmonad terminal creates three processes

0

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?

Zhen

Posted 2013-07-23T09:34:38.943

Reputation: 713

Answers

1

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.

Dan D.

Posted 2013-07-23T09:34:38.943

Reputation: 5 138