How does Zotero choose the file manager?
I have my xdg-open set up to open folders with a specific file manager.
However, when I right click on a item and select "Show File", Zotero opens the folder with another file manager.
It uses nautilus to open the folder, and I would like to know who told him to do that.
How is the file manager chosen?
I want to use my own.
I think Zotero should ask xdg-open to open the folder.
He knows the right file manager to use.
However, when I right click on a item and select "Show File", Zotero opens the folder with another file manager.
It uses nautilus to open the folder, and I would like to know who told him to do that.
How is the file manager chosen?
I want to use my own.
I think Zotero should ask xdg-open to open the folder.
He knows the right file manager to use.
https://github.com/zotero/zotero/blob/da392518ed22ead04c1c7cb617fee9bfdba87ec3/chrome/content/zotero/zoteroPane.js#L4668-L4677
https://github.com/zotero/zotero/blob/da392518ed22ead04c1c7cb617fee9bfdba87ec3/chrome/content/zotero/xpcom/zotero.js#L954-L993
https://github.com/zotero/zotero/blob/da392518ed22ead04c1c7cb617fee9bfdba87ec3/defaults/preferences/zotero.js#L194
Zotero tries to use the Mozilla platform's
file.reveal()
method. If that isn't available (as on Linux), it tries to launch the parent directory via the OS, and if that fails it falls back to xdg-open. But this all depends entirely on your system.You can view the debug output view Tools → Developer → View Output to see exactly what it's doing for you.
So it's not mozilla file.reveal() as it is not available on linux.
What does it mean "launch the parent directory via the OS"?
And what does this `file.launch()` (https://github.com/zotero/zotero/blob/da392518ed22ead04c1c7cb617fee9bfdba87ec3/chrome/content/zotero/xpcom/zotero.js#L961) do? Where does it come from?
I have `extensions.zotero.fallbackLauncher.unix` set to the default `/usr/bin/xdg-open`, which in turn knows how to open the folder.
Under linux you call xdg-open directly, without Mozilla's file.reveal() or that file.launch() that I don't know what it does.
https://www.zotero.org/support/kb/file_handling_issues#pdfs_opening_in_wrong_application_on_linux_systems
It only says "Notifier.trigger('open', 'file', [3520])".
What I'm supposed to do with this?
> there's no unified method of file revealing/launching on Linux
Just calling `xdg-open` would work on most systems.
> you'd have to dig into your system settings to see what's specifying Nautilus
Zotero is calling something that opens the directory.
My system is not opening the folder on its own.
So what system function is Zotero calling?
What is this `file.launch()`?
```
(3)(+12712849): Zotero.Items.keepParents() is deprecated -- use Zotero.Items.keepTopLevel() instead
(4)(+0000004): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3521, '']
(4)(+0000016): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3521, '']
(4)(+0000003): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3521, '']
(4)(+0000003): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3521, '']
(3)(+0000003): MIME type application/pdf cannot be handled internally
(4)(+0000001): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3521, '']
(4)(+0001360): SELECT IA.itemID FROM itemAttachments IA NATURAL JOIN items I LEFT JOIN itemData ID ON (IA.itemID=ID.itemID AND fieldID=13) LEFT JOIN itemDataValues IDV ON (ID.valueID=IDV.valueID) WHERE parentItemID=? AND linkMode NOT IN (3) AND IA.itemID NOT IN (SELECT itemID FROM deletedItems) ORDER BY contentType='application/pdf' DESC, value=? DESC, dateAdded ASC [3521, '']
(3)(+0000002): Revealing /home/[ABRIDGED]/Zotero/storage/VA8CWAWX/Grennan et al. - GIANT The 1-Billion Annotated Synthetic Bibliogra.pdf
(3)(+0000444): Notifier.trigger('open', 'file', [3520]) called [observers: 4]
(3)(+0000341): itemTree.render(). Displaying Item Tree
(3)(+0000357): itemTree.render(). Displaying Item Tree
(3)(+0001507): itemTree.render(). Displaying Item Tree
```
Little drawback: In thunar the file already gets selected, in spacefm not, just the folder is opened.
By the way: Thunar call must be quite special, tried 1st to replace it with a script showing the parameters given to it (to maybe do sth. like ’spacefm -s set selected_filenames ’), but that script did not even start, instead spacefm got opened. So don't blame me, if things will start to work unexpected ;-)
Is there no way around this?
https://forums.zotero.org/discussion/109431/selected-row-folder-is-not-shown
I just updated with a comment, could you check it out please?