Version: (using KDE KDE 3.4.0)
Installed from: Unlisted Binary Package
I'm connecting from my main box (A) to another one (B) and start a KDE session there using XDMCP. I have set the kdm on (B) to require the root password before allowing shutdown from a remote machine.
When I log out of KDE on (B) I am presented with the proper shutdown and restart options in addition to the "end session" option. So far so good.
But when I select shutdown or restart I'm disconnected immediately. No shutdown or restart takes place.
As soon as I reconnect to (B) I see the password dialog. After providing it with the root password (B) shuts down as desired.
But being disconnected *before* being asked for the password looks like a bug to me... or does the bug lie in the fact that I'm shown the shutdown options in KDE's logout dialog at all (in the remote case)?
heh, indeed, very interesting effect ... the "remote login" mode runs the new X server with the -once option. consequently the display will not "return" to the client to ask for the root password. it might turn out to be pretty hard to fix it.
whether we want this type of remote shutdown at all is discussed in another bug.
Would it be possible to hide the shutdown and restart options from the KDE session logout dialog in the case of remote login with required password? This would remove the surprising behaviour.
In order to shutdown box (B) one could still reconnect and choose shutdown from the kdm login screen.
OTOH a user might ask: "What does the fact that I require a password have to do with the question of whether the shutdown option is displayed or not?"
> Would it be possible [...]
nope. the remote kdm cannot know how the connecting X server was started - and for X servers started manually without -once things work as expected.
the solution lies in not disconnecting from the server totally, so it does not exit. this means moving the initial connection from the display subdaemon to the master daemon. this might happen as a side effect of making kdm work with ill-behaved pam modules.
SVN commit 735053 by ossi:
when the user session requested a shutdown that needs confirmation or a
password, don't put the dialog at the start of the next kdm session (and
thus reset/disconnect the x server in between), but do it in the current
kdm session after the user session exits.
M +46 -28 backend/dm.c
M +1 -0 backend/dm.h
M +1 -0 backend/greet.h
M +12 -13 backend/session.c
M +4 -2 kfrontend/kgapp.cpp
WebSVN link: http://websvn.kde.org/?view=rev&revision=735053