Subject: bug#68483: Qutebrowser QT platform plugin could not be initialized

From: Sergey Trofimov <[email-masked]>
Date: Tue, 16 Jan 2024 12:35:13 +0100

Clément Lassieur <[email-masked]> writes:

> On Tue, Jan 16 2024, Sergey Trofimov wrote:
>
>>> Would this work with non-wayland users too?  (So that it would 
>>> make
>>> sense to add it to the main package?)
>>>
>>> Thanks,
>>> Clément
>>
>> Yeah, it would work, but forcing the platform through 
>> parameters is not
>> necessary. I added it just to be sure that wayland is being 
>> used instead of
>> xcb. On the other hand I think adding qtwayland dependency to 
>> every qt-based
>> gui program doesn't make sense. Maybe a qtwayland-home-service 
>> makes more
>> sense which would install the dependency and set required 
>> environment
>> variables. This way it would work for every Qt GUI program on 
>> wayland.
>
> Ok, I see, thanks!

As simple as:

--8<---------------cut here---------------start------------->8---
(simple-service 'qtwayland-vars-service
  home-environment-variables-service-type
   `(("QT_PLUGIN_PATH" . ,(file-append qtwayland 
   "/lib/qt6/plugins"))
     ("QT_QPA_PLATFORM_PLUGIN_PATH" . ,(file-append qtwayland 
     "/lib/qt6/plugins/platforms"))))
--8<---------------cut here---------------end--------------->8---