"Show File" in Linux

When I hit "Show File" for a file attachement in Windows, the file is displayed in a nice Explorer window. In Linux, I just get a blank window with the file path shown (which can at least be copied).

I assume this is because of the lack of a filebrowser common to all Linux installations? In which case, would it be possible to have a user-preference available to select a file browser? For Linux users, it probably needn't clutter the Zotero prefs menu, but just be editable in about:config.
  • edited July 17, 2007
    Yeah, Firefox doesn't have a file launch() method on Linux. We could add a pref for this if it'd actually work—do all filebrowsers on Linux take a path as an argument?
  • Hi,
    If it would be possible to have a preference in which the user could enter the command to open the file, that would be great.

    I think that all that would be needed is a way to express the path to the containing folder of the file as a variable. Then the user would be responsible for discovering the appropriate command for the file browser so that it will open that folder in a window.

    Although it's hard to say for certain given the fact that there are many file managers for Linux & the BSDs, I'd really be surprised if any of them would not accept a path to a folder as a command-line argument in one way or another. But I don't think Zotero needs to take particular options and configurations into account, like the "--no-desktop" option for nautilus, for example, or the use of "kfmclient openURL 'url'" (in which "url" can be a path in the file system) to start konqueror, and so on.

    As a precedent, the "Download Statusbar" extension for Firefox does something similar in the configuration options for it's virus scanning feature.
    See: http://downloadstatusbar.mozdev.org/index.html
    The user enters the command for the virus scanner with whatever options are necessary, followed by a %1 to indicate the name of the file to be scanned. In the case of Zotero, the variable would represent the path to the folder that contains the file rather than the name of the file.

    This would not necessarily open the specified directory in the file manager with the desired file selected but not opened - I don't know how to do that in nautilus, which is what I use. But it would still be a useful feature for me, anyway, if it could be included as an option in the preferences.

    Thanks! And thanks for the work that you and your team are putting into Zotero, it's a wonderful tool.
  • Dan,
    AFAIK sybille is right; I doubt there's a generic enough way to call the many different commonly-used file managers in Linux for you to offer specific options. A text input for the command to run plus expandable variables for directory path and file name for use as arguments would be the best bet (unless anyone knows a smarter way).

    This might be a bit too 'raw' for the zotero prefs dialogue, hence my thought that it could just be offered without UI, to be edited in about:config.
  • It just occurred to me that FF's Download Manager calls up a file manager, by right-clicking on a downloaded file and selecting 'Open Containing Folder'. This seems to work on all platforms.

    Perhaps Zotero could use whatever method FF is using there?
  • Hi,
    If anyone's maybe thinking about this issue, I have another possibility for opening the directory containing the file in Linux, xdg-open: http://portland.freedesktop.org/xdg-utils-1.0/xdg-open.html

    Xdg-open (part of xdg-utilities) provides a generic command for opening anything with the user's preferred application. If a path to a directory is specified (as opposed to a file or URL), then the user's preferred file manager will be used. Thus, it's desktop agnostic and wouldn't require the user to set a specific argument anywhere in the Zotero/Firefox configuration.

    Thanks.
  • Is this being considered?

    I use Zotero mostly on linux. Now and again though I have a zotero session in OS X or XP, and going back to linux it feels a bit disadvantaged ...
  • OK, implemented in the latest 1.0 dev build. (Thanks CB for the pointer to the Fx Download Manager.)
  • Marvellous, thank you.
  • Thank you very much!
Sign In or Register to comment.