Summary: | Having one konsole window open at logout opens two at next login | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Wolfgang Bauer <wbauer1> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | alexandre.sidorenko, fr.frasc, jpsinthemix, lordcrc, simonandric5 |
Priority: | NOR | ||
Version: | master | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | http://commits.kde.org/konsole/17cf652a9cd2f2c2c35b20c42cfcbfad8b83cb43 | Version Fixed In: | |
Sentry Crash Report: | |||
Attachments: | session file |
Description
Wolfgang Bauer
2016-08-17 18:41:53 UTC
Additional info: Even if I have two tabs open, the superfluous window only has one tab (which is a "clone" of one of the tabs in the original window). Created attachment 100649 [details]
session file
This is reproducible by putting the attached file to ~/.config/session and running:
konsole --session 10c26d6967000147146005100000224800009_1471460063_520208
I don't see anything wrong in that session file.
So it's probably some bug in the session restoration code, I suppose.
I started seeing the same problem on three PCs I have upgraded yesterday from KDE-applications 16.04.3 to 16.08.0 (using Neon repositories on Ubuntu). Everything worked fine on 16.04.3 If I create a new user with an empty directory and login (this recreates all KDE settings), everything works fine - after logout/login only one konsole window is restored. Another interesting thing: if I specify a bogus session, e.g. $ konsole --session aaa Attempted to re-run an already running session. it always opens two konsole windows! Alex I said in my post: "If I create a new user with an empty directory and login (this recreates all KDE settings), everything works fine - after logout/login only one konsole window is restored." I tried this (logout/loging several times) yesterday and everything worked fine - but I have just tried to login as that 'new' user again, and this time two konsole windows are restored! Alex (In reply to asid from comment #3) > Another interesting thing: if I specify a bogus session, e.g. > > $ konsole --session aaa > Attempted to re-run an already running session. > > it always opens two konsole windows! Indeed, I can confirm that. So even easier to reproduce... ;-) The problem does occur on a fresh user account (with a completely empty home directory) too. The message about "Attempted to re-run an already running session." seems to be unrelated though, this is also displayed when I run the KDE4 version with "--session xxx" (which only opens one window as it should). This bug is due to'konsoleApp.newInstance() being called always, even when session Restoration is in effect. As a workaround, I've patched as follows: --- konsole-16.08.0.old/src/main.cpp 2016-08-09 19:01:34.000000000 -0400 +++ konsole-16.08.0.new/src/main.cpp 2016-08-25 20:58:20.973978896 -0400 @@ -158,15 +158,13 @@ extern "C" int Q_DECL_EXPORT kdemain(int // of Konsole is started. QObject::connect(&dbusService, &KDBusService::activateRequested, &konsoleApp, &Application::slotActivateRequested); - if (!konsoleApp.newInstance()) { + if (app->isSessionRestored()) + restoreSession(konsoleApp); + else if (!konsoleApp.newInstance()) { // An argument that printed something and mean we should just quit was passed. delete app; return 0; } - - if (app->isSessionRestored()) - restoreSession(konsoleApp); - // Since we've allocated the QApplication on the heap for the KDBusService workaround, // we need to delete it manually before returning from main(). int ret = app->exec(); Git commit 5b11fd593b954504343bdb418c54a8e7913d9c7c by Kurt Hindenburg. Committed on 28/08/2016 at 13:08. Pushed by hindenburg into branch 'master'. Prevent 2 windows from opening upon session restore Session management would start 2 konsole windows upon login. Thanks John Stanley (jpsinthemix gmail com) for patch M +3 -4 src/main.cpp http://commits.kde.org/konsole/5b11fd593b954504343bdb418c54a8e7913d9c7c *** Bug 367957 has been marked as a duplicate of this bug. *** Git commit 17cf652a9cd2f2c2c35b20c42cfcbfad8b83cb43 by Kurt Hindenburg. Committed on 31/08/2016 at 12:36. Pushed by hindenburg into branch 'Applications/16.08'. Prevent 2 windows from opening upon session restore Session management would start 2 konsole windows upon login. Thanks John Stanley (jpsinthemix gmail com) for patch (cherry picked from commit 5b11fd593b954504343bdb418c54a8e7913d9c7c) M +3 -4 src/main.cpp http://commits.kde.org/konsole/17cf652a9cd2f2c2c35b20c42cfcbfad8b83cb43 *** Bug 367737 has been marked as a duplicate of this bug. *** |