How to know if I'm using an xterm or a gnome-terminal from command line?
The output of "echo $TERM" is "xterm" from both of them.
How to know?
Cheers,
Germán.
--
Germán A. Racca
National Institute for Space Research (INPE)
Săo José dos Campos - SP - Brasil
http://sites.google.com/site/gracca
http://gracca.wordpress.com
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 07:15 PM
Paolo Galtieri
how to know if I'm using xterm or gnome-terminal?
Run
ps axlw | grep term
This will show you which one you are running
Paolo
On Tue, Feb 23, 2010 at 11:52 AM, Germán A. Racca <german.racca@gmail.com> wrote:
Hi all:
How to know if I'm using an xterm or a gnome-terminal from command line?
The output of "echo $TERM" is "xterm" from both of them.
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 07:22 PM
Germán "A. Racca"
how to know if I'm using xterm or gnome-terminal?
On Tue, 2010-02-23 at 12:15 -0800, Paolo Galtieri wrote:
> Run
>
> ps axlw | grep term
>
> This will show you which one you are running
>
> Paolo
But if there are several xterms and gnome-terminals running, I'll get
them all. Which I want to know is the one I'm using.
Germán.
> On Tue, Feb 23, 2010 at 11:52 AM, Germán A. Racca
> <german.racca@gmail.com> wrote:
> Hi all:
>
> How to know if I'm using an xterm or a gnome-terminal from
> command line?
>
> The output of "echo $TERM" is "xterm" from both of them.
>
> How to know?
>
> Cheers,
> Germán.
> --
> Germán A. Racca
> National Institute for Space Research (INPE)
> Săo José dos Campos - SP - Brasil
> http://sites.google.com/site/gracca
> http://gracca.wordpress.com
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 07:23 PM
James Wilkinson
how to know if I'm using xterm or gnome-terminal?
Germán A. Racca wrote:
> How to know if I'm using an xterm or a gnome-terminal from command line?
>
> The output of "echo $TERM" is "xterm" from both of them.
>
> How to know?
Well, it looks as though gnome-terminal sets $COLORTERM, whereas xterm
doesn’t. But xterm doesn’t unset it, either, so if you get a user
starting up a gnome-terminal, thinking “Yuck!”¹ and using that
gnome-terminal solely to run xterm, then the xterm will inherit the
$COLORTERM setting.
Xterm has its own $XTERM_ variables, so you could test for those. But
gnome-terminal doesn’t unset those, either, so you could get a user
starting up am xterm, thinking “Yuck!”¹ and using that xterm solely to
run gnome-terminal…
And then you’re going to get someone using Konsole.
What are you trying to do?
James.
¹There’s no accounting for taste…
--
E-mail: james@ | I must refute the rumour that one of our team members
aprilcottage.co.uk | walks on water. Although it’s true that Barry Cryer runs
| on lager...
| -- “I’m Sorry, I Haven’t A Clue”, BBC Radio 4
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 07:31 PM
James Wilkinson
how to know if I'm using xterm or gnome-terminal?
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
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 07:38 PM
Germán "A. Racca"
how to know if I'm using xterm or gnome-terminal?
On Tue, 2010-02-23 at 20:23 +0000, James Wilkinson wrote:
> Germán A. Racca wrote:
> > How to know if I'm using an xterm or a gnome-terminal from command line?
> >
> > The output of "echo $TERM" is "xterm" from both of them.
> >
> > How to know?
>
> Well, it looks as though gnome-terminal sets $COLORTERM, whereas xterm
> doesn’t. But xterm doesn’t unset it, either, so if you get a user
> starting up a gnome-terminal, thinking “Yuck!”¹ and using that
> gnome-terminal solely to run xterm, then the xterm will inherit the
> $COLORTERM setting.
>
> Xterm has its own $XTERM_ variables, so you could test for those. But
> gnome-terminal doesn’t unset those, either, so you could get a user
> starting up am xterm, thinking “Yuck!”¹ and using that xterm solely to
> run gnome-terminal…
>
> And then you’re going to get someone using Konsole.
>
> What are you trying to do?
>
> James.
>
> ¹There’s no accounting for taste…
>
> --
> E-mail: james@ | I must refute the rumour that one of our team members
> aprilcottage.co.uk | walks on water. Although it’s true that Barry Cryer runs
> | on lager...
> | -- “I’m Sorry, I Haven’t A Clue”, BBC Radio 4
I'm running a program called IRAF to work with astronomical images, and
it needs to use the graphic capabilities of an xterm, not
gnome-terminal. So, I'm trying to make a very simple script to start
IRAF, but first I have to know if I'm on an xterm (so it enters directly
to IRAF) or a gnome-terminal (in this case the script must open an xterm
before).
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 07:39 PM
Matthew Saltzman
how to know if I'm using xterm or gnome-terminal?
On Tue, 2010-02-23 at 16:52 -0300, Germán A. Racca wrote:
> Hi all:
>
> How to know if I'm using an xterm or a gnome-terminal from command line?
>
> The output of "echo $TERM" is "xterm" from both of them.
>
> How to know?
$ set | grep term
COLORTERM=gnome-terminal
TERM=xterm
...
>
> Cheers,
> Germán.
--
Matthew Saltzman
Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 07:41 PM
Nalin Dahyabhai
how to know if I'm using xterm or gnome-terminal?
On Tue, Feb 23, 2010 at 04:52:32PM -0300, Germán A. Racca wrote:
> Hi all:
>
> How to know if I'm using an xterm or a gnome-terminal from command line?
>
> The output of "echo $TERM" is "xterm" from both of them.
>
> How to know?
James Wilkinson already outlined why most environment variables probably
shouldn't be trusted, so I'll suggest checking the output of
xprop -id $WINDOWID WM_CLASS
HTH,
Nalin
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 09:06 PM
Jake Peavy
how to know if I'm using xterm or gnome-terminal?
On Tue, Feb 23, 2010 at 3:38 PM, Germán A. Racca <german.racca@gmail.com> wrote:
I'm running a program called IRAF to work with astronomical images, and
it needs to use the graphic capabilities of an xterm, not
gnome-terminal. So, I'm trying to make a very simple script to start
IRAF, but first I have to know if I'm on an xterm (so it enters directly
to IRAF) or a gnome-terminal (in this case the script must open an xterm
before).
This must be too easy, but I'm going to say it anyway.* Why not always start xterm and run IRAF within it?
--
-jp
If you were a pirate, you know what would be the one thing that would really
make you mad? Treasure chests with no handles. How the heck are you supposed
to carry it?!
deepthoughtsbyjackhandey.com
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
02-23-2010, 09:07 PM
Germán "A. Racca"
how to know if I'm using xterm or gnome-terminal?
On Tue, 2010-02-23 at 17:06 -0500, Jake Peavy wrote:
> On Tue, Feb 23, 2010 at 3:38 PM, Germán A. Racca
> <german.racca@gmail.com> wrote:
> I'm running a program called IRAF to work with astronomical
> images, and
> it needs to use the graphic capabilities of an xterm, not
> gnome-terminal. So, I'm trying to make a very simple script to
> start
> IRAF, but first I have to know if I'm on an xterm (so it
> enters directly
> to IRAF) or a gnome-terminal (in this case the script must
> open an xterm
> before).
>
> This must be too easy, but I'm going to say it anyway. Why not always
> start xterm and run IRAF within it?
>
> --
> -jp
Yes, I can always do that, but I want to make the script also ;-)
G.
--
Germán A. Racca
National Institute for Space Research (INPE)
Săo José dos Campos - SP - Brasil
http://sites.google.com/site/gracca
http://gracca.wordpress.com
--
users mailing list
users@lists.fedoraproject.org
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines