how to know if I'm using xterm or gnome-terminal?

James Wilkinson fedora at aprilcottage.co.uk
Tue Feb 23 20:31:55 UTC 2010


Paolo Galtieri wrote:
> Run
> 
> ps axlw | grep term
> 
> This will show you which one you are running

It may do.

It may show which ones you are running, or which ones other users on the
same machine are running.

And (which I should have thought of in my last email, too) it’s quite
possible that the terminal and the shell script are running on different
computers (think ssh). Not all the variables will carry across the SSH
link.

So you either have to run with an 80% solution, think up some other way
of doing what you want, or trying to write a script that doesn’t need to
know the difference.

Good luck!

James.

-- 
E-mail:     james@ | Reminds me of a friend's young son who watched a small
aprilcottage.co.uk | tortoise ambling very slowly across the patio, and then
                   | asked us adults if it would go faster with a fresh set of
                   | batteries.                                      -- Tanuki


More information about the users mailing list