Added in v0.18.0
Start dictation from desktop shortcuts and scripts
Vocalinux can hand hotkey duty to your desktop. A running instance answers on the session D-Bus, so a GNOME or KDE custom shortcut, a sway or Hyprland bind, or any script can start and stop voice typing without Vocalinux reading your keyboard.
No /dev/input access
On Wayland the built-in listener reads /dev/input, which needs the input group. A compositor shortcut avoids that entirely.
Toggle, not push-to-talk
Your desktop sends the key press only. Press once to start, press again to stop.
Scriptable
Separate Start and Stop methods let scripts set a known state instead of flipping it.
The D-Bus interface
These names come from dbus_service.py in the Vocalinux source.
| Bus | Session bus |
|---|---|
| Bus name | com.vocalinux.Vocalinux |
| Object path | /com/vocalinux/Vocalinux |
| Interface | com.vocalinux.Vocalinux |
| Methods | Toggle, Start, Stop (no arguments) |
CLI commands
| Command | D-Bus method | Effect |
|---|---|---|
| vocalinux --toggle | Toggle | Start if idle, stop if active |
| vocalinux --start | Start | Start voice typing; does nothing if already running |
| vocalinux --stop | Stop | Stop voice typing; does nothing if already idle |
Calling D-Bus directly
The gdbus form is what the Flatpak documentation recommends: it is immediate and does not start another sandbox on every press. Swap Toggle for Start or Stop as needed.
user@linux:~$ gdbus call --session --dest com.vocalinux.Vocalinux --object-path /com/vocalinux/Vocalinux --method com.vocalinux.Vocalinux.ToggleSet it up
- 1
Turn on External Activation
Open Settings → Shortcuts (the Keyboard Shortcuts group on the Dictation page) and turn on External Activation (Desktop Shortcut). It applies immediately and the built-in key listener stops.
- 2
Pick the command
On a native install, use vocalinux --toggle. On Flatpak, use the gdbus call shown below, because vocalinux --toggle is not on the host PATH.
- 3
Bind it in your desktop
Create a custom shortcut in GNOME or KDE, or a bind line in your sway or Hyprland config, that runs that command.
- 4
Test it
Focus a text field, press the shortcut, speak, then press it again to stop.
The same switch is stored as shortcuts.disable_internal_hotkey in ~/.config/vocalinux/config.json. Quit Vocalinux before editing that file by hand, or the running app can overwrite your change.
Binding the shortcut on each desktop
The key combination is your choice; the examples use Super+Shift+D. Only the command matters to Vocalinux. Menu names and config syntax belong to each desktop and can differ between versions.
GNOME
In Settings → Keyboard, open the custom shortcuts list, add a shortcut, enter vocalinux --toggle as the command and record your key combination.
KDE Plasma
Open System Settings → Keyboard → Shortcuts → Add New → Command or Script (older Plasma: System Settings → Shortcuts → Custom Shortcuts → Edit → New → Global Shortcut → Command/URL) and bind your keys to vocalinux --toggle.
bindsym $mod+Shift+d exec vocalinux --togglebind = SUPER SHIFT, D, exec, vocalinux --toggleIf your compositor cannot find vocalinux, its PATH may not include ~/.local/bin. Use the full path ~/.local/share/vocalinux/venv/bin/vocalinux for an installer setup, or the gdbus command above. More on tiling compositors in voice typing on Hyprland and sway.
Limitations and gotchas
- Toggle only. Push-to-talk needs the key release, which a desktop shortcut never delivers.
- The command needs a session bus. From SSH or a systemd unit without
DBUS_SESSION_BUS_ADDRESS, it fails with a non-zero exit. - While a transcription is still processing, Toggle cancels it, the same as pressing the recording hotkey again (since v0.18.4).
- On Flatpak,
flatpak run com.vocalinux.Vocalinux --togglealso works but starts a sandbox on each press; prefergdbus. - This changes how dictation starts, not how text is typed. If text does not appear, see Wayland text injection.
FAQ
Can a desktop shortcut do push-to-talk?
No. A desktop shortcut only sends the key press and never the release, so it can toggle dictation but cannot hold-to-talk. Use the built-in listener if you need push-to-talk.
Will vocalinux --toggle launch Vocalinux if it is not running?
No. It forwards the command to a running instance over D-Bus and exits. If no instance answers, it logs that it could not reach a running Vocalinux and exits with status 1.
Do I still need the input group?
Not for starting and stopping dictation. With External Activation on, Vocalinux does not read /dev/input for the hotkey. Text injection is unaffected and keeps its own requirements.
What happens if the D-Bus service cannot start?
Vocalinux shows an External activation unavailable notification and falls back to the internal keyboard shortcut, so you are never left without a way to start or stop dictation.
Do per-language shortcuts work with External Activation?
No. Per-language shortcuts belong to the built-in listener, and the whole listener family stops when External Activation is on. Turn External Activation off to use them again.
Related: shortcuts and voice commands, GNOME and KDE, Flatpak and troubleshooting.
Bind your dictation key
Install Vocalinux, turn on External Activation, and let your desktop own the shortcut.