Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing GTop when installed from flatpak under EndlessOS #79

Open
btreut opened this issue Apr 11, 2023 · 30 comments
Open

Missing GTop when installed from flatpak under EndlessOS #79

btreut opened this issue Apr 11, 2023 · 30 comments
Labels
bug Something isn't working compatibility

Comments

@btreut
Copy link

btreut commented Apr 11, 2023

I installed the "Another Window Session Manager" as an extension in the Gnome Extension Manager under EndlessOS. Gnome Extension Manager was installed from flatpak on flathub. "Another Window Session Manager" is complaining that it is missing GTop/Typelibs:
Requiring GTop, version none: Typelib file for namespace 'GTop' (any version) not found

See also my post on the EndlessOS community platform.

Any ideas, how to install the missing pieces?

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 12, 2023

Hi,

To fix this problem, you will have to install gtop, please visit:
https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager#dependencies

Since Endless OS is a Debian derivative distribution, you can install the gtop via:
apt install gir1.2-gtop-2.0 libgtop2-dev

@btreut
Copy link
Author

btreut commented Apr 12, 2023

Since Endless OS is a Debian derivative distribution, you can install the gtop via:
apt install gir1.2-gtop-2.0 libgtop2-dev

sorry, no way to install anything via apt under EndlessOS, see this post and the infos referenced in it.

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 13, 2023

Since Endless OS is a Debian derivative distribution, you can install the gtop via:
apt install gir1.2-gtop-2.0 libgtop2-dev

sorry, no way to install anything via apt under EndlessOS, see this post and the infos referenced in it.

I see. Maybe I should try...catch... the imports of gtop and ignore the errors if it's not installed, so it won't cause the extension unable to load. I'll do it later and let you know when it's done.

Currently, gtop only is only needed (to get the state of a running process to await this process to exit completely) when you are running Microsoft Edge browser.

@btreut
Copy link
Author

btreut commented Apr 13, 2023

Great, I'll be patient.

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 13, 2023

Great, I'll be patient.

I've pushed a fix to the main branch for this issue. You can copy the files to ~/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com and restart gnome shell to take effect.

A new version will be pushed to the E.G.O later.

@btreut
Copy link
Author

btreut commented Apr 13, 2023

You can copy the files to ~/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com and restart gnome shell to take effect.

thanks, but I don't know how I can copy files nor which files from the main branch ...

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 13, 2023

You can copy the files to ~/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com and restart gnome shell to take effect.

thanks, but I don't know how I can copy files nor which files from the main branch ...

Just run the below command:

cd /tmp
# Or download the source code
git clone https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager.git
cp -rp gnome-shell-extension-another-window-session-manager/* ~/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/

Then restart gnome shell using alt+f2 type r on X11 or logout and login on Wayland.

@btreut
Copy link
Author

btreut commented Apr 13, 2023

thanks, I"ll try it.

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 13, 2023

@btreut The new version has been approved, you should see the update in https://extensions.gnome.org/local/ now.

@btreut
Copy link
Author

btreut commented Apr 13, 2023

@btreut The new version has been approved, you should see the update in https://extensions.gnome.org/local/ now.

hmm, yes, now the extension starts, but when configuring for save session at exit, I am unable to logout; only a small black patch pops up on the desktop:
Screenshot from 2023-04-13 16-55-27
@nlpsuge should I reopen this issue or open a new one? I guess it might be a problem with the rights, but I don't know what is missing and what application needs the rights. Saving and restoring from the menu (grafik) works, but neither from the from the Logout nor Shutdown/Restart (via AWSM) dialog.

I can move around these grafik patches, but I do not know how to close them. Each attempt to Logout/Restart/Shutdown creates another one.
PS: this happens under Wayland & X11, I suspect it is an attempt to display some message box and I find in journalctl the following:

$ journalctl -f
Apr 14 09:46:43 acer-spin-bernhard dbus-daemon[1975]: [session uid=1001 pid=1975] Successfully activated service 'org.gnome.Terminal'
Apr 14 09:46:43 acer-spin-bernhard systemd[659]: Started GNOME Terminal Server.
Apr 14 09:46:44 acer-spin-bernhard systemd[659]: Started VTE child process 4087 launched by gnome-terminal-server process 4053.
Apr 14 09:46:44 acer-spin-bernhard gnome-shell[2432]: [INFO ][Another window session manager] Session 0x2a0000a.json saved to /sysroot/home/bernhard/.config/another-window-session-manager/currentSession/Gnome-terminal/0x2a0000a.json!
Apr 14 09:46:44 acer-spin-bernhard gnome-shell[2432]: [INFO ][Another window session manager] Session summary.json saved to /sysroot/home/bernhard/.config/another-window-session-manager/currentSession/summary.json!
Apr 14 09:46:44 acer-spin-bernhard gnome-shell[2432]: [INFO ][Another window session manager] Session 0x2a0000a.json saved to /sysroot/home/bernhard/.config/another-window-session-manager/currentSession/Gnome-terminal/0x2a0000a.json!
Apr 14 09:46:47 acer-spin-bernhard gnome-shell[2432]: Can't update stage views actor [:0x55f8c4ac6340] is on because it needs an allocation.
Apr 14 09:46:47 acer-spin-bernhard gnome-shell[2432]: Can't update stage views actor [:0x55f8c7ad0350] is on because it needs an allocation.
Apr 14 09:46:47 acer-spin-bernhard gnome-shell[2432]: Can't update stage views actor [:0x55f8c642b4c0] is on because it needs an allocation.
Apr 14 09:46:48 acer-spin-bernhard gnome-shell[2432]: [INFO ][Another window session manager] Session 0x2a0000a.json saved to /sysroot/home/bernhard/.config/another-window-session-manager/currentSession/Gnome-terminal/0x2a0000a.json!
Apr 14 09:47:37 acer-spin-bernhard gnome-shell[2432]: [INFO ][Another window session manager] Session summary.json saved to /sysroot/home/bernhard/.config/another-window-session-manager/currentSession/summary.json!
Apr 14 09:48:47 acer-spin-bernhard gnome-shell[2432]: [INFO ][Another window session manager] Session summary.json saved to /sysroot/home/bernhard/.config/another-window-session-manager/currentSession/summary.json!

and

Apr 14 09:54:25 acer-spin-bernhard gnome-shell[2432]: clutter_actor_add_child: assertion 'child->priv->parent == NULL' failed
Apr 14 09:54:25 acer-spin-bernhard gnome-shell[2432]: JS ERROR: [ERROR ][Another window session manager] undefined: TypeError: actor.connectObject is not a function
_setInitialKeyFocus@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:490:19
addButton@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:478:22
_init@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:345:39
_overrideEndSessionDialog/EndSessionDialog.EndSessionDialog.prototype._confirm@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:148:62
action/signalId<@resource:///org/gnome/shell/ui/endSessionDialog.js:450:30
_closeComplete@resource:///org/gnome/shell/ui/modalDialog.js:167:14
onComplete@resource:///org/gnome/shell/ui/modalDialog.js:186:40
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:153:13
_easeActor/<@resource:///org/gnome/shell/ui/environment.js:240:64

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 14, 2023

image

@btreut Please disable this switch, so that patches that you mentioned should never appear again when you Logout/Restart/Shutdown.

I'm investigating those errors you post.

@nlpsuge nlpsuge reopened this Apr 14, 2023
@nlpsuge
Copy link
Owner

nlpsuge commented Apr 14, 2023

@btreut What's your gnome shell version?

@btreut
Copy link
Author

btreut commented Apr 14, 2023

@btreut What's your gnome shell version?

$ gnome-shell --version
GNOME Shell 41.9

and I fear, I do not have any chance to upgrade to a newer version on my own ...

@btreut Please disable this switch ...

I already used this toggle, otherwise I would not be able to logout/restart/shutdown.

EndlessOS uses some own extensions to the gnome shell, maybe there is some interference:
grafik

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 15, 2023

and I fear, I do not have any chance to upgrade to a newer version on my own ...

No need to upgrade to a newer version, GNOME Shell 41.9 is supported by AWSM.

EndlessOS uses some own extensions to the gnome shell, maybe there is some interference:

I think you can disable all system extensions which is provided by Endless OS, and then activate Auto close session again, and to see if that patch can be rendered to a dialog normally.

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 15, 2023

Apr 14 09:54:25 acer-spin-bernhard gnome-shell[2432]: clutter_actor_add_child: assertion 'child->priv->parent == NULL' failed
Apr 14 09:54:25 acer-spin-bernhard gnome-shell[2432]: JS ERROR: [ERROR ][Another window session manager] undefined: TypeError: actor.connectObject is not a function
_setInitialKeyFocus@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:490:19
addButton@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:478:22
_init@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:345:39
_overrideEndSessionDialog/EndSessionDialog.EndSessionDialog.prototype._confirm@/sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js:148:62
action/signalId<@resource:///org/gnome/shell/ui/endSessionDialog.js:450:30
_closeComplete@resource:///org/gnome/shell/ui/modalDialog.js:167:14
onComplete@resource:///org/gnome/shell/ui/modalDialog.js:186:40
_makeEaseCallback/<@resource:///org/gnome/shell/ui/environment.js:153:13
_easeActor/<@resource:///org/gnome/shell/ui/environment.js:240:64

I reproduce this error on Fedora 35.

@nlpsuge nlpsuge added the bug Something isn't working label Apr 15, 2023
@btreut
Copy link
Author

btreut commented Apr 15, 2023

I reproduce this error on Fedora 35.

so I guess there is no need to disable the EndlessOS extensions.

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 15, 2023

I reproduce this error on Fedora 35.

so I guess there is no need to disable the EndlessOS extensions.

Yes.

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 15, 2023

BTW, the upstream changes related to this issue is here https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/26235bbe5433c48b81bd3917aaf9ef14ff1929b2

I don't think I have more free time to fix it recently unfortunately....

@btreut
Copy link
Author

btreut commented Apr 15, 2023

I don't think I have more free time to fix it recently unfortunately

sorry to hear that. So I have to be patient and wait for upstream fixes

@nlpsuge
Copy link
Owner

nlpsuge commented Apr 15, 2023

So I have to be patient and wait for upstream fixes

Not really. It's a compatibility issue with gnome shell 41, which means some code in /sysroot/home/bernhard/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/ui/autoclose.js has to be modified to be compatible with gnome shell 41.

@btreut
Copy link
Author

btreut commented Apr 16, 2023

I'll try my best, although Javascript is not my favorite language ...

other solution would be to wait until EndlessOS upgrades to a more recent verson of gnome-shell, I'll ask there before digging into js

@btreut
Copy link
Author

btreut commented Apr 25, 2023

... I'll ask there before digging into js

and I got the following answer:

Sorry, no timeline for that at present.

so I finally tried to dig into the code and commented out in autoclose.js two infringing lines (490-491). Now the little black patches do not pop up, but it also doesn't work correctly. The following other error message appears shortly
grafik
so I give up for now ...

nlpsuge added a commit that referenced this issue Jun 14, 2023
@nlpsuge
Copy link
Owner

nlpsuge commented Jul 23, 2023

Hi @btreut ,

The above issues have been fixed in PR #88, could you please test it, you can visit this link
https://github.com/nlpsuge/gnome-shell-extension-another-window-session-manager/tree/dev-gnome41-compatibility to download the code.

After downloading, copy the files to the AWSM extension folder:
cp -rp gnome-shell-extension-another-window-session-manager/* ~/.local/share/gnome-shell/extensions/another-window-session-manager@gmail.com/

Then restart gnome shell (using alt+f2 type r for X11 or logout and login for Wayland).

@btreut
Copy link
Author

btreut commented Jul 24, 2023

branch dev-gnome41-compatibilit behaves slightly better than master. But now I encounter the same problem as described in ydotoool.service not found #83 but it is not obvious to me, what I have to do under EndlessOS to enable that service (no way to install with apt):
Screenshot_Cutout-60_2023-07-24 11-42-29

@btreut
Copy link
Author

btreut commented Jul 24, 2023

strange enough: I logged out (session was X11) by clicking "Log out now" in the window above and ignoring the ydotool.service message and switched to Wayland and got lots of applications restored. It may be possible that I saved these quite some months ago by accident, when I tried to use the session manager the first times. I retried to save only one open application (Firefox) and restarted successfully this instance of firefox with this issue open so I had the chance to edit this post immediately. The ydotool.service message popped up under Wayland also. Restarting the session under X11 worked (although Firefox encountered an error restoring the last session by default, I had to click the offered "Restore previous session" button manually to get back here). Apparently session saving seem to also work without the ydotool.service. As far as I understand ydotool.service is used to feed automagically keystrokes to the X11/Wayland input queue ... so I expect some things to work not absolutely correct. Iasked for help using ydotool under EndlessOS on their community platform.

@nlpsuge
Copy link
Owner

nlpsuge commented Jul 24, 2023

no way to install with apt

Oh, I forget this point, so you can't install ydotool either.

Apparently session saving seem to also work without the ydotool.service.

Yes, they are independent each other.

As far as I understand ydotool.service is used to feed automagically keystrokes to the X11/Wayland input queue

Yes, it is. AWSM uses ydotool to send shortcuts to the running apps to close them.
image

If ydotool is not installed, the above two sections of settings won't work properly. You can disable this function by switching off Close by rules:
image

And the below prompt dialog should be never shown again.
image

It may be possible that I saved these quite some months ago by accident, when I tried to use the session manager the first times.

Yes, you are right.

what I have to do under EndlessOS to enable that service

Please look at and follow the instructions of How to make Close by rules work

But you will have to install ydotool beforehand.

@btreut
Copy link
Author

btreut commented Jul 24, 2023

And the below prompt dialog should be never shown again.
[...]

"Close by rules" is switched off in my setup, but that dialog still appears:
Screenshot_AWSM_Cutout60_2023-07-24_16-19-15

@nlpsuge
Copy link
Owner

nlpsuge commented Jul 24, 2023

@btreut

And the below prompt dialog should be never shown again.
[...]

"Close by rules" is switched off in my setup, but that dialog still appears: Screenshot_AWSM_Cutout60_2023-07-24_16-19-15

This is a bug and it's fixed. Please redownload the code and try again.

@btreut
Copy link
Author

btreut commented Jul 24, 2023

This is a bug and it's fixed. Please redownload the code and try again.

done, looks good on the first attempts using it.

@nlpsuge
Copy link
Owner

nlpsuge commented Jul 24, 2023

This is a bug and it's fixed. Please redownload the code and try again.

done, looks good on the first attempts using it.

OK, I will push a new version to the E.G.O website in this week, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working compatibility
Projects
None yet
Development

No branches or pull requests

2 participants