After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 769009 - Switching users does not work
Switching users does not work
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: general
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-07-20 20:03 UTC by Antonio Ospite
Modified: 2016-07-31 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
menu-items: fix user switching with gdm (2.97 KB, patch)
2016-07-29 01:11 UTC, Alberts Muktupāvels
committed Details | Review

Description Antonio Ospite 2016-07-20 20:03:24 UTC
Hi,

it looks like I cannot switch users with gnome-flashback (3.20.1-2 from Debian).

When I click on the menu item it looks like the switching procedure starts, but then there is a delay and then the password prompt to unlock the previous user shows up, without the possibility to select a new user.

Thanks,
   Antonio
Comment 1 Alberts Muktupāvels 2016-07-20 23:36:01 UTC
User switching is part of gnome-panel code.

1) Do you get any warnings or messages? Might be good idea to do `gnome-panel --replace` in terminal and then try to switch user.

2) GDM, LightDM or other display manager is used?
Comment 2 Antonio Ospite 2016-07-21 15:21:22 UTC
Hi Alberts,

1) this is the only message I get on the console (repeated a few times) when running "gnome-panel --replace", and it shows up before trying to switch user:

(gnome-panel:21344): Gtk-WARNING **: Allocating size to GtkAlignment 0x192e6f0 without calling gtk_widget_get_preferred_width/height(). How does the code know the size to allocate?


2) I am using GDM from Debian, from ps I can see this process hierarchy, right after a fresh boot:

 3559 tty2     Ssl+   0:00 /usr/lib/gdm3/gdm-x-session --run-script /usr/lib/gnome-flashback/gnome-flashback-metacity
 3561 tty2     Sl+    0:02  \_ /usr/lib/xorg/Xorg vt2 -displayfd 3 -auth /run/user/1000/gdm/Xauthority -background none -noreset -keeptty -verbose 3
 3570 tty2     S+     0:00  \_ dbus-daemon --print-address 4 --session
 3572 tty2     Sl+    0:00  \_ /usr/lib/gnome-session/gnome-session-binary --session=gnome-flashback-metacity --disable-acceleration-check
 3664 tty2     Sl+    0:00      \_ /usr/lib/gnome-settings-daemon/gnome-settings-daemon
 3665 tty2     Sl+    0:00      \_ /usr/lib/at-spi2-core/at-spi-bus-launcher --launch-immediately
 3673 tty2     S+     0:00      |   \_ /usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
 3696 tty2     Sl+    0:01      \_ metacity
 3707 tty2     Sl+    0:01      \_ gnome-panel
 3849 tty2     S+     0:00      |   \_ xterm
 3852 pts/0    Ss     0:00      |       \_ bash
 3891 pts/0    R+     0:00      |           \_ ps af
 3715 tty2     Sl+    0:00      \_ gnome-flashback
 3716 tty2     Sl+    0:01      \_ nautilus --no-default-window --force-desktop
 3793 tty2     Sl+    0:00      \_ /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1
 3794 tty2     S+     0:00      \_ /usr/bin/python /usr/bin/smart-notifier
 3798 tty2     S+     0:00      \_ devilspie
 3800 tty2     Sl+    0:00      \_ gnome-screensaver
 3801 tty2     Sl+    0:00      \_ /usr/bin/python3 /usr/share/system-config-printer/applet.py
 2976 tty1     Ssl+   0:00 /usr/lib/gdm3/gdm-wayland-session gnome-session --autostart /usr/share/gdm/greeter/autostart
 2978 tty1     S+     0:00  \_ dbus-daemon --print-address 3 --session
 3004 tty1     Sl+    0:00  \_ /usr/lib/gnome-session/gnome-session-binary --autostart /usr/share/gdm/greeter/autostart
 3230 tty1     Sl+    0:05      \_ /usr/bin/gnome-shell
 3477 tty1     Sl+    0:00      |   \_ /usr/bin/Xwayland :1024 -rootless -noreset -listen 4 -listen 5 -displayfd 6
 3499 tty1     Sl+    0:00      \_ /usr/lib/gnome-settings-daemon/gnome-settings-daemon


Switching users works from a gnome-shell session.

Thanks,
  Antonio
Comment 3 Alberts Muktupāvels 2016-07-29 01:11:26 UTC
Created attachment 332323 [details] [review]
menu-items: fix user switching with gdm

