Skip to content

Commit 859cb3d

Browse files
authored
Only run in Pantheon (#367)
1 parent eeec359 commit 859cb3d

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

data/settings.desktop.in

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,13 @@ Type=Application
33

44
Name=System Settings
55
Comment=Change system and user settings
6-
Categories=GNOME;GTK;System;
6+
Categories=GTK;System;
77
Keywords=Center;Control;Panel;Preferences;System;
88

99
Icon=io.elementary.settings
1010
Exec=io.elementary.settings %u
1111
DBusActivatable=true
12+
OnlyShowIn=Pantheon;
1213
SingleMainWindow=true
1314
StartupNotify=true
1415
Terminal=false

src/Application.vala

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,11 @@ namespace Switchboard {
261261
}
262262

263263
public static int main (string[] args) {
264+
if (GLib.Environment.get_variable ("XDG_CURRENT_DESKTOP") != "Pantheon") {
265+
critical ("System Settings can only be run in a Pantheon desktop session");
266+
return 1;
267+
}
268+
264269
var app = new SwitchboardApp ();
265270
return app.run (args);
266271
}

0 commit comments

Comments
 (0)