termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.16k stars 3.02k forks source link

[Bug]: Missing icons in lxqt with Qt6 #20779

Open DuilioPerez opened 3 months ago

DuilioPerez commented 3 months ago

Problem description

I've used lxqt in termux since a very long time. But when I upgraded to Qt6 there are some missing icons and the icon theme can't be changed.

This is a image of how currently looks. Screenshot_20240704-091733_TermuxX11

In a related issue in it's official github page it says it could be a missing component. Maybe a yet not upgraded component: This is the link

What steps will reproduce the bug?

Try running lxqt upgraded to use Qt 6

What is the expected behavior?

Show and allowing change icon and icon themes

System information

Termux Variables:
TERMUX_API_VERSION=0.50.1
TERMUX_APK_RELEASE=F_DROID
TERMUX_APP_PACKAGE_MANAGER=apt
TERMUX_APP_PID=5933
TERMUX_IS_DEBUGGABLE_BUILD=0
TERMUX_MAIN_PACKAGE_FORMAT=debian
TERMUX_VERSION=0.118.0
TERMUX__USER_ID=0
Packages CPU architecture:
aarch64
Subscribed repositories:
# sources.list
deb https://packages-cf.termux.dev/apt/termux-main/ stable main
# glibc-repo (sources.list.d/glibc.list)
deb https://packages-cf.termux.dev/apt/termux-glibc/ glibc stable
# tur-repo (sources.list.d/tur.list)
deb https://tur.kcubeterm.com tur-packages tur tur-on-device tur-continuous
# x11-repo (sources.list.d/x11.list)
deb https://packages-cf.termux.dev/apt/termux-x11/ x11 main
Updatable packages:
All packages up to date
termux-tools version:
1.42.4
Android version:
11
Kernel build information:
Linux localhost 4.14.186-22735277 #1 SMP PREEMPT Sat Feb 19 02:14:57 KST 2022 aarch64 Android
Device manufacturer:
samsung
Device model:
SM-A225M
LD Variables:
LD_LIBRARY_PATH=
LD_PRELOAD=/data/data/com.termux/files/usr/lib/libtermux-exec.so
Installed termux plugins:
com.termux.api versionCode:51
com.termux.x11 versionCode:14
com.termux.styling versionCode:32
Biswa96 commented 3 months ago

I can reproduce the issue. In my case, the icons were missing before lxqt v2 update. Thanks for upstream issue link. I shall try to investigate more.

DuilioPerez commented 3 months ago

There are issues with notifications, too: void DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *): "The name org.kde.StatusNotifierItem-17082-2 was not provided by any .service files"

DuilioPerez commented 3 months ago

I can reproduce the issue. In my case, the icons were missing before lxqt v2 update. Thanks for upstream issue link. I shall try to investigate more.

Almost all the components of lxqt are in version 2, but lxqt itself it is yet in version 1.2 Screenshot_20240704-095358_Termux

Biswa96 commented 3 months ago

lxqt is just an empty package https://github.com/termux/termux-packages/blob/master/x11-packages/lxqt/build.sh. Thanks for the reminder. I'll bump the version.

DuilioPerez commented 3 months ago

lxqt is just an empty package https://github.com/termux/termux-packages/blob/master/x11-packages/lxqt/build.sh. Thanks for the reminder. I'll bump the version.

Oh! Excuse me. I didn't read it is a metapackage. In any case, thank you very much for reading this bug report.

DuilioPerez commented 3 months ago

I've found 3 issues in this package: lxqt-session: LockScreenManager couldn't start: This doesn't allow a screen lock [ 07/04/24 14:00:54.565 session_init FATAL ERROR ] Another composite manager is already running: I don't know how this affects. Maybe it's just a bug? Unable to determine system time zone: please check your system configuration.: This is for the timezone, in the previous version it wasn't. Maybe this doesn't allow to show the time in the corresponding widget Possible issues/bugs: Could not parse application stylesheet: This is related with the application's look, in this case, the default styles. I've noticed it can't be changed. Here it is where you can change that settings. For now it doesn't have effects Screenshot_20240704-142343_TermuxX11 kf.windowsystem: Could not find any platform plugin: This can be a bug. I don't have idea.

Maybe those bugs related with reading files are related with the Termux's file system. I don't know.

DuilioPerez commented 3 months ago

I've solved the second issue. Lxqt try to autostar picom, wich only updates the screen in user's events, I don't know if is a bug or just a configuration error. This can be solved removing picom from autostart in lxqt session settings. I have Xcomgr as my default composer.

DuilioPerez commented 3 months ago

According to this post, the error kf.windowsystem: Could not find any platform plugin doesn't allow load local files. Maybe this is the problem

DuilioPerez commented 3 months ago

The problem related to timezone seems to be related to Qt 6, read this post. I've not found information related to the error parsing the stylesheet.

DuilioPerez commented 3 months ago

And the cause of the lock screen error is the command xdg-screensaver is missing

DuilioPerez commented 3 months ago

I've found the cause of the problem! It could be lxqt-qtplugin wich yet uses Qt5. Screenshot_20240705-202009_Termux See this post

Biswa96 commented 3 months ago

I've found the cause of the problem! It could be lxqt-qtplugin which yet uses Qt5.

Nope, it uses qt6 https://github.com/termux/termux-packages/blob/master/x11-packages/lxqt-qtplugin/build.sh. Otherwise we would not get version 2.0.0 😄

I have found some hints from strace. Some paths has to be relocated with TERMUX_PREFIX. I'll try to fix those. But even if I did that some icons are missing. The missing icons are searched without themes paths. I'm looking into it.

DuilioPerez commented 3 months ago

I've found the cause of the problem! It could be lxqt-qtplugin which yet uses Qt5.

Nope, it uses qt6 https://github.com/termux/termux-packages/blob/master/x11-packages/lxqt-qtplugin/build.sh. Otherwise we would not get version 2.0.0 😄

I have found some hints from strace. Some paths has to be relocated with TERMUX_PREFIX. I'll try to fix those. But even if I did that some icons are missing. The missing icons are searched without themes paths. I'm looking into it.

That seems to be an old issue. This issue was common with external icon themes, themes downloaded from internet. The only theme I know show all icons is Papirus

DuilioPerez commented 2 months ago

It seems gsettings is related

Click here to see the screenshot ![Screenshot_20240730-144735_TermuxX11](https://github.com/user-attachments/assets/1e374892-75b8-4250-8dfe-753539e02e01)
Biswa96 commented 2 months ago

It seems gsettings is related

How did you fix it?

DuilioPerez commented 2 months ago

It's not fized yet. But I think when change the icon theme the program try to call gsettings, but it seems the call to the command is incorrect. I don't know much about how lxqt works, but it seems the problem is just with one component. Let me upload a screenshot of almost all the programs working fine with the icons.

DuilioPerez commented 2 months ago
Click here to see the screenshot ![Screenshot_20240731-070303_TermuxX11](https://github.com/user-attachments/assets/4b152857-00ae-478d-ac95-5ac09c6cb8ef)

As you can see, there are issues when try to change icons. It seems to be related to reading and writting files. In the terminal, always gsettings is shown when try to change icons. I don't know what happens, but I assume that when a program in Linux shows its help, usually is because it is called without arguments, or sometimes with wrong arguments

Biswa96 commented 2 months ago

Could you provide any docs about how to add those icon themes in lxqt? My googlefu failed.

DuilioPerez commented 2 months ago

If you refer of how to get my icon theme then you can download it from KDE store. But if you refer of how to make icons work on lxqt apps, then open them via terminal using xfce4 DE.

DuilioPerez commented 2 months ago

Additional info about lxqt apps launched from xfce4: I discovered it accidentally

DuilioPerez commented 2 months ago

To add those icon themes to the list of themes you need to descompress the zip in the ~/.icons directory, just like in any other DE

DuilioPerez commented 2 months ago

I've fixed the problem (temporally):

Click here to see the screenshot ![Screenshot_20240809-075700_TermuxX11](https://github.com/user-attachments/assets/6b836eb0-f311-42d2-90b1-bd5636203c85)
DuilioPerez commented 2 months ago

Now icons are shown correctly in lxqt, but it is not a permanently solution because it need an additional tool, that it is termux main repository

Biswa96 commented 2 months ago

Could you please provide the steps?

DuilioPerez commented 2 months ago

Could you please provide the steps?

You need qt6ct, set the theme for all Qt apps, then you need to modify a file:

~ $ cat $PREFIX/share/lxqt/session.conf
[General]
leave_confirmation=true

[Environment]
GTK_CSD=0
GTK_OVERLAY_SCROLLING=0
QT_QPA_PLATFORMTHEME=qt6ct

[Mouse]
cursor_size=18
cursor_theme=whiteglass
acc_factor=20
acc_threshold=10
left_handed=false

[Keyboard]
delay=500
interval=30
beep=false

[Font]
antialias=true
hinting=true
dpi=96

But I think this isn't a permanent solution and I think it can't be take it as it because it made lxqt's appareance settings innecesary and they don't work.

sm8ps commented 1 week ago

As this bug is still open, I would like to add my experience from a fresh install. After #21663 is solved, I got LXQT running but there are no icons on the desktop and only some everywhere else. The configuration center for instance looks just like depicted by @DuilioPerez in the original bug report. The application menu only shows the following icons: Screenshot_20241005_202325_TermuxX11

I noticed that gsettings does not seem to be available. Upon changing the icon theme I get the following error: Screenshot_20241005_203013_TermuxX11

Installing the corresponding package glib-bin makes the error go away but does not provide the desired functionality of activating icons. I have been fiddling around a bit but what strikes me is that now apt/pkg states: The following packages were automatically installed and are no longer required:
adwaita-icon-theme adwaita-icon-theme-legacy at-spi2-core gpgme gpgmepp gtk-update-icon-cache libepoxy libnspr libnss libzip littlecms poppler portaudio

Any clues anybody?

PS: one little bit I just noticed with gaettings installed: upon changing an icon theme, I get the following error in the Termux console: No such schema “org.gnome.desktop.interface”

DuilioPerez commented 1 week ago

As a temporal workaroud, you could try to change QT_QPA_PLATFORMTHEME environment variable. It's an error with that value in LXQT, maybe it have invalid paths

sm8ps commented 1 week ago

Thanks for the suggestion @DuilioPerez ! However, I have had no success at all with any settings, be it GNOME or KDE as per https://wiki.archlinux.org/title/Qt .

While searching for a possible solution I have come across https://github.com/lxqt/lxqt-qtplugin which apparently is responsible for just the type of feature we are talking about: "This repository provides the library libqtlxqt to integrate Qt with LXQt. With this plugin, all Qt-based programs can adopt settings of LXQt, such as the icon theme and Qt style."

libqtlxqt is not available in the Termux repos. Could this be the cause of the problems? This is all foreign territory to me so I have no idea where to start . Thanks for any suggestions!

DuilioPerez commented 1 week ago

@sm8ps Try this. I've discovered accidentally.

You need qt6ct, set the theme for all Qt apps, then you need to modify a file:

~ $ cat $PREFIX/share/lxqt/session.conf
[General]
leave_confirmation=true

[Environment]
GTK_CSD=0
GTK_OVERLAY_SCROLLING=0
QT_QPA_PLATFORMTHEME=qt6ct

[Mouse]
cursor_size=18
cursor_theme=whiteglass
acc_factor=20
acc_threshold=10
left_handed=false

[Keyboard]
delay=500
interval=30
beep=false

[Font]
antialias=true
hinting=true
dpi=96

But I think this isn't a permanent solution and I think it can't be take it as it because it made lxqt's appareance settings innecesary and they don't work.

Thanks for the suggestion @DuilioPerez ! However, I have had no success at all with any settings, be it GNOME or KDE as per https://wiki.archlinux.org/title/Qt .

While searching for a possible solution I have come across https://github.com/lxqt/lxqt-qtplugin which apparently is responsible for just the type of feature we are talking about: "This repository provides the library libqtlxqt to integrate Qt with LXQt. With this plugin, all Qt-based programs can adopt settings of LXQt, such as the icon theme and Qt style."

libqtlxqt is not available in the Termux repos. Could this be the cause of the problems? This is all foreign territory to me so I have no idea where to start . Thanks for any suggestions!

I don't think so. LXQT 1.2 worked well without that plugin.

sm8ps commented 1 week ago

Oh yeah, that does work indeed! I had seen your post before but shied back from seemingly putting all of the configuration into that file. It was not before trying until I realized that there is literally just one line to add and all of the remaining settings continue to work. Thanks a lot, @DuilioPerez !

PS: In case anybody was wondering, the thing with libqtlxqt turned out to be a misunderstanding on my side. The package is called lxqt-qtplugin (who would have thought so?!) and was well installed from the repos.