This patch is for master, can you test it?
Comment 4 Antonio Ospite 2016-07-29 20:57:05 UTC
(In reply to Alberts Muktupāvels from comment #3)
> Created attachment 332323 [details] [review] [review]
> menu-items: fix user switching with gdm
> 
> This patch is for master, can you test it?

The patch works fine, now I can switch user from the user menu when I choose "Switch user".

With this change applied packages will need to depend on the gdm development package, on Debian it's libgdm-dev

Since gnome-panel now depends on gdm, maybe also the "Lock screen" can use it, now the experience is that locking/unlocking the screen works, but the "Switch user" functionality from the unlocking interface still doesn't.

Thanks again,
   Antonio
Comment 5 Alberts Muktupāvels 2016-07-30 09:32:45 UTC
(In reply to Antonio Ospite from comment #4)
> (In reply to Alberts Muktupāvels from comment #3)
> > Created attachment 332323 [details] [review] [review] [review]
> > menu-items: fix user switching with gdm
> > 
> > This patch is for master, can you test it?
> 
> The patch works fine, now I can switch user from the user menu when I choose
> "Switch user".

Thanks for testing!

> With this change applied packages will need to depend on the gdm development
> package, on Debian it's libgdm-dev

I think this is not problem, is it?

> Since gnome-panel now depends on gdm, maybe also the "Lock screen" can use
> it, now the experience is that locking/unlocking the screen works, but the
> "Switch user" functionality from the unlocking interface still doesn't.

We still use gnome-screensaver for this. GNOME Panel does not control what gnome-screensaver shows and/or do... My plan is to merge gnome-screensaver into gnome-flashback for 3.22.
Comment 6 Antonio Ospite 2016-07-30 11:49:31 UTC
(In reply to Alberts Muktupāvels from comment #5)
> (In reply to Antonio Ospite from comment #4)
[..] 
> > With this change applied packages will need to depend on the gdm development
> > package, on Debian it's libgdm-dev
> 
> I think this is not problem, is it?
>

libgdm-dev is a build-dependency for the source package, which results in libgdm1 being a dependency for the gnome-panel binary package. I am not sure if a gnome-panel package will have to depend on gdm3 too.

For me this is not a problem since I use gdm anyway, I don't know what people using other login managers may think about the dependency between gnome-panel and gdm.

> > Since gnome-panel now depends on gdm, maybe also the "Lock screen" can use
> > it, now the experience is that locking/unlocking the screen works, but the
> > "Switch user" functionality from the unlocking interface still doesn't.
> 
> We still use gnome-screensaver for this. GNOME Panel does not control what
> gnome-screensaver shows and/or do... My plan is to merge gnome-screensaver
> into gnome-flashback for 3.22.

But if you decide to keep gdm as a hard dependency then it may even replace the role of gnome-screensaver for the "Lock screen" functionality and you will have less code to maintain. I mean stop using gnome-screensaver altogether.

Basically my question is: do you use gnome-screensaver only to lock the screen, or do you actually want to keep the historical "saving screen" functionality?

Anyways, any decision is fine with me I am just asking :)

Thanks,
   Antonio
Comment 7 Alberts Muktupāvels 2016-07-31 14:08:20 UTC
(In reply to Antonio Ospite from comment #6)
> libgdm-dev is a build-dependency for the source package, which results in
> libgdm1 being a dependency for the gnome-panel binary package. I am not sure
> if a gnome-panel package will have to depend on gdm3 too.

No. gdm3 depends on libgdm1 too... Depending on libgdm1 is enough. :)

> For me this is not a problem since I use gdm anyway, I don't know what
> people using other login managers may think about the dependency between
> gnome-panel and gdm.

I think that depending on libgdm1 should not be problem. Users still can choose between lightdm or gdm3.

> But if you decide to keep gdm as a hard dependency then it may even replace
> the role of gnome-screensaver for the "Lock screen" functionality and you
> will have less code to maintain. I mean stop using gnome-screensaver
> altogether.

I don't want to force users to use gdm.

> Basically my question is: do you use gnome-screensaver only to lock the
> screen, or do you actually want to keep the historical "saving screen"
> functionality?

I don't use it at all... I will try to restore screensaver functionality (at least I have added it to my todo list).