I don't know why it would behave differently but often times executables are "overloaded" to behave differently when called with different names.
There's typically a structure inside the program called a case/switch statement that determines the name the executable was called with and then will call the appropriate functionality for that executable name. That name is usually the first argument the program receives. For example, in C
when you write:
int main(int argc, char** argv)
argv[0]
contains the name of the called executable. At least, this is the standard behaviour for all shells, and all executables that use arguments should be aware of it.
Example in Perl
Here's a contrived example I put together in Perl which shows the technique as well.
Here's the actual script, call it mycmd.pl
:
#!/usr/bin/perl
use feature ':5.10';
(my $arg = $0) =~ s#./##;
my $msg = "I was called as: ";
given ($arg) {
$msg .= $arg when 'ls';
$msg .= $arg when 'find';
$msg .= $arg when 'pwd';
default { $msg = "Error: I don't know who I am 8-)"; }
}
say $msg;
exit 0;
Here's the file system setup:
$ ls -l
total 4
lrwxrwxrwx 1 saml saml 8 May 24 20:49 find -> mycmd.pl
lrwxrwxrwx 1 saml saml 8 May 24 20:34 ls -> mycmd.pl
-rwxrwxr-x 1 saml saml 275 May 24 20:49 mycmd.pl
lrwxrwxrwx 1 saml saml 8 May 24 20:49 pwd -> mycmd.pl
Now when I run my commands:
$ ./find
I was called as: find
$ ./ls
I was called as: ls
$ ./pwd
I was called as: pwd
$ ./mycmd.pl
Error: I don't know who I am 8-)
How to debug?
I would make use of strace
to figure out what configuration files are being used when the "application" is called with the various names.
$ strace -s 2000 -o xterm.log /usr/bin/xterm
... after its launched ...
$ exit
Then run it again like this:
$ strace -s 2000 -o emulator.log /etc/alternatives/x-terminal-emulator
... after its launched ...
$ exit
You'll want to take a look at the various open(...)
lines in the output to narrow focus to the files it's calling on.
~/.Xresources file?
As @chepner suggested in the comments perhaps the issue is being caused by a errant configuration definition in your ~/.Xresources file. This file allows you to set various things such as the font used by xterm
You likely have a line such as this:
XTerm*background: black
XTerm*foreground: gray
XTerm*title: terminal
XTerm*saveLines: 1024
These rules would get picked up by applications whose name is XTerm but not by any other apps such as x-terminal-emulator
. It's also entirely possible that the rule looks like this instead:
xterm*reverseVideo: on
NOTE: You can force changes in this file to be reloaded like so:
$ xrdb -merge ~/.Xresources
References
x-terminal-emulator
with text editor just to check that it is not bash executable or something like that?