mirror of
https://github.com/yusufipk/dikte.git
synced 2026-09-11 10:56:10 +00:00
Merge pull request #12 from Murqin/fedora-install
Write down what installing on Fedora takes
This commit is contained in:
@@ -31,6 +31,23 @@ systemctl --user enable --now ydotool # needed for auto-paste
|
|||||||
dikte # the settings window opens on first run
|
dikte # the settings window opens on first run
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
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)" \
|
||||||
|
| sudo tee /etc/systemd/system/ydotool.service.d/override.conf >/dev/null
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable --now ydotool
|
||||||
|
```
|
||||||
|
|
||||||
On Ubuntu/GNOME X11, recording uses PulseAudio and clipboard/paste use the X11
|
On Ubuntu/GNOME X11, recording uses PulseAudio and clipboard/paste use the X11
|
||||||
tools instead:
|
tools instead:
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,23 @@ systemctl --user enable --now ydotool # otomatik yapıştırma için
|
|||||||
dikte # ilk açılışta ayarlar penceresi gelir
|
dikte # ilk açılışta ayarlar penceresi gelir
|
||||||
```
|
```
|
||||||
|
|
||||||
|
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
|
||||||
|
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)" \
|
||||||
|
| sudo tee /etc/systemd/system/ydotool.service.d/override.conf >/dev/null
|
||||||
|
sudo systemctl daemon-reload
|
||||||
|
sudo systemctl enable --now ydotool
|
||||||
|
```
|
||||||
|
|
||||||
Ubuntu/GNOME X11 için kayıt PulseAudio üzerinden, pano ve yapıştırma ise X11
|
Ubuntu/GNOME X11 için kayıt PulseAudio üzerinden, pano ve yapıştırma ise X11
|
||||||
araçlarıyla çalışır:
|
araçlarıyla çalışır:
|
||||||
|
|
||||||
|
|||||||
+18
-5
@@ -40,21 +40,34 @@ python3 -c 'import PyQt6.QtWidgets' 2>/dev/null || missing+=("python-pyqt6")
|
|||||||
|
|
||||||
if ((${#missing[@]})); then
|
if ((${#missing[@]})); then
|
||||||
warn "Missing: ${missing[*]}"
|
warn "Missing: ${missing[*]}"
|
||||||
say "Ubuntu X11: sudo apt install pulseaudio-utils xclip xdotool ffmpeg"
|
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 "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
|
echo
|
||||||
else
|
else
|
||||||
ok "All dependencies present"
|
ok "All dependencies present"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# 2. ydotoold --------------------------------------------------------------
|
# 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. 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
|
if [[ "${XDG_SESSION_TYPE:-}" != "x11" ]] && command -v ydotool >/dev/null; then
|
||||||
if systemctl --user is-active --quiet ydotool 2>/dev/null \
|
socket="${YDOTOOL_SOCKET:-${XDG_RUNTIME_DIR:-/tmp}/.ydotool_socket}"
|
||||||
|| systemctl --user is-active --quiet ydotoold 2>/dev/null; then
|
alive() { pgrep -x ydotoold >/dev/null 2>&1; }
|
||||||
|
if [[ -w "$socket" ]] && alive; then
|
||||||
ok "ydotoold is running (auto-paste ready)"
|
ok "ydotoold is running (auto-paste ready)"
|
||||||
|
elif systemctl is-active --quiet ydotool 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
|
else
|
||||||
warn "ydotoold is not running, auto-paste will not work"
|
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
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user