Getting or cloning the users current terminal?

view story

http://unix.stackexchange.com – I have to work with a script that forks and launches an instance of xterm in order to display log output in one window and have an interactive interface in the other. Personally I prefer rxvt-unicode and I would like to modify this script so that it is no longer hardcoded to use xterm. Is it possible to either figure out the users preferred terminal in a desktop-agnostic way or to get the parent terminal. The parent terminal might not be the next parent in the process tree since it's possible that the script in question can in term be called by another script or application. Since the script (HowTos)