lightdm and lightdm-gtk-greeter do not show session menu in guix.

  • Open
  • quality assurance status badge
Details
One participant
  • Feng Shu
Owner
unassigned
Submitted by
Feng Shu
Severity
normal
F
F
Feng Shu wrote on 27 Dec 2023 08:14
(name . guix-bug)(address . bug-guix@gnu.org)
87v88kglrs.fsf@163.com
Toggle quote (5 lines)
> It works fine, but there are a few gotchas:

> 1. The session selection menu doesn't show the items. I don't know why.
> Perhaps a regresssion with newer GTK+.

I use below code to test:

1. lightdm-gtk-greeter code:
Toggle quote (39 lines)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >
> /* Session menu */ >
> g_debug ("XXXX: Call lightdm_get_sessions functions from main"); >
> items = lightdm_get_sessions (); >
> g_debug ("XXXX: Session menuitem create start."); >
> 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 (); >
> for (item = items; item; item = item->next) >
> { >
> LightDMSession *session = item->data; >
> GtkWidget *radiomenuitem; >
> >
> g_debug ("XXXX: Session items: %s", lightdm_session_get_key (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)); >
> } >
> >
> set_session (NULL); >
> } >
> >
> g_debug ("XXXX: Session menuitem create stop."); >
> >
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >

2. liblightdm_gobject code:

Toggle quote (20 lines)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >
> /** >
> * lightdm_get_sessions: >
> * >
> * Get the available sessions. >
> * >
> * Return value: (element-type LightDMSession) (transfer none): A list of #LightDMSession >
> **/ >
> GList * >
> lightdm_get_sessions (void) >
> { >
> g_debug ("Run lightdm_get_session function.");
> update_sessions (); >
> return local_sessions; >
> } >
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >




In my debian machine, it will show the below log, and I find that
lightdm_get_session will be called successfully.


Toggle quote (27 lines)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >
> DEBUG-Message: 10:51:53.859: XXXX: Call lightdm_get_sessions functions from main >
> DEBUG-Message: 10:51:53.859: Run lightdm_get_session function. >
> DEBUG-Message: 10:51:53.859: Sessions_dir /usr/share/lightdm/sessions:/usr/share/xsessions:/usr/share/wayland-sessions >
> DEBUG-Message: 10:51:53.859: Run lightdm_session_class_init. >
> DEBUG-Message: 10:51:53.859: Run lightdm_session_init. >
> DEBUG-Message: 10:51:53.859: Loaded session /usr/share/xsessions/lightdm-xsession.desktop (Default Xsession, ) >
> DEBUG-Message: 10:51:53.860: Run lightdm_session_init. >
> DEBUG-Message: 10:51:53.860: Loaded session /usr/share/xsessions/xfce.desktop (Xfce ??, ?????? Xfce ??????????) >
> DEBUG-Message: 10:51:53.860: Run lightdm_session_init. >
> DEBUG-Message: 10:51:53.860: Loaded session /usr/share/xsessions/icewm-session.desktop (IceWM Session, ???????? IceWM) >
> DEBUG-Message: 10:51:53.861: Run lightdm_session_init. >
> DEBUG-Message: 10:51:53.861: Loaded session /usr/share/wayland-sessions/weston.desktop (Weston, The reference Wayland server) >
> DEBUG-Message: 10:51:53.861: XXXX: Session menuitem create start. >
> DEBUG-Message: 10:51:53.864: Run lightdm_get_session function. >
> DEBUG-Message: 10:51:53.864: XXXX: Session items: lightdm-xsession >
> DEBUG-Message: 10:51:53.864: XXXX: Session items: icewm-session >
> DEBUG-Message: 10:51:53.864: XXXX: Session items: weston >
> DEBUG-Message: 10:51:53.864: XXXX: Session items: xfce >
> DEBUG-Message: 10:51:53.864: XXXX: Call lightdm_get_sessions functions from set_session, argument: (null) >
> DEBUG-Message: 10:51:53.864: Run lightdm_get_session function. >
> DEBUG-Message: 10:51:53.864: XXXX: Call lightdm_get_sessions functions from set_session, argument: xfce >
> DEBUG-Message: 10:51:53.864: Run lightdm_get_session function. >
> DEBUG-Message: 10:51:53.864: XXXX: Session menuitem create stop. >
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >


But in guix, lightdm_get_sessions seem to not be called, for I can not
find string "Run lightdm_get_session function. " in log file, just like
the below:

Toggle quote (7 lines)
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >
> DEBUG-Message: 10:51:53.859: XXXX: Call lightdm_get_sessions functions from main >
> DEBUG-Message: 10:51:53.861: XXXX: Session menuitem create start. >
> DEBUG-Message: 10:51:53.864: XXXX: Session menuitem create stop. >
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> >


liblightdm-gobject shared library seem to be loaded, for when I remove this lib,
gtk-greeter will not show.


but why lightdm_get_sessions function do not be called while
liblightdm-gobject is loaded?


--
F
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 68055@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 68055
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch