So how is one *supposed* to make this all work? I need some way to get DISPLAY set correctly most of the time, I'd go crazy if I had to set it manually every time I rlogin to another machine here at work. I typically have five or six xterms open to Solaris boxes for example. Currently having it hardcoded in my .profile works 'most of the time' but it's then a big pain sorting out the ssh use because the special ssh value for DISPLAY is lost.
I'm sure there must be some environment variable or other that gets set if you're logging in to your machine remotely that doesn't get set if you log in directly. Set DISPLAY from .profile depending on the value of that variable?
Or... you could grep ps for your /(ba)?sh/ instance and see if it's running on a real vt or not... summat like that.
*clutches at straws*
Steve