Because I keep losing the bug where this patch was discussed upstream I'll paste it here:
https://bugs.freedesktop.org/show_bug.cgi?id=11786 I was wrong about this being a race condition, it in fact doesn't trigger if you try immediately after logging in, which I do when I aim to reproduce it, but not when I want to just switch VTs. Very irritating. The patch allows you to set a "parking place", which is a vt to switch to when there are no active sessions, the intention being that it returns to gdm when you leave your session, even after fast user switching. It decides to do this by seeing "active_session == NULL", which is true when you leave the session, but also when you VT switch to a VT without an associated consolekit session. However, it doesn't do this at all times, hence being able to switch immediately after logging in. It has an enable flag, which it sets when a session ends, and then clears after checking if it was the last active session. That should work fine, except that bug 287715 steps in. If you wait a few minutes after you log in, then cron will run, open a consolekit session, and then finish, closing that session. That sets the enable flag, but doesn't reach the point when it will be disabled again. Then when you VT switch it falsely thinks that you ended your session. This explanation also tallies with Chris' observation about the VT that you are returned to if you do this while fast user switching. There are several possible ways that we could fix this, including fixing bug 287715 I imagine. Attached is a simple fix that should take care of this issue in a much simpler fashion. Please test the attached fix. TEST CASE: start from a standard ubuntu-desktop system 1. log in via GDM. 2. run "sudo su - <username>" 3. type exit to close that session 4. attempt to VT switch to VT 1, note that it returns you to X 5. try to VT switch to VT 1 again, note that it works (with high probability) repeating steps 2 and 3 will make step 4 not work again. 6. install the fixed consolekit package 7. reboot (to get the new consolekit started. (You can alternatively kill the console-kit-daemon process, and then restart GDM) 8. repeat steps 1 to 3 9. attempt to VT switch to VT 1, note that it works first time unlike before 10. try it a few times, and it should consistently work. 11. try fast user switching to a second user and then VT switching while in that users session 12. keep the second user's session open, but switch back to your primary session and try VT switching 13. close all sessions to return to GDM, try VT switching there Thanks, James ** Bug watch added: freedesktop.org Bugzilla #11786 https://bugs.freedesktop.org/show_bug.cgi?id=11786 ** Attachment added: "consolekit.diff" http://launchpadlibrarian.net/25826779/consolekit.diff ** Changed in: consolekit (Ubuntu Jaunty) Status: Confirmed => In Progress -- VT-switching from X returns you to X the first time https://bugs.launchpad.net/bugs/271962 You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
