From 993eb6511b35430856ef20669ff91bafc829cc73 Mon Sep 17 00:00:00 2001 From: yusufipk Date: Wed, 5 Aug 2026 16:46:28 +0300 Subject: [PATCH] Keep the Fedora section to what you have to type The section ran longer than Ubuntu and macOS put together, and most of it answered questions nobody asked while installing: why ffmpeg-free is enough in detail, why the runtime directory settles after login, and why the local models need nothing added. That last one says "do nothing", which is what the reader would have done anyway. The reasoning stays in the pull request, where it belongs; the README keeps the package line and the drop-in. install.sh printed the drop-in the README already carries, six lines where every other warning there is two. It now points at the README. Its readiness check also went from asking whether the unit was up to asking whether the socket is writable, which reads a stopped daemon as ready: the socket file outlives the process. It now wants both, with pgrep for the process so a ydotoold started by hand still counts. All five paths were exercised with systemctl and pgrep shims, and on this Arch box the real user service still reports ready. --- README.md | 30 ++++++------------------------ README.tr.md | 28 ++++++---------------------- install.sh | 18 +++++++----------- 3 files changed, 19 insertions(+), 57 deletions(-) diff --git a/README.md b/README.md index f354e8a..d95be16 100644 --- a/README.md +++ b/README.md @@ -30,19 +30,15 @@ systemctl --user enable --now ydotool # needed for auto-paste dikte # the settings window opens on first run ``` -On Fedora KDE the packages are named differently, and `ydotool` takes one step -more: +On Fedora the packages are named differently, `ffmpeg-free` out of Fedora's own +repositories is enough because Dikte only ever takes the audio track of a video +file, and `ydotool` takes one step more: it ships as a system service, whose +socket stays root-owned and out of your session's reach, so auto-paste fails +with the daemon running. Point it at the path the client already looks at and +hand the socket over: ```sh sudo dnf install pipewire-utils wl-clipboard ydotool ffmpeg-free python3-pyqt6 -``` - -Fedora ships `ydotool` as a system service rather than a user one, and -`ydotoold` then listens on a root-owned socket your session cannot write to, so -auto-paste fails with the daemon running. Point it instead at the path the -`ydotool` client already looks at, and hand the socket over: - -```sh sudo mkdir -p /etc/systemd/system/ydotool.service.d printf '[Service]\nExecStart=\nExecStart=/usr/bin/ydotoold --socket-path=%s/.ydotool_socket --socket-own=%s:%s\n' \ "$XDG_RUNTIME_DIR" "$(id -u)" "$(id -g)" \ @@ -51,20 +47,6 @@ sudo systemctl daemon-reload sudo systemctl enable --now ydotool ``` -That runtime directory belongs to your login session, so after a reboot the -service restarts until you are logged in and only then settles. `ffmpeg-free` -out of Fedora's own repositories is enough, RPM Fusion not needed: what the -free build leaves out is H.264 and HEVC video decoding, and Dikte only ever -takes the audio track of a video file, whose AAC, MP3 and Opus decoders are all -there. - -The models that run on this machine need nothing added either. Those releases -are built on Ubuntu and run here as they are, and KWin links `libvulkan.so.1` -itself, so a Plasma desktop already has the loader that decides whether -llama.cpp arrives in its Vulkan build, with the Mesa drivers alongside it. -whisper.cpp publishes no GPU build for Linux at all and transcribes on the -processor wherever it runs. - On Ubuntu/GNOME X11, recording uses PulseAudio and clipboard/paste use the X11 tools instead: diff --git a/README.tr.md b/README.tr.md index 30c1eb3..5078f20 100644 --- a/README.tr.md +++ b/README.tr.md @@ -29,18 +29,15 @@ systemctl --user enable --now ydotool # otomatik yapıştırma için dikte # ilk açılışta ayarlar penceresi gelir ``` -Fedora KDE'de paket adları farklı, `ydotool` da bir adım fazla istiyor: +Fedora'da paket adları farklı, Fedora'nın kendi depolarındaki `ffmpeg-free` +yetiyor çünkü Dikte video dosyasının yalnızca ses izini alıyor, `ydotool` da +bir adım fazla istiyor: sistem servisi olarak geliyor, soketi de root'a ait +kalıp oturumun erişemediği yerde durduğu için servis çalışırken bile otomatik +yapıştırma tutmuyor. Soketi istemcinin zaten baktığı yola al ve sahipliğini +devret: ```sh sudo dnf install pipewire-utils wl-clipboard ydotool ffmpeg-free python3-pyqt6 -``` - -Fedora `ydotool`'u kullanıcı servisi değil sistem servisi olarak kuruyor; -`ydotoold` de root'a ait bir sokete bağlanıyor, oturumun oraya yazamadığı için -servis çalışırken bile otomatik yapıştırma tutmuyor. Soketi `ydotool` -istemcisinin zaten baktığı yola al ve sahipliğini devret: - -```sh sudo mkdir -p /etc/systemd/system/ydotool.service.d printf '[Service]\nExecStart=\nExecStart=/usr/bin/ydotoold --socket-path=%s/.ydotool_socket --socket-own=%s:%s\n' \ "$XDG_RUNTIME_DIR" "$(id -u)" "$(id -g)" \ @@ -49,19 +46,6 @@ sudo systemctl daemon-reload sudo systemctl enable --now ydotool ``` -O çalışma dizini oturumuna ait olduğu için yeniden başlatmanın ardından servis -sen giriş yapana kadar kendini yeniden deneyip ondan sonra oturuyor. Fedora'nın -kendi depolarındaki `ffmpeg-free` yetiyor, RPM Fusion gerekmiyor: özgür yapının -dışarıda bıraktığı şey H.264 ve HEVC video çözümü, Dikte ise video dosyasının -yalnızca ses izini alıyor; onun AAC, MP3 ve Opus çözücüleri yapının içinde. - -Bu makinede koşan modeller için de eklenecek bir şey yok. O sürümler Ubuntu'da -derleniyor ve burada olduğu gibi çalışıyor; `libvulkan.so.1`'i KWin'in kendisi -bağladığı için Plasma masaüstünde llama.cpp'nin Vulkan yapısıyla gelip -gelmeyeceğini belirleyen yükleyici zaten kurulu, Mesa sürücüleri de onunla -birlikte geliyor. whisper.cpp ise Linux için hiç GPU yapısı yayımlamıyor, -nerede çalışırsa çalışsın işlemcide çeviriyor. - Ubuntu/GNOME X11 için kayıt PulseAudio üzerinden, pano ve yapıştırma ise X11 araçlarıyla çalışır: diff --git a/install.sh b/install.sh index de99f48..c55b4c0 100755 --- a/install.sh +++ b/install.sh @@ -52,21 +52,17 @@ fi # What auto-paste needs is a socket it may write to, which is not the same # question as whether the unit is up: Fedora ships ydotool as a system service # only, and its socket stays root-owned at mode 600, so there the daemon can be -# running while every paste is refused. +# running while every paste is refused. The socket file outlives the daemon, +# though, so the process has to be there as well for the answer to be yes. if [[ "${XDG_SESSION_TYPE:-}" != "x11" ]] && command -v ydotool >/dev/null; then socket="${YDOTOOL_SOCKET:-${XDG_RUNTIME_DIR:-/tmp}/.ydotool_socket}" - if [[ -w "$socket" ]]; then + alive() { pgrep -x ydotoold >/dev/null 2>&1; } + if [[ -w "$socket" ]] && alive; then ok "ydotoold is running (auto-paste ready)" elif systemctl is-active --quiet ydotool 2>/dev/null; then - warn "ydotoold runs as a system service, whose socket is not yours to" - say "write to. Hand it over in /etc/systemd/system/ydotool.service.d/" - say "override.conf, which is what the README's Fedora section does:" - say " [Service]" - say " ExecStart=" - say " ExecStart=/usr/bin/ydotoold --socket-path=$socket --socket-own=$(id -u):$(id -g)" - say "then sudo systemctl daemon-reload && sudo systemctl restart ydotool" - elif systemctl --user is-active --quiet ydotool 2>/dev/null \ - || systemctl --user is-active --quiet ydotoold 2>/dev/null; then + warn "ydotoold's socket is not yours to write to, so auto-paste will fail" + say "Hand it over with the drop-in in the README's Fedora section." + elif alive; then warn "ydotoold is running, but it did not put its socket at $socket" say "Point Dikte at the one it did make: export YDOTOOL_SOCKET=..." else