Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Need help: lightdm and lightdm-gtk-greeter in guix system do not show session menu. #333

Open
tumashu opened this issue Dec 26, 2023 · 4 comments

Comments

@tumashu
Copy link

tumashu commented Dec 26, 2023

Hello, I have try to fix a issue of lightdm and lightdm-gtk-greeter in guix system, the problem is session menu in lightdm-gtk-greeter is show nothing.

lightdm_get_sessions of lightdm-gtk-greeter seem to return no sessions, for I tested the below
code, "XXXX: items3" is not show.

    items = lightdm_get_sessions ();
    g_debug ("XXXX: items1");
    if (gtk_widget_get_visible (session_menuitem))
    {
        GSList *sessions = NULL;

        if (gtk_icon_theme_has_icon (icon_theme, "document-properties-symbolic"))
            session_badge = gtk_image_new_from_icon_name ("document-properties-symbolic", GTK_ICON_SIZE_MENU);
        else
            session_badge = gtk_image_new_from_icon_name ("document-properties", GTK_ICON_SIZE_MENU);
        gtk_widget_show (session_badge);
        gtk_container_add (GTK_CONTAINER (session_menuitem), session_badge);

        items = lightdm_get_sessions ();
        g_debug ("XXXX: items2");
        for (item = items; item; item = item->next)
        {
            LightDMSession *session = item->data;
            GtkWidget *radiomenuitem;

            g_debug ("XXXX: items3");
            g_debug ("XXXX: items3", lightdm_session_get_name (session));

            radiomenuitem = gtk_radio_menu_item_new_with_label (sessions, lightdm_session_get_name (session));
            g_object_set_data (G_OBJECT (radiomenuitem), SESSION_DATA_KEY, (gpointer) lightdm_session_get_key (session));
            sessions = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (radiomenuitem));
            g_signal_connect (G_OBJECT (radiomenuitem), "activate", G_CALLBACK (session_selected_cb), NULL);
            gtk_menu_shell_append (GTK_MENU_SHELL (session_menu), radiomenuitem);
            gtk_widget_show (GTK_WIDGET (radiomenuitem));
        }

What makes me feel strange is that , ligthdm_get_sessions of lightdm seem to not be called,
for I use the below code to test, and /tmp/test0.txt file is not generated.

GList *
lightdm_get_sessions (void)
{
    FILE *fp3 = NULL;
    fp3 = fopen("/tmp/test0.txt", "w+");
    fprintf(fp3, "This is testing for fprintf...\n");
    fputs("xxxxx", fp3);
    fclose(fp3);

    update_sessions ();
    return local_sessions;
}

@tumashu tumashu changed the title lightdm and lightdm-gtk-greeter in guix system do not show session menu. need help: lightdm and lightdm-gtk-greeter in guix system do not show session menu. Dec 26, 2023
@tumashu tumashu changed the title need help: lightdm and lightdm-gtk-greeter in guix system do not show session menu. Need help: lightdm and lightdm-gtk-greeter in guix system do not show session menu. Dec 26, 2023
@tumashu
Copy link
Author

tumashu commented Dec 27, 2023

It seem that liblightdm-gobject-1.so.0 is loaded, but is lightdm_get_sessions is not called, I do not know why.

https://issues.guix.gnu.org/68055

@Ashvith10
Copy link

@tumashu have you found any solution for this?

@tumashu
Copy link
Author

tumashu commented Sep 10, 2024

@Ashvith10 no

@tumashu
Copy link
Author

tumashu commented Sep 10, 2024

can not show wm list, at the moment, we need to special wm manual like below:

(service lightdm-service-type
               (lightdm-configuration
                (seats
                 (list (lightdm-seat-configuration
                        (name "*")
                        (user-session "icewm"))))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants