<div style="font-size: 12pt;">Hello!</div>
<div style="font-size: 12pt;"> </div>
<div style="font-size: 12pt;">I just played around with the xdotool and came to the idea,</div>
<div style="font-size: 12pt;">to run it in a mate-terminal for the same published application,</div>
<div style="font-size: 12pt;">which I am usually using.</div>
<div style="font-size: 12pt;">Astounding result.</div>
<div style="font-size: 12pt;"> </div>
<div style="font-size: 12pt;">>xdotool getactivewindow windowsize<br>Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to query the active window aborted.<br><br>xdotool get_desktop<br>Your windowmanager claims not to support _NET_CURRENT_DESKTOP, so the query for the current desktop was aborted.<br><br>xdotool getactivewindow get_desktop_for_window<br>Your windowmanager claims not to support _NET_ACTIVE_WINDOW, so the attempt to query the active window aborted.<br>xdo_get_active_window reported an error</div>
<div style="font-size: 12pt;"> </div>
<div style="font-size: 12pt;">From what I understand (?!) from your explantion, this must be</div>
<div style="font-size: 12pt;">an answer from the virtualized window-manger which runs in</div>
<div style="font-size: 12pt;">the usersession on the server??</div>
<div style="font-size: 12pt;">This happens for my main-setup (client/server) as long as</div>
<div style="font-size: 12pt;">a new container, I've setup for testing).<br><br>In opposite to the x2go session, trying the same (against the</div>
<div style="font-size: 12pt;">same host, using the same user and the same client machine,</div>
<div style="font-size: 12pt;">which behaves equal to my main setup):</div>
<div style="font-size: 12pt;"><br>ssh -X tu1@deskeval mate-terminal<br>tu1@deskeval:~$ xdotool get_desktop<br>56</div>
<div style="font-size: 12pt;"> </div>
<div style="font-size: 12pt;">It shows my current workspace-number.</div>
<div style="font-size: 12pt;">I just setup an lxc-container with debian/bullseye and</div>
<div style="font-size: 12pt;">in opposite to my usual use of XFCE4, I installed mate.</div>
<div style="font-size: 12pt;">It gave the same result like the mate-terminal from</div>
<div style="font-size: 12pt;">the xfce4-session (both were published applications).</div>
<div style="font-size: 12pt;">If I logon to the desktop, it works as expected!</div>
<div style="font-size: 12pt;">Suspending/resuming sessions give the same result</div>
<div style="font-size: 12pt;">between the mate- and the xfce4-desktop: Windows</div>
<div style="font-size: 12pt;">from other workspaces do not appear (but firefox</div>
<div style="font-size: 12pt;">knows them and its taskmanager can bring them</div>
<div style="font-size: 12pt;">up - the appear on the originally used workspace).</div>
<div style="font-size: 12pt;"> </div>
<div style="font-size: 12pt;">May be, this is just another hint.</div>
<div style="font-size: 12pt;"> </div>
<div style="font-size: 12pt;">Regards,</div>
<div style="font-size: 12pt;">Manfred</div>
<div style="font-size: 12pt;"><br><br><br><strong>----- Original Message -----</strong><br> <strong>From:</strong> Ulrich Sibiller [<a href="mailto:uli42@gmx.de" target='_blank'>mailto:uli42@gmx.de]</a><br> <strong>To:</strong> <webman@manfbraun.de><br> <strong>Cc:</strong> x2go-user@lists.x2go.org<br> <strong>Sent:</strong> Mon, 20 Mar 2023 00:27:51 +0100<br> <strong>Subject:</strong> Re: [X2Go-User] Resume/restoration of windows to linux workspaces<br><br> <span style="font-family: courier new, courier, arial, helvetica, sans-serif;">Well,<br><br>thinking about this...<br><br>Typically a window manager will store the workspace to use in the<br>_NET_WM_DESKTOP property of a window. You can check that with xprop |<br>grep _NET_WM_DESKTOP (selected the window you are interested in with<br>the mouse). Alternatively you can run xprop -id <windowid> | grep<br>_NET_WM_DESKTOP.<br><br>Whenever a published application opens a window it will open this<br>window on the x2goagent/nxagent on the server AND open a clone window<br>on you local X server. Internally the agent has a mapping between the<br>window ids of each window pair. On suspend the windows on the local X<br>server are closed, the ones on the agent stay. On resume/reconnect the<br>agent winn again open (new!) clone windows on the local X server and<br>update their window ids in its list.<br><br>When the local window manager sets the _NET_WM_DESKTOP property the<br>agent will register this and _should_ update the _NET_WM_DESKTOP<br>property on the agent side window, too.<br><br>If a client changes a window property the agent will forward this<br>change to the twin window on the local X server EXCEPT for properties<br>starting with for WM_, _NET_ and for the<br>_KDE_NET_WM_SYSTEM_TRAY_WINDOW_FOR property. So if firefox is trying<br>to handle these properties itself this might explain why the workspace<br>is not honored (just speculating, have not tested further).<br><br>But I am wondering: If, e.g., a window was placed on, say, workspace 4<br>and then suspended and the resume happens on a setup that only has one<br>or two workspaces what would happen?<br><br>Also there might be further problems arising from restored windows<br>having an other window id than previously. If the window manager<br>chooses to store some workspace information depending on the window id<br>(I don't know if any WM is doing this) this will not work with the<br>restored windows.<br><br>I am also wondering if setting the desired workspace by the client (in<br>this case the agent is a client to the local X server) is honored by<br>the WM at all.<br><br>So can you please to some tests with the xprop command described above<br>(run it from a local terminal, NOT from a published application) and<br>check the properties of those windows before and after the reconnect?<br>Does the _NET_WM_DESKTOP property get lost?<br><br>Please also post the output of xprop -root | grep -e ^_NET -e ^WM -<br>this will show the window manager related configuration.<br><br>Uli<br><br><br>On Sun, Mar 19, 2023 at 11:02 PM <<a href="#">webman@manfbraun.de</a>> wrote:<br>><br>> Hello Uli!<br>><br>> Thanks for your reply.<br>><br>> Published applications are not necessarily one-window, strictly<br>> spoken, a terminal with two tabs has (at least) two windows. As<br>> long as they are inside the terminals main-window, everything works<br>> (sad to say: most of the time).<br>> If there are two separate windows, which are in the current<br>> workspace, this works too.<br>> Below of that, it gets complicated.<br>> If two windows are in separate workspaces, it works sometimes.<br>> I am not sure, why at all - from your guess.<br>> If you have two terms at WS1 and WS3 and you resume on WS5,<br>> NO window appear at all, though the processes are running<br>> well on the server side!<br>> For firefox, this is more different.<br>> From several windows, which were originally located in different<br>> workspaces, only one window will be restored, this of the current<br>> workspace. If all were located in the same workspace, they are<br>> restored to the current workspace, if you are in that workspace,<br>> which was current at 'suspend' time - otherwise: NO window<br>> appear at all!<br>> But for the first case, it gets interesting.<br>> Go to 'more tools/taskmanager' (of the fox!), you'll see all<br>> windows as processes. Double-clicking on of them brings it<br>> back to the workspace were it was originally located!<br>> Works for all of them.<br>> Back to the first cases above.<br>> If a session is restored by the x2go-client (I do not know<br>> about this, due to lack of documentation), it knows all<br>> windows and restores them - so ether the session on the server<br>> or the client must give the window-manager advice.<br>> I am starting my caja browsers at logon this way and they will<br>> be even tagged to be visible on all workspaces.<br>> So suspending a session must save the workspace accordingly.<br>> I asked me, on which side, the workspace will be read at all,<br>> server oder client? Just to be sure to have the same number<br>> of WSs, I made them equal (for the testuser), but this does<br>> not change anything (may be, a restart is necessary?).<br>><br>> From toolchains perspective, X(&co.) were never made for<br>> suspending window sessions (at least, so far I know) and<br>> the window manager is only a filter for the workspace numbers.<br>> What remains is, that only x2go can handle this at all.<br>><br>> This was - a little - exploration, which shed me light on<br>> the sessions, which do not work after return from hibernate<br>> my box in the morning.<br>><br>> Regards,<br>> Manfred<br>><br>><br>> ----- Original Message -----<br>> From: Ulrich Sibiller [mailto:<a href="#">uli42@gmx.de</a>]<br>> To: <<a href="#">webman@manfbraun.de</a>><br>> Cc: <a href="#">x2go-user@lists.x2go.org</a><br>> Sent: Fri, 17 Mar 2023 08:29:50 +0100<br>> Subject: Re: [X2Go-User] Resume/restoration of windows to linux workspaces<br>><br>> Hello Manfred,<br>><br>> in published applications mode the local window manager should be responsible for arranging the application windows. The application itself does not know about the workspaces at all. So probably the window manager does not recognize the restored windows as previously known windows. I have no idea at the moment how to even check if this theory applies here. You could try to run another desktop environment locally and check if the behaviour changes.<br>><br>> Uli<br>><br>> <<a href="#">webman@manfbraun.de</a>> schrieb am Fr., 17. März 2023, 03:19:<br>>><br>>> Hello!<br>>><br>>> I am using published applications to run firefox.<br>>> I am on debian bullseye (client and server).<br>>> There is a big behavioral difference from using fox between<br>>> this and using fox local in regard of crash and restore.<br>>> If the fox restores a crashed window set locally, all windows<br>>> appear on the workspace, they were originally running on.<br>>> Not so with x2go - they all appear in the workspace, were<br>>> the restauration starts.<br>>> I usually have >50 windows and this is a big pain.<br>>> Is this the normal behavior?<br>>> If not, where to look for the problem?<br>>> Note, this does not depend on a users profile.<br>>> I created an additional user on the server and it behaves the same.<br>>><br>>> Thanks,<br>>> Manfred<br>>><br>>> _______________________________________________<br>>> x2go-user mailing list<br>>> <a href="#">x2go-user@lists.x2go.org</a><br>>> <a href="https://lists.x2go.org/listinfo/x2go-user" target='_blank'>https://lists.x2go.org/listinfo/x2go-user</a></span></div>