https://bugs.kde.org/show_bug.cgi?id=436318

--- Comment #195 from imagina...@mailbox.org ---
(In reply to Patrick O'Callaghan from comment #181)
> I currently have a set of apps in Autostart, but it's still annoying to have
> to manually move windows onto the right desktops after logging in. As a
> partial workaround, I wrote a couple of scripts using kdotool (see your
> local KDE repo). They can occasionally give strange error messages, and
> don't do anything for window positions within a desktop because that doesn't
> seem to be possible, but I thought I'd post them here in case anyone finds
> them useful. Note that I invoke them manually. There may be a way to
> automate this, but I haven't found it. (Simple login/logout scripts are not
> the answer).:

Have you ever put the script that restores the windows into "Autostart" as
well?  I don't know whether one has any influence on the sequence in which the
programs are started but _if_ they are started in alphabetical order you could
name it something like z_script.

More on topic: the funny and real mean thing with session-save/-restore in
Plasma-wayland (-5.27.11.1) is that _restoring_ a previous session does work
fine (perhaps apart from minor differences in window-positions).  I can tell
because when I log out of a Plasma-X11 session and then log in to a
Plasma-wayland session, the previous (Plasma-X11) session is restored almost
perfectly, incl. kate, dolphin, whatever.  And that's reproducible.  However,
if one then logs out of the Plasma-wayland session and in to a Plasma-X11
session (or Plasma-wayland session), the previous session is gone, except for
non-KDE-apps like Firefox or Thunderbird.

So, from what I see here with Plasma-wayland, the real problem is not
_restoring_ a session but _saving_ it correctly.  And what makes matters worse
(somehow) is that the state of non-KDE-apps like Firefox/Thunderbird _is_ saved
correctly in ksmserverrc [1].  What's not saved is the state of KDE-apps.  But
perhaps you know all this already. ;)

--

[1]
[LegacySession: saved at previous logout]
count=0

[LegacySession: saved by user]
count=0

[Session: saved at previous logout]
clientId1=104c55580000173762586300000023360009
clientId2=104c55580000173870527300000023170111
clientId3=104c55580000173902919800000078330002
count=3
program1=thunderbird
program2=firefox
program3=pulseaudio
restartCommand1=/opt/thunderbird/thunderbird,--sm-client-id,104c55580000173762586300000023360009
restartCommand2=/opt/firefox/firefox,--sm-client-id,104c55580000173870527300000023170111
restartCommand3=
[...]

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to