Page 1 of 1

Dumb Question....

Posted: Mon Apr 22, 2013 2:01 am
by millpond
Is there a simple way to query a terminal to find out what Window Manager one is in?

By default I boot to KDE, but when I have real work to do I boot to XFCE and logon as root.

I thought i could save some resources by killing off kdm there, but it shut x down, and startx took me into an unfamiliar window manager as root.

I dont really know the difference between cinnamon and mate - it looks kinda like Gnome, but I would like a script to be able to ID the WM so as to have a clue as to where i am!

On second thought its gotta be a gnome variant because its a pig, and doesnt flush junk as well as KDE.

Re: Dumb Question....

Posted: Mon Apr 22, 2013 3:44 am
by Monsta
Try the environment variable named DESKTOP_SESSION :)

Re: Dumb Question....

Posted: Mon Apr 22, 2013 12:44 pm
by millpond
Excellent:

env | grep -i DESKTOP_SESSION

Will always help me get my bearings.

Will put it in bash.bashrc

Re: Dumb Question....

Posted: Mon Apr 22, 2013 1:27 pm
by Monsta
I think it's enough to write just $DESKTOP_SESSION in scripts, no grep required :)