-
Notifications
You must be signed in to change notification settings - Fork 407
Help: Getting "Viewer cannot find Zathura window ID" error on MacOS #2581
Description
Description
I'm still facing the Viewer cannot find Zathura window ID problem when executing the command \lv (or :VimtexView). I'm working on MacOS Monterey 12.4.
I followed this tutorial to setup zathura, but it's basically the same as what this comment summarises, since the tutorial actually refers to it.
Recall that I installed zathura with --HEAD --with-synctex and it is able to open PDF files normally (like $ zathura "xxx.pdf") but not with VimTeX.
Two problems that could be relevant:
Problem with dbus
dbus can get started but not running. After installing dbus using Homebrew
$ brew install dbus
I tried starting it first by the command
$ brew services start dbus
where I got the following error:
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /Users/lutalli/Library/LaunchAgents/org.freedesktop.dbus-session.plist` exited with 5.
Then I checked brew services info dbus, which returned
dbus (org.freedesktop.dbus-session)
Running: ✘
Loaded: ✔
Schedulable: ✘
which meant that it was loaded already. So my guess was that I can't start it when it's already started. To verify this, I stopped dbus:
$ brew services stop dbus
Stopping `dbus`... (might take a while)
==> Successfully stopped `dbus` (label: org.freedesktop.dbus-session)
and tried starting it again, which succeeded:
$ brew services start dbus
==> Successfully started `dbus` (label: org.freedesktop.dbus-session)
In addition, I also tried restarting it (which is supposed to do the same thing):
$ brew services restart dbus
Stopping `dbus`... (might take a while)
==> Successfully stopped `dbus` (label: org.freedesktop.dbus-session)
==> Successfully started `dbus` (label: org.freedesktop.dbus-session)
Anyway, it looks like that dbus can be started normally. However, everytime I run brew services info dbus it shows that dbus is not running even though it's loaded:
$ brew services info dbus
dbus (org.freedesktop.dbus-session)
Running: ✘
Loaded: ✔
Schedulable: ✘
I suppose it should be running, as the tutorial suggests:
Rebooting MacOS and restarting the terminal (iTerm2 in my case) didn't work.
I tried the command brew services run dbus but I got a similar error as above:
$ brew services run dbus
Bootstrap failed: 5: Input/output error
Try re-running the command as root for richer errors.
Error: Failure while executing; `/bin/launchctl bootstrap gui/501 /usr/local/opt/dbus/org.freedesktop.dbus-session.plist` exited with 5.
This discussion describes a similar case but it didn't mention how to get it running.
I also tried some solutions from the answers to this question on StackOverflow but so far none of them worked for me.
Problem with xdotool
xdotool doesn't work at all. I installed it with Homebrew as well as XQuartz. Although the installation seemed successful, almost none of its functions is working - for example, xdotool search never returns anything and xdotool type does nothing (also notice that no errors nor warnings are returned):
$ xdotool search discord
Defaulting to search window name, class, classname, and role
$ xdotool type "hello"
$
This issue very likely describes the same case. The description is relatively short but the issue has got a couple of thumb-ups so I guess it's a common issue. I haven't found any solution yet.
I assume xdotool is necessary because, as this thread mentioned before, as well as in the tutorial, VimTeX uses xdotool to get the window ID of zathura.
Any idea how to solve these?
Steps to reproduce
Minimal test .tex file:
\documentclass{article}
\begin{document}
Test
\end{document}Steps to reproduce:
nvim minimal.tex\lvor:VimtexView- Seeing it shows the error
VimTeX: Viewer cannot find Zathura window ID!
Expected behavior
No response
Actual behavior
No response
Do you use a latexmkrc file?
No
VimtexInfo
System info:
OS: macOS 12.4 (21F79)
Vim version: NVIM v0.8.1
Has clientserver: true
Servername: /var/folders/zx/08zvm7jx3k70j_1_nyt1lc_80000gn/T/nvim.lutalli/Q5PK1q/nvim.30467.0
VimTeX project: textest
base: textest.tex
root: /Users/lutalli/Workspace/TeXTest
tex: /Users/lutalli/Workspace/TeXTest/textest.tex
main parser: current file verified
document class: article
compiler: latexmk
engine: -pdf
options:
-verbose
-file-line-error
-synctex=1
-interaction=nonstopmode
callback: 1
continuous: 0
executable: latexmk
viewer: Zathura
xwin id: 0
cmd_start: zathura -x "/usr/local/Cellar/neovim/0.8.1/bin/nvim --headless -c \"VimtexInverseSearch %{line} '%{input}'\"" --synctex-forward 1:1:'/Users/lutalli/Workspace/TeXTest/textest.tex' 'textest.pdf'&
qf method: LaTeX logfile