lucyllewy / one-script-wsl2-systemd

The one-script variant of the systemd hack for WSL2
MIT License
231 stars 38 forks source link

Qt apps always black #24

Open gcardi opened 2 years ago

gcardi commented 2 years ago

After installed systemd applications using Qt exhibits always a black window. I've tried with VLC and QtCreator.

What I'm missing?

gcardi commented 2 years ago

Hi, I just noticed that starting a QT application as root (sudo su), it works just fine.

gcardi commented 2 years ago

This works:

giuliano@PC-GIULIANO10:~$ sudo ./qtcreator QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' qt.core.qobject.connect: QObject::connect: Cannot connect (nullptr)::usageStatisticsNotifier(const QString) to UsageStatistic::Internal::QmlDesignerUsageEventSource::handleUsageStatisticsNotifier(const QString) qt.core.qobject.connect: QObject::connect: Cannot connect (nullptr)::usageStatisticsUsageTimer(const QString, int) to UsageStatistic::Internal::QmlDesignerUsageEventSource::handleUsageStatisticsUsageTimer(const QString, int)

This doesn't works:

giuliano@PC-GIULIANO10:~$ ./qtcreator qt.qpa.plugin: Could not find the Qt platform plugin "wayland" in "" QApplication: invalid style override 'kvantum-dark' passed, ignoring it. Available styles: Windows, Fusion qt.core.qobject.connect: QObject::connect: Cannot connect (nullptr)::usageStatisticsNotifier(const QString) to UsageStatistic::Internal::QmlDesignerUsageEventSource::handleUsageStatisticsNotifier(const QString) qt.core.qobject.connect: QObject::connect: Cannot connect (nullptr)::usageStatisticsUsageTimer(const QString, int) to UsageStatistic::Internal::QmlDesignerUsageEventSource::handleUsageStatisticsUsageTimer(const QString, int)

crramirez commented 2 years ago

Hello @gcardi ,

Try with this:

export XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir

Also, be sure that qt5-wayland or qt5-qtwayland packages are installed

gcardi commented 2 years ago

Hi.

Thanks for the suggestion! I've tried, but Qt based apps like VLC are still all black.

Thanks again.

Cheers.

Giuliano

Il giorno mer 13 apr 2022 alle ore 10:29 Carlos Rafael Ramirez < @.***> ha scritto:

Hello @gcardi https://github.com/gcardi ,

Try with this:

export XDG_RUNTIME_DIR=/mnt/wslg/runtime-dir

— Reply to this email directly, view it on GitHub https://github.com/diddledani/one-script-wsl2-systemd/issues/24#issuecomment-1097707977, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABIALPGT2BEVSCIAM2HSDCDVE2AYJANCNFSM5OONE2MQ . You are receiving this because you were mentioned.Message ID: @.***>

crramirez commented 2 years ago

I found that vlc is still black but QT creator, Konsole and others began to work after this change

crramirez commented 2 years ago

Also try export QT_QPA_PLATFORM=wayland

gcardi commented 2 years ago

Hi,

with this “export” Konsole works like a charm!

Thank you!

:-)

Giuliano

From: Carlos Rafael Ramirez Sent: Thursday, April 14, 2022 7:34 PM To: diddledani/one-script-wsl2-systemd Cc: Giuliano Cardinali ; Mention Subject: Re: [diddledani/one-script-wsl2-systemd] Qt apps always black (Issue #24)

Also try export QT_QPA_PLATFORM=wayland

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>