Bug 186198 - support GDM 2.21+'s control interface
Summary: support GDM 2.21+'s control interface
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Unmaintained
Component: general (show other bugs)
Version: unspecified
Platform: unspecified All
: NOR wishlist
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
: 166985 199201 214654 245198 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-03-05 11:12 UTC by Jan Hnatek
Modified: 2010-11-05 20:45 UTC (History)
8 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.6
Sentry Crash Report:


Attachments
Patch from Fedora project (2.70 KB, patch)
2010-10-10 23:02 UTC, Andrew Manson
Details
Backported the fix to the 4.5 branch (29.84 KB, patch)
2010-11-04 22:37 UTC, Andrew Manson
Details
Improved Backport Patch with less whitespace changes (9.13 KB, patch)
2010-11-04 22:55 UTC, Andrew Manson
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Hnatek 2009-03-05 11:12:19 UTC
Version:            (using KDE 4.1.4)
Compiler:          Sun Studio 12 
OS:                Solaris
Installed from:    Solaris Packages

Shutdown and restart functionality is not available in [Open]Solaris. Shutdown and restart dialogs only contain Logout option.

Workaround (to allow for session saving):
- logout from KDE session
- log in to a simple xterm session
- shutdown by
$ pfexec /usr/sbin/shutdown -y -g0 -i5
Comment 1 Pino Toscano 2009-03-05 11:21:38 UTC
Shutdown and restart are offered only if lanched from a supported login manager, ie KDM or GDM.
Comment 2 Jan Hnatek 2009-03-05 11:30:58 UTC
Please note that this is OpenSolaris-specific (maybe Solaris-specific, I cannot confirm that). KDE4 session was launched from GDM (thanks to KDEgdm-integration package).
Maybe this should be an RFE...
Comment 3 Jan Hnatek 2009-05-05 10:51:55 UTC
Workaround:
1. /etc/X11/gdm/custom.conf
[greeter]
SystemMenu=true

2. /etc/user_attr
gdm::::type=normal;auths=solaris.system.shutdown
Comment 4 Oswald Buddenhagen 2009-05-30 20:12:12 UTC
i assume you are using gdm 2.21+.
supporting that would imply adding support for gdm's new d-bus interface to libkworkspace.
Comment 5 Oswald Buddenhagen 2009-07-11 13:48:19 UTC
*** Bug 199201 has been marked as a duplicate of this bug. ***
Comment 6 Ladislav Nesnera 2009-07-11 15:35:44 UTC
Because duplicate Bug 199201 describes "slightly different problem" Its citation follows:
There is a problem to switch to new sessions if they have different type of
session (KDE, Gnome).
mail thread - http://osdir.com/ml/fedora-list/2009-06/msg03544.html
reported Gnome bug - http://bugzilla.gnome.org/show_bug.cgi?id=568540
Comment 7 Oswald Buddenhagen 2010-02-21 11:23:55 UTC
*** Bug 214654 has been marked as a duplicate of this bug. ***
Comment 8 Oswald Buddenhagen 2010-08-01 00:03:04 UTC
*** Bug 245198 has been marked as a duplicate of this bug. ***
Comment 9 Oswald Buddenhagen 2010-08-01 00:07:26 UTC
i don't know whether bug #245198 is strictly a duplicate, as it talks about consolekit, not directly gdm, and i haven't tracked the development closely enough to tell right now. doesn't matter too much, as only the consolekit interface is relevant nowadays.
see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581841 for reference.
Comment 10 Frode Hatlevik 2010-08-01 10:55:09 UTC
(In reply to comment #9)
> i don't know whether bug #245198 is strictly a duplicate, as it talks about
> consolekit, not directly gdm, and i haven't tracked the development closely
> enough to tell right now. doesn't matter too much, as only the consolekit
> interface is relevant nowadays.
> see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581841 for reference.

Bug #245198 is not a duplicate.

KDE 4 and gdm2 integrates nicely on my Debian Squeeze/Sid. gdm3 does not integrate with KDE 4.

Please, could you investigate bug #245198 further?

Regards
;)Frode
Comment 11 Oswald Buddenhagen 2010-08-01 15:58:29 UTC
*** Bug 245198 has been marked as a duplicate of this bug. ***
Comment 12 Andrew Manson 2010-10-05 23:54:05 UTC
My symptoms of this bug are exactly as described in another bug. I will describe here for clarity: 

-> If kscreensaver has locked the screen there is no option to switch user.

-> The "Switch user" option on the K menu only locks my display, and does not
start a new session with a gdm3 greeter.

-> There is no option to turn off or reboot from the K menu.

Apparently there is a patch attached to a Debian bug report http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581841 that I have not had the ability to test as of yet. 

Has this patch been tried yet? 


All of theese are functional when kdm manages displays for me.
Comment 13 Andrew Manson 2010-10-06 00:20:58 UTC
Sorry but that last line "All of theese are functional when kdm manages displays for me." was a copy and paste error and should not be in my last comment. 

I'm sorry for any confusion.
Comment 14 Andrew Manson 2010-10-10 23:02:12 UTC
Created attachment 52401 [details]
Patch from Fedora project

This patch successfully enables restart and shutdown when GDM is enabled. It does not, however, enable the correct behavior when a switch-user is requested. Can you please review this patch (which has come directly from the fedora project here: http://pkgs.fedoraproject.org/gitweb/?p=kdebase-workspace.git;a=blob_plain;f=kdebase-workspace-4.3.95-ck-shutdown.patch;hb=HEAD) and let me know if it is sufficient for the shutdown and restart features. I will continue to work on the switch user feature. 

Note that I tested this patch against kdebase-workspace-4.4.2 on ubuntu 10.04 LTS which was fully updated.
Comment 15 Wolfgang Lorenz 2010-10-15 09:59:28 UTC
Hi, we have a multi user system at home, where GNOME and KDE are installed as desktop environments. I chose to install GDM as login manager, since I am rarely using this computer and GNOME is the choice of all other users. It would be nice though, to be able to shut down the computer, or to use the "switch user" button...

I guess it all leads down to something in terms of this feature request: https://bugs.kde.org/show_bug.cgi?id=244765

It seems that this is just a case of incompatibility of interfaces. Login managers should all provide the same interface and as XDM and GDM are using ConsoleKit, maybe KDM should to the same.

I'm not too deep into this problem, but I think these two bug reports correlate well, from what I experienced. And this thing is bugging me for more than a year, now.

Greetings...

(OS: Ubuntu 10.10)
Comment 16 Oswald Buddenhagen 2010-10-17 22:08:51 UTC
SVN commit 1186881 by ossi:

add support for GDM 2.21+ shutdown and session switching

FEATURE: 186198
FIXED-IN: 4.6

 M  +184 -13   kdisplaymanager.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1186881
Comment 17 Kevin Kofler 2010-10-27 18:58:56 UTC
*** Bug 166985 has been marked as a duplicate of this bug. ***
Comment 18 Andrew Manson 2010-11-04 22:37:11 UTC
Created attachment 53143 [details]
Backported the fix to the 4.5 branch
Comment 19 Andrew Manson 2010-11-04 22:37:32 UTC
Thanks for the fix to this bug, I have been looking forward to it. 

I tried applying the patch to the 4.5 branch of KDE but because of the large amount of whitespace changes it was unsuccessful. I have attached a patch file that is a difference between the fixed version in trunk and the version in the 4.5 branch that applies correctly. This has been tested in version KDE 4.5, Ubuntu 10.04 and it is working perfectly. 

Please consider this patch for the 4.5 branch.
Comment 20 Andrew Manson 2010-11-04 22:55:17 UTC
Created attachment 53145 [details]
Improved Backport Patch with less whitespace changes
Comment 21 Andrew Manson 2010-11-04 22:56:16 UTC
I've just re-added the patch but generated it with the --ignore-space flag this time
Comment 22 Andrew Manson 2010-11-04 23:28:21 UTC
(In reply to comment #19)
> I tried applying the patch to the 4.5 branch of KDE but because of the large
> amount of whitespace changes it was unsuccessful. 

I'm sorry but I have confused myself. I was actually applying this patch to the 4.4 branch (4.4.2). Everything in my previous messages is correct but just replace any reference to 4.5 with 4.4.2.
Comment 23 Jan Hnatek 2010-11-05 20:45:27 UTC
Shutdown & restart now work on Solaris with KDE build 4.5.74 (4.5.* I suppose).

Thanks!