diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fbe32f18..c08f0302 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -40,7 +40,7 @@ jobs: - name: Upload Test Log if: failure() - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: Test Log ${{ matrix.image.name }} ${{ matrix.image.tag }} path: tests/test-suite.log diff --git a/src/lightdm.c b/src/lightdm.c index 2821a1c9..d2e23dfc 100644 --- a/src/lightdm.c +++ b/src/lightdm.c @@ -26,6 +26,7 @@ #include "display-manager-service.h" #include "xdmcp-server.h" #include "vnc-server.h" +#include "vt.h" #include "seat-xdmcp-session.h" #include "seat-xvnc.h" #include "x-server.h" @@ -918,6 +919,10 @@ main (int argc, char **argv) { set_seat_properties (seat, NULL); seat_set_property (seat, "exit-on-failure", "true"); + + /* in the absence of login1 we find out this using our own heuristics */ + seat_set_can_tty (seat, vt_can_multi_seat ()); + if (!display_manager_add_seat (display_manager, seat)) return EXIT_FAILURE; } diff --git a/tests/src/test-runner.c b/tests/src/test-runner.c index bfda38ef..55056d6a 100644 --- a/tests/src/test-runner.c +++ b/tests/src/test-runner.c @@ -128,6 +128,7 @@ typedef struct gchar *path; gboolean can_graphical; gboolean can_multi_session; + gboolean can_tty; gchar *active_session; } Login1Seat; @@ -1555,6 +1556,8 @@ handle_login1_seat_get_property (GDBusConnection *connection, return g_variant_new_boolean (seat->can_graphical); else if (strcmp (property_name, "CanMultiSession") == 0) return g_variant_new_boolean (seat->can_multi_session); + else if (strcmp (property_name, "CanTTY") == 0) + return g_variant_new_boolean (seat->can_tty); else if (strcmp (property_name, "Id") == 0) return g_variant_new_string (seat->id); else if (strcmp (property_name, "ActiveSession") == 0) @@ -1580,6 +1583,7 @@ add_login1_seat (GDBusConnection *connection, const gchar *id, gboolean emit_sig seat->path = g_strdup_printf ("/org/freedesktop/login1/seat/%s", seat->id); seat->can_graphical = TRUE; seat->can_multi_session = TRUE; + seat->can_tty = TRUE; seat->active_session = NULL; const gchar *login1_seat_interface = @@ -1587,6 +1591,7 @@ add_login1_seat (GDBusConnection *connection, const gchar *id, gboolean emit_sig " " " " " " + " " " " " " " "