aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-24 22:16:01 +0100
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2023-02-24 22:16:01 +0100
commitc99e78a2de7c1be629fb0c343e43d0c98ab1ebe0 (patch)
treecc5a3d8da4223e40d54542bef278ec9099eeb90a /src
parent75f05d20031099cef0a3874dbb8db1fc82440f7c (diff)
downloadarctica-greeter-c99e78a2de7c1be629fb0c343e43d0c98ab1ebe0.tar.gz
arctica-greeter-c99e78a2de7c1be629fb0c343e43d0c98ab1ebe0.tar.bz2
arctica-greeter-c99e78a2de7c1be629fb0c343e43d0c98ab1ebe0.zip
Use ArcticaGreeter's way of detecting the default session, only fallback to LightDMs default if absolutely necessary.
Diffstat (limited to 'src')
-rw-r--r--src/arctica-greeter.vala2
-rw-r--r--src/user-list.vala10
2 files changed, 9 insertions, 3 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index 3de7b29..68c8887 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -220,6 +220,7 @@ public class ArcticaGreeter : Object
foreach (string session in sessions) {
var path = Path.build_filename ("/usr/share/wayland-sessions/", session.concat(".desktop"), null);
if (FileUtils.test (path, FileTest.EXISTS)) {
+ debug ("Using %s as default (Wayland) session.", session);
return session;
}
}
@@ -227,6 +228,7 @@ public class ArcticaGreeter : Object
foreach (string session in sessions) {
var path = Path.build_filename ("/usr/share/xsessions/", session.concat(".desktop"), null);
if (FileUtils.test (path, FileTest.EXISTS)) {
+ debug ("Using %s as default (X11) session.", session);
return session;
}
}
diff --git a/src/user-list.vala b/src/user-list.vala
index abbf576..2f16924 100644
--- a/src/user-list.vala
+++ b/src/user-list.vala
@@ -111,11 +111,16 @@ public class UserList : GreeterList
}
}
- private string _default_session = "lightdm-xsession";
+ private string _default_session = "";
public string default_session
{
get
{
+ if (_default_session == "") {
+ var greeter = new ArcticaGreeter ();
+ _default_session = ArcticaGreeter.get_default_session();
+ debug ("Setting UserList._default_session to '%s'.", _default_session);
+ }
return _default_session;
}
set
@@ -911,7 +916,7 @@ public class UserList : GreeterList
var text = manual_name;
if (text == null)
text = _("Login");
- add_user ("*other", text);
+ add_user ("*other", text, null, false, false, default_session);
}
protected void prompt_box_respond_cb (string[] responses)
@@ -1046,7 +1051,6 @@ public class UserList : GreeterList
test_fill_list ();
else
{
- default_session = greeter.default_session_hint ();
always_show_manual = greeter.show_manual_login_hint ();
if (!greeter.hide_users_hint ())
{