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 598255 - Can't disable user switching
Can't disable user switching
Status: RESOLVED FIXED
Product: gnome-session
Classification: Core
Component: general
2.26.x
Other Linux
: Normal normal
: ---
Assigned To: Session Maintainers
Session Maintainers
Depends on:
Blocks:
 
 
Reported: 2009-10-13 11:02 UTC by Shahar Or
Modified: 2011-03-22 18:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for gnome 2.2x (1.35 KB, patch)
2011-03-07 14:57 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review
patch for gnome 3.x (4.17 KB, patch)
2011-03-07 16:01 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review
patch for gnome 3.x (4.26 KB, patch)
2011-03-07 16:11 UTC, Ritesh Khadgaray ( irc:ritz)
none Details | Review

Description Shahar Or 2009-10-13 11:02:16 UTC
Dear friends,

In order to disable user switching in Ubuntu 9.04, I do this:

sudo gconftool-2 --shutdown
sudo gconftool-2 --direct --config-source \
xml:readwrite:/etc/gconf/gconf.xml.mandatory --type boolean \
--set /desktop/gnome/lockdown/disable_user_switching true

Then I log out and back in.

What happens is that the user switching applet isn't in the panel and I can't seem to add it to the panel. This isn't so good, IMO, because now there's no apparent way to log out as well. But this isn't the bug I'm reporting.

In looking for a way to allow myself to log out, I've added the "Log Out Button" applet. Pressing this provides a button to also switch users. Which works.

I think that it should be expected that switching users would not be allowed via any means when /desktop/gnome/lockdown/disable_user_switching is true.

Blessings.
Comment 1 Shahar Or 2009-10-13 13:25:08 UTC
The other bug is reported as bug #598270.
Comment 2 Shahar Or 2009-10-30 11:44:47 UTC
Dear developers,

I'm willing to pay 20$ for a fix. A fix which will be accepted into the project, of course.
Comment 3 philip.webb.99 2009-11-13 07:57:37 UTC
I was using this feature fine in 9.04, from the "system, Administration, lockdown editor" program.

In 9.10 it seems broken and the User switcher menu is displayed after it has been disabled.
Comment 4 Shahar Or 2009-11-29 14:48:06 UTC
There's a bounty on this bug at:
http://www.fossfactory.org/project/p186
Comment 5 Ritesh Khadgaray ( irc:ritz) 2011-03-04 07:30:18 UTC
This should be most likely be filled against ConsoleKit ( fd.o )


from ConsoleKit/src/ck-seat.c

 663 gboolean
 664 ck_seat_can_activate_sessions (CkSeat   *seat,
 665                                gboolean *can_activate,
 666                                GError  **error)
 667 {
 668         g_return_val_if_fail (CK_IS_SEAT (seat), FALSE);
<-- add check here, something akin to action "org.freedesktop.consolekit.seat.CanChangeSeat"

 669 
 670         if (can_activate != NULL) {
 671                 *can_activate = (seat->priv->kind == CK_SEAT_KIND_STATIC);
 672         }
 673 
 674         return TRUE;
 675 }

probably should be marked as NOTGNOME  ?
Comment 6 Ray Strode [halfline] 2011-03-04 16:35:00 UTC
Well ConsoleKit isn't going to be able to check /desktop/gnome/lockdown/disable_user_switching
Comment 7 Ritesh Khadgaray ( irc:ritz) 2011-03-07 14:57:34 UTC
Created attachment 182711 [details] [review]
patch for gnome 2.2x

for gnome 2.26, opensuse has a patch ( gnome-session-honor-lockdown.patch ). Attached here 

for gnome-3.x, we have moved on to gsettings
https://bugzilla.gnome.org/show_bug.cgi?id=643287
Comment 8 Ritesh Khadgaray ( irc:ritz) 2011-03-07 16:01:39 UTC
Created attachment 182718 [details] [review]
patch for gnome 3.x

for lockdown based on gsettings-desktop-schemas .
Comment 9 Ritesh Khadgaray ( irc:ritz) 2011-03-07 16:11:33 UTC
Created attachment 182719 [details] [review]
patch for gnome 3.x

updated to fix typo.
Comment 10 Vincent Untz 2011-03-22 18:12:59 UTC
I've fixed this another way, since a critical part is actually in gsm-manager.c. But thanks for the patch!