Check which desktop enviroment is the user using (Linux) in Qt

is it possible to check which desktop environment is the user is using (say KDE or Unity). The issue is that I have a window which has a menubar, but depending on the desktop environment, the menu is drawn on it or not (for example, in Unity, the menubar is drawn on the panel). I know that I could just disable the nativeMenuBar feature, but I would prefer to have it enabled. In my case, I cannot use layouts, so the only two options are to check the desktop enviroment or disable the nativeMenuBar feature.

Thanks in advance.


You can check the DESKTOP_SESSION environment variable. Use getenv() to do that.

Need Your Help

Add service reference generated my client incompelety

c# wcf

Something has gone wrong when I "Add Service Reference" to target my wcf.

A full operating system in c#

c# operating-system

I saw this thread here. I was wondering if this was legit (sounds like it) and what are the drawbacks of doing this. What does it entail to run it stand alone in some architecture?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.