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