$() is valid in any shell. Backticks are deprecated and have been for quite a long time I believe. They were replaced with $() because you can't nest backticks, but you can nest $(). Also it's clearer. Backticks are only still supported for compatability's sake and you should refrain from putting them in any new code. Also $() is POSIX-defined.
{ ERROR=$(which "$TERM" 2>&1 1>&$out); } {out}>&1 # $ERROR is set to whatever "which $TERM" outputs to stderr
is not valid in a different shell (I just tested in dash), I'll find a fix for that tomorrow (there's a different way to do it)
Also, the code I posted also accounts for the other possible values of $TERM. True, what you posted would work if someone had TERM="rxvt-unicode-256color", but my code will not only account for that, but also for any other possible values of $TERM (for example, if $TERM turns out to be rxvt-88color, z29a-nkc-uc, Eterm-256color, xterm-xf86-v44, xnuppc-200x75-m, ansi80x25-mono or any other of the 2661 possible valid values listed in /usr/share/terminfo (yes there's 2661 different terminals out there can you believe that?)) by defaulting to xterm.
What my code does is as follows:
* First, it checks if $(which "$TERM") gives an error. xdg-terminal tries to execute that later on, and if it's an error it'll crash the whole thing horribly
* If it is, it checks if $TERM just so happens to be rxvt-unicode-256color, and if it is it sets TERM to be "urxvt", because I happen to know that's what is meant by rxvt-unicode-256color.
* If it's not rxvt-unicode-256color, it just ignores the previous value of TERM altogether.
Your code skips the first and last steps and only fixes the crashing for a TERM value of rxvt-unicode-256color. It'll work on my machine, but it won't work for someone who has some other exotic terminal. My code will work for anyone that has xterm installed.
EDIT: Also, I think I've mentioned this before but why are you so hellbent on not having bash as a dependency? I challenge you to find even 1 example of a GNU/Linux user who doesn't have bash installed. If you just make xdg-terminal bash-dependent then I'm 100% sure you'll not break compatibility for anyone, not now nor in the future, and you'll get access to all these shiny bash features.
Anyways, I have a non-bash-reliant solution to the problem here (tested using the dash shell)
Just replace the line I posted earlier in this post with the following:
ERROR="$(which $TERM 2>&1 > /dev/null)"
With this, the entire thing should work without using bash, and it looks better too.