-
Notifications
You must be signed in to change notification settings - Fork 203
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
Can't open BiT on Wayland after Qt theme tweak #1349
Comments
You run "Back In Time (root)", right? How is it when you try it as a user? Please show the output of |
I think running BiT (root) with the polkit script still uses the "home" folder of the user while running BiT as root:
That is why according to above error message the user 0 (root) tries to access a folder of user 1000 (the first "human" user on an installed Linux). There is a known issue with this in Qt themes but I have never tried to fix this myself: https://wiki.archlinux.org/title/qt#Theme_not_applied_to_root_applications This problem is not BiT-specific, so someone must have found and tested a solution for this already (I am searching...) |
Possibly related to #836? |
|
I am wondering which message is really causing BiT to fail starting: a) QStandardPaths: runtime directory '/run/user/1000' is not owned by UID 0, but a directory permissions 0700 owned by UID 1000 GID 1000 After some "search machine research" it looks like a) is "just" a warning so I would focus on b). Did anybody find a documentation if @sojusnik Can I assume that Edit: My current hypothesis is: gtk2 is only supported on X11.
Edit 2: What happens if you send |
It only opened a window where you are asked to restore the settings from a previous config file and then the settings window, but after dismissing both windows (both use the GTK2 theme), the main BiT window doesn't appear. Out of curiosity, I've started BiT on X11 as well. Maybe it will lead to some clues:
Surprisingly, the non-root version still doesn't work, even on X11, but the root version does work and is properly themed:
How can I find out if I'm using XWayland? I just did a fresh installation of Ubuntu 22.10 without any substantial tweaks besides this performance tweak to decrease mouse latency. Applying
|
Sorry, I didn't give enough context: Ubuntu automatically installs the "XWayland" package together with "wayland" which allows "old" apps See also: https://wayland.freedesktop.org/xserver.html To find out if BiT (or another app) is using XWayland there is a good description here https://askubuntu.com/questions/1393618/how-can-i-tell-if-an-application-is-using-xwayland
BiT "userland" (= not started as root) does not use wayland but X11 (via above mentioned XWayland). I have opened a new issue #1350 since BiT should consistently use either X11 or Wayland API for both BiT root and BiT "userland".
This is an expected error since running a GUI as root is not allowed with wayland
This is OK if your BiT profile is stored only in BiT (root) - the config files are stored "per user" in their home folder
I guess with "doesn't work" you mean the same BiT behaviour to ask for a new config
Yes, this weakens the wayland security idea and revoking it after BiT has quit is the best you can do. For a good explanation see this video: https://www.youtube.com/watch?v=-T1LoHTZDvs Still it is the best option so far (and often used by other apps too). BTW: There was a non-merged PR (#1347) for using this "work-around" which I'd consider as a possible solution for you https://github.com/bit-team/backintime/pull/1347/files If you want you could try this script and post your feed-back here... |
I had the impression that it crashed even before asking to set up a new config, but I checked it again under X11 with the non-root version and BiT quits after I press "cancel" twice, in order not to set up a new config. So I guess it's working like it should.
Setting a script at the moment is too cumbersome for me. I hope for a quick fix and will use the manual way with Thanks for your help! |
Internal note: Without setting XDG_RUNTIME_DIR a warning appears:
Setting it throws:
since it is set to the user's value ( TODO: Examine the behavior in all variations of X11/Wayland display server with different Qt5 platform plugins ( |
Short summary of findings so far: When BiT (root) is started on wayland this warning appears (since the
This is just a warning, but
So I am afraid only a refactoring to use a user BiT Qt GUI + as-required elevated rights in the backend will really bring a sustainable solution (which is very much work). |
Thanks for for your research here. Do you mean that |
Yes, this a wayland security requirement.
Yes, this could be one way to go to make a non-root GUI usable for certain privileged actions.
PS: I may have found a work-around by setting |
@sojusnik I think your problem may also be fixed with the fix of #1592 which is contained in the upcoming release planned for end of January 2024. It would be great if you could test that release then and tell us if it works now. I have modified the BiT GUI (root) starter script to prefer |
Hello Sojusnik,
can you give us some feedback please to go further with this issue. |
With v1.4.3 on Ubuntu 24.04.1 (Wayland) it does work (
as described in my first post. |
Thank you for reporting back. Can you provide us a screenshot of an "unthemed" BIT window please? |
Do you see any other differences between your themed windows and this BIT window? |
Well, at first glance everything else isn't themed too, starting from the font, the way the dropdown menus look etc., but since the difference isn't that big, I can live with that. |
OK, not sure if BIT can do something about that theming problem. |
I've tweaked my Qt apps to look like GTK apps by
but after doing that, I can't open Back in Time any more! The following error message appears:
Did somebody stumble upon this issue and could solve it?
Under X11, BiT launches as usual, but not on Wayland.
I'm on Ubuntu 22.10 with the following packages installed:
The text was updated successfully, but these errors were encountered: