Re: Command used to view desktop envorinoment

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

 



On 9/10/06, Chhun Vanna <chhvanna@xxxxxxxxx> wrote:
Dear all
 any body can help me with linux command to view my current desktopn
enviornment?
 i just want to show m desktop is KDE or GNOME?
 I try to search with switchdesk command but it does not sounds what i want.

--
Chhun Vanna

The file /etc/sysconfig/desktop will contain either
DESKTOP=KDE

or
DESKTOP=GNOME

Not sure if there is an environment variable for that (not in Linux
right now.  You could try "env", as well as "set" to see if either
have an environment variable showing which desktop you are using).

So you can at least get it from /etc/sysconfig/desktop.  If you want
to assign it to a variable, use:

mydesktop=$(cat /etc/sysconfig/desktop | grep DESKTOP | awk -F \= '{print $2}')

I'm assuming you are wondering about this because you want to have a
script do one thing if in Gnome, but something else if in KDE since
you are wondering if there is a Linux command to find out which
desktop you are using.

If you are simply looking to find out because you don't know which one
you are using, just do
cat /etc/sysconfig/desktop

and have a look at the output.

If nothing is specified, in Fedora Core at least I believe that means
the default Gnome desktop is the one being used currently.

Jacques B.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux