clear tmp and make some tricks to allow X11 forwarding