Skip to content

Commit

Permalink
Auto-detect Linux MATE (closes #34)
Browse files Browse the repository at this point in the history
  • Loading branch information
basti1302 committed Sep 16, 2013
1 parent 2e610be commit d96e82c
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package de.bastiankrol.startexplorer.crossplatform;

import static de.bastiankrol.startexplorer.Activator.*;
import static de.bastiankrol.startexplorer.Activator.getLogFacility;
import static de.bastiankrol.startexplorer.Activator.getPluginContext;

import java.io.IOException;

Expand Down Expand Up @@ -91,6 +92,11 @@ private static DesktopEnvironment findLinuxDesktopEnvironment()
{
if (checkProcessNames("gnome-session"))
{
// TODO How to check for gnome variants like cinnamon that do not have
// nautilus (but nemo)? Maybe something like feature detection would be
// a better approach. Like this:
// Is there an executable named nautilus? No? Maybe nemo? No? Maybe
// thunar or konqueror....?
return DesktopEnvironment.LINUX_GNOME;
}
if (checkProcessNames("ksmserver"))
Expand All @@ -105,6 +111,10 @@ private static DesktopEnvironment findLinuxDesktopEnvironment()
{
return DesktopEnvironment.LINUX_LXDE;
}
if (checkProcessNames("mate-session"))
{
return DesktopEnvironment.LINUX_MATE;
}
return DesktopEnvironment.LINUX_UNKNOWN;
}
catch (IOException e)
Expand Down

0 comments on commit d96e82c

Please sign in to comment.