Bug 365449 - Session restore doesn't properly set KONSOLE_DBUS_SESSION or KONSOLE_DBUS_WINDOW
Summary: Session restore doesn't properly set KONSOLE_DBUS_SESSION or KONSOLE_DBUS_WINDOW
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 16.04.2
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-12 00:40 UTC by Matthew Cline
Modified: 2020-12-25 23:37 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Cline 2016-07-12 00:40:26 UTC
Under Plasma, when I log out then log back in again, two konsole windows are restored.  However, both of them have the environmental variable KONSOLE_DBUS_SESSION set to "/Sessions/1", and neither have the environmental variable KONSOLE_DBUS_WINDOW set.  If I then open up a third konsole via the desktop's right-click, it also has KONSOLE_DBUS_SESSION set to "/Sessions/1", but it has KONSOLE_DBUS_WINDOW set to "/Windows/1".  Opening up a fourth konsole then has KONSOLE_DBUS_SESSION set to "/Sessions/2" and KONSOLE_DBUS_WINDOW set to "/Windows/2".


Reproducible: Always
Comment 1 Frederic Roussel 2016-08-22 02:47:13 UTC
I can report a similar behavior.

The konsole windows that were opened before log out/shutdown are not restored to their original location: position and desktop. As the konsole window remembers its working directory, there will be no way to have a deterministic set of windows, in term of position and working directory.

That feature has been broken since the beginning of plasma5.

Workaround: use xterm and plenty of ugly hacks in .bashrc
Comment 2 Matthew Cline 2016-08-23 01:20:51 UTC
> The konsole windows that were opened before log out/shutdown are not restored to their original location: position and desktop.

That might be a different bug, since the positions of my two konsole windows gets restored correctly.
Comment 3 Frederic Roussel 2016-08-23 20:49:04 UTC
Yeah, seems different enough, but with some common symptoms.

I created https://bugs.kde.org/show_bug.cgi?id=367737
Comment 4 Matthew Cline 2016-08-28 09:06:13 UTC
I tried closing down my two konsole windows which had the wrong KONSOLE_DBUS_SESSION, opening up two new ones, then logging out and back in again.  On login the restored konsole windows had the proper KONSOLE_DBUS_SESSION set (/Sessions/1 and /Sessions/2) but neither had KONSOLE_DBUS_WINDOW set, and both had the same KONSOLE_DBUS_SERVICE.  Starting a third konsole window it had KONSOLE_DBUS_WINDOW set to /Windows/1 and KONSOLE_DBUS_SESSION set to /Sessions/1.  Additionally, the restored konsole windows had KONSOLE_PROFILE_NAME set to Default, but the third new (non-restored) window had KONSOLE_PROFILE_NAME set to the empty string.
Comment 5 Julian Steinmann 2018-10-30 19:21:52 UTC
Is this still a problem with the newest version of Konsole? Are there any practical consequences because of this bug?
Comment 6 Matthew Cline 2018-10-30 19:59:58 UTC
This issues still exists.  As for practical issues, I'm using the environmental variable $SHELL_SESSION_ID to tell the shells apart across logouts/reboots, so I don't really need to use $KONSOLE_DBUS_SESSION
Comment 7 Bug Janitor Service 2018-11-14 11:33:06 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 8 Matthew Cline 2018-11-14 11:52:40 UTC
Marking "reported" as per instructions from Bug Janitor Service.
Comment 9 Justin Zobel 2020-11-21 05:10:14 UTC
Hey Matthew, thanks for the bug report.

I know it's been a while, but are you able to please test and confirm if this issue is still occurring or if this bug report can be marked as resolved. I've set the bug status to "needsinfo" pending your response, please change back to "reported" or "resolved" when you respond, thanks.
Comment 10 Frederic Roussel 2020-11-22 22:10:21 UTC
The konsole windows are restored with a geometry similar to before shutdown/logout.

The working path is however not restored, so there is no way to know if the windows are not shuffled around or not.

I guess we'll just have to assume it's a regression.
Comment 11 Justin Zobel 2020-11-22 22:45:44 UTC
Confirmed still an issue in Comment 10
Comment 12 Frederic Roussel 2020-11-22 22:50:14 UTC
For Info:
I'm using Gentoo
kde-apps/konsole-20.08.3
Comment 13 Matthew Cline 2020-12-24 19:43:03 UTC
I can tell that the windows aren't being swapped around, since I use SHELL_SESSION_ID to restore the current working directory (and the pushd stack) to what it was previously, and they never get swapped.
Comment 14 Frederic Roussel 2020-12-25 23:37:26 UTC
Ok, then. I seems that one can be closed.
Thank you!!!