I had been faced similar issues with VNC a long time ago, so as far as I remember, it might be because of a currupt profile.
For a trial, you can move config file (either .bashrc or .cshrc) and generate a new one.
~$ move .bashrc .bashrc.bck
~$ cp /path/to/newfile ~/
~$ source .bashrc
And try typing d
. In case if it do not help, restore the file,
~$ mv .bashrc.bck .bashrc