fedora-silverblue / issue-tracker

Fedora Silverblue issue tracker
https://fedoraproject.org/atomic-desktops/silverblue/
125 stars 3 forks source link

speech-dispatcher doesn't come with the necessary socket to make it work with some Flatpak apps #569

Open not-a-dev-stein opened 1 month ago

not-a-dev-stein commented 1 month ago

Describe the bug The speech-dispatcher package needed for screen reader support doesn't come with the necessary /usr/lib/systemd/user/speech-dispatcher.socket to make it work with some Flatpak apps (in my testing mainly Firefox through Flatpak and Foliate).

The current workaround is to manually run /usr/bin/speech-dispatcher -d -t 0 in the terminal before opening the apps to make them work, but we shouldn't need it.

Currently, if you try to use the speech-dispatcher.service and the speech-dispatcherd.service both of them give out this error:

mai 28 18:09:53 casper-3 speech-dispatcher[4166]: [Tue May 28 18:09:53 2024 : 502906] speechd: Can't create pid file in /root/.cache/speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?
mai 28 18:09:53 casper-3 speech-dispatcher[4166]: Can't create pid file in /root/.cache/speech-dispatcher/pid/speech-dispatcher.pid, wrong permissions?

I'm not 100% sure if this is an issue just with Silverblue or with both SB and Workstation, but as I found it on SB I decided to report it here, and I couldn't find an open issue about it for Workstation. As far as I'm aware the only distro properly shipping it is Ubuntu.

To Reproduce Please describe the steps needed to reproduce the bug:

  1. Run ls /usr/lib/systemd/user | grep speech to make sure the file socket file isn't there, which it probably isn't.
  2. Open Firefox installed through Flathub.
  3. Try to open an article in Reader Mode (this is a random example)
  4. Notice that the headphones icon for the Read Aloud option doesn't show up.
  5. Close the app, open a terminal and run /usr/bin/speech-dispatcher -d -t 0
  6. Go through steps 2-3 again and notice it now works.

You can try the same thing with Foliate, as you'll get this error message if you try to use the read aloud option without running the command.

Expected behavior Speech-dispatcher would be able to read aloud the content in apps run through Flatpak.

Screenshots image

  1. Error given by Foliate when the speech-dispatcher server isn't running.

image

  1. Firefox's Reader mode working after manually running the server.

OS version:

ostree-image-signed:docker://ghcr.io/ublue-os/silverblue-nvidia:40

I've been using the latest Universal Blue Silverblue image, but also tested in the latest vanilla Silverblue image, I just haven't tested on Workstation.

Additional context This merge request for Flatpak might be related in some level, but I'm not 100% sure: https://github.com/flatpak/flatpak/pull/5272

travier commented 1 month ago

Looks like this should definitely be a user unit and not a system one. Can you file a bug in bugzilla for this package and link it here? Thanks

travier commented 1 month ago

Looks like the package should be using another configure flag to get user units instead of a system one.

travier commented 1 month ago

Ah, this is not yet available in a released version of speechd :/

not-a-dev-stein commented 1 month ago

Double checking this then, couldn't we patch the package in the meanwhile? We could look at how Ubuntu is packaging it to have the socket work, as AFAIK they have a fully working package. Could you link me the Bugzilla page for the package, I'll open an issue and hope for the best.

travier commented 1 month ago

To open a bug for speech-dispatcher: https://bugzilla.redhat.com/enter_bug.cgi?component=speech-dispatcher&product=Fedora

Specfile in: https://src.fedoraproject.org/rpms/speech-dispatcher

travier commented 1 month ago

Ubuntu is shipping an non-stable (rc) version: https://packages.ubuntu.com/source/noble/speech-dispatcher

not-a-dev-stein commented 1 month ago

To open a bug for speech-dispatcher: https://bugzilla.redhat.com/enter_bug.cgi?component=speech-dispatcher&product=Fedora

Issue opened! Thanks for the help!