Solve #178

This patch is extracting the current term of the user instead of forcing
it to xterm. This work on my server, but was not tested on other hosts
or configuration.