Re: [SOLVED]Re: how to know if I'm using xterm or gnome-terminal?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Feb 24, 2010 at 2:56 PM, Germán A. Racca <german.racca@xxxxxxxxx> wrote:
On Tue, 2010-02-23 at 15:41 -0500, Nalin Dahyabhai wrote:
> 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

Thanks to all that answered my question with a lot of useful
suggestions.

Finally, I decided to use Nalin's suggestion and implement the following
command to know if I'm using an xterm or a gnome-terminal:

xprop -id $WINDOWID WM_CLASS | awk '{print $3}' | sed 's/"//g' | sed
's/,//g'

which returns either "xterm" or "gnome-terminal".


for me xprop -id $WINDOWID WM_CLASS returns "WM_CLASS: not found."

This is on F11, Gnome terminal 2.26.1.

?

--
-jp

It's funny how annoyed people get when you carry a bullhorn around all the time, even if you don't use it that often.

deepthoughtsbyjackhandey.com

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines
[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [Fedora Magazine]     [Fedora News]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Maintainers]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Fonts]     [ATA RAID]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [SSH]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Tux]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]     [Fedora Sparc]     [Fedora Universal Network Connector]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux