You are not logged in.
Hi,
I am trying to make evince work with atom (the editor), but I have some problems.
The issue seems to be that when the FindDocument method of `org.gnome.evince.Daemon` is called, it timeouts.
I have no idea how to fix this problem and I didn't find any documentation online.
Here is what I type.
dbus-send --print-reply --session --dest=org.gnome.evince.Daemon /org/gnome/evince/Daemon org.gnome.evince.Daemon.FindDocument 'string:file:///home/user/Desktop/testtex/test.pdf' boolean:trueThen I wait a bit and get the following answer (independently of the file existing or not).
Error org.freedesktop.DBus.Error.NoReply: Message recipient disconnected from message bus without replyingIf I replace the boolean by "false", I get an instantaneous answer but nothing happens and it prints.
method return time=1621485396.173403 sender=:1.148 -> destination=:1.147 serial=3 reply_serial=2
string ""If instead I call the method RegisterDocument, I get the same answer. If I call the method UnregisterDocument (with the same document), it says
Error org.freedesktop.DBus.Error.InvalidArgs: URI not registeredI don't know what these methods are supposed to do, and I have no idea how to debug that. I thought the issue might be that I don't use gnome desktop, but the same problem happens with org.x.reader.Daemon and org.mate.atril.Daemon.
Does anybody have an idea for debugging that?
Last edited by MrNeuneu (2021-05-20 07:29:46)
Offline
I noticed that what I am trying to do works when the document is already opened in evince. I thought this dbus command should open evince, maybe it is not the case? In any case, I just have to open the document with evince before calling dbus, so I mark it as solved.
Offline
Why are you not just using
evince $file? That dbus will only work when evince is already started (as it is the provider of that DBUS endpoint)
Offline
Thanks for your answer. Maybe I should explain more the context. I am trying to fix the atom package atom-latex, more specifically this file. From that file and its dependencies, I inferred that dbus should open a new evince window if there is none with the requested document. Since that doesn't work like this on my system, I thought it was the problem. Otherwise, I don't understand how this code is supposed to open evince for the first time if it's not already running. So you confirm dbus doesn't launch a new evince instance?
My solution to make atom work was simply to add a line to launch evince if it's not running.
Offline
I believe that this dbus command should open a new evince window. For instance, here, it is said it does if I understand correctly (the paragraph that starts with "This part works, much to my surprise.", they speak about a new evince window).
PS: I unmarked as solved.
Last edited by MrNeuneu (2021-05-20 07:30:06)
Offline