fix hostname, use basename $PWD [xterminals]

fix hostname on broken networks