mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
Write down what installing on Fedora takes
The README has Arch and Ubuntu on it, and the two things that differ on Fedora are the two that decide whether anything works at all. The package names are its own, and `systemctl --user enable --now ydotool` has nothing to enable there: Fedora ships ydotool as a system service only, and its ydotoold holds a root-owned socket at mode 600. The unit is green, the daemon is up, and every paste is refused. The drop-in the README now spells out points ydotoold at $XDG_RUNTIME_DIR/.ydotool_socket and hands it over by uid, which is the path the client already looks at, so nothing has to carry YDOTOOL_SOCKET. Red Hat closed the same report as NOTABUG in 2023, so this stays a step the user takes rather than one a later package will take for them. install.sh was asking whether the unit was up, which is the question that answers wrongly here. It now asks whether the socket is one this user may write to, which is what auto-paste actually needs, and it names which of the three ways it failed: a socket handed to nobody, a daemon that put its socket somewhere else, or no daemon at all. On Arch and everywhere else the answer is the same one as before. ffmpeg-free out of Fedora's own repositories is enough, against the usual advice to reach for RPM Fusion. That build disables four video decoders, h264, hevc, vc1 and vvc, and keeps every audio decoder it has, AAC among them, while Dikte only ever asks a video file for its audio track. The models that run on this machine ask for nothing either, which is worth saying because it is now the way Dikte starts. The Ubuntu builds run on Fedora unchanged; whisper.cpp transcribed a clip here without a package being added, and llama.cpp came down in its Vulkan build and found the card. That last part is not luck: kwin-libs requires libvulkan.so.1, so the loader is on every Plasma desktop by way of the compositor, and it recommends the Mesa drivers alongside itself.
This commit is contained in:
+22
-5
@@ -40,21 +40,38 @@ python3 -c 'import PyQt6.QtWidgets' 2>/dev/null || missing+=("python-pyqt6")
|
||||
|
||||
if ((${#missing[@]})); then
|
||||
warn "Missing: ${missing[*]}"
|
||||
say "Ubuntu X11: sudo apt install pulseaudio-utils xclip xdotool ffmpeg"
|
||||
say "Arch Wayland: sudo pacman -S --needed pipewire-audio wl-clipboard ydotool ffmpeg python-pyqt6"
|
||||
say "Ubuntu X11: sudo apt install pulseaudio-utils xclip xdotool ffmpeg"
|
||||
say "Arch Wayland: sudo pacman -S --needed pipewire-audio wl-clipboard ydotool ffmpeg python-pyqt6"
|
||||
say "Fedora Wayland: sudo dnf install pipewire-utils wl-clipboard ydotool ffmpeg-free python3-pyqt6"
|
||||
echo
|
||||
else
|
||||
ok "All dependencies present"
|
||||
fi
|
||||
|
||||
# 2. ydotoold --------------------------------------------------------------
|
||||
# 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.
|
||||
if [[ "${XDG_SESSION_TYPE:-}" != "x11" ]] && command -v ydotool >/dev/null; then
|
||||
if systemctl --user is-active --quiet ydotool 2>/dev/null \
|
||||
|| systemctl --user is-active --quiet ydotoold 2>/dev/null; then
|
||||
socket="${YDOTOOL_SOCKET:-${XDG_RUNTIME_DIR:-/tmp}/.ydotool_socket}"
|
||||
if [[ -w "$socket" ]]; 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 is running, but it did not put its socket at $socket"
|
||||
say "Point Dikte at the one it did make: export YDOTOOL_SOCKET=..."
|
||||
else
|
||||
warn "ydotoold is not running, auto-paste will not work"
|
||||
say "systemctl --user enable --now ydotool"
|
||||
say "systemctl --user enable --now ydotool (on Fedora: see the README)"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
Reference in New Issue
Block a user