Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I was wondering what commands/utilities can be used in terminal to know the types of windowing system (such as X window system), window manager (such as Metacity, KWin, Window Maker) and desktop environment (such as KDE, Gnome) of a Linux or other Unix-like operating systems?

Thanks!

share|improve this question
2  
So you want to know what's installed, what's default or what's running? –  bahamat Feb 14 '11 at 16:14
    
@bahamat: what is running. That is why I want to know if there are some system files or commands for me to check that. But if you also know how to check for what's installed, what's default, then I also would like to know. Thanks! –  Tim Feb 14 '11 at 17:49
    
What do you want to do with this information? (Windowing system is at least almost always X windows) –  pjc50 Feb 15 '11 at 15:38
    
@pjc50: different types come with different sets of applications. I need the info to decide whether an application is for mine. –  Tim Feb 15 '11 at 15:41
    
For desktop environment, I came across env | grep XDG_CURRENT_DESKTOP. –  user15760 May 7 '13 at 17:41
add comment

1 Answer 1

With difficulty.

There is no centralized system for keeping track of these things.

  • On Debian-derived Linuxes you might try the alternatives system.
  • You could query the package manager, and if you find only one Foo installed, you can be pretty sure which Foo is in use.
  • You could try parsing the output of ps. Or equivalently of reading /proc on systems that have it.

Possibly the most reliable thing is to ask the user.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.