How to get Thunderbird to open a UNC link in Explorer?
We use internal notification emails for our build pipeline which include a link to the build logs in this form:
<a href="\\server\logs\buildid">Logs</a>
In Outlook, the clicking the link opens Explorer at the href path. In Thunderbird, nothing happens. Also, Copy Link Location does not work for these links, so I can't even navigate manually.
Tutte le risposte (10)
I found some information that explains why links to local files are disabled by default, but lists some workarounds for UNC shares:
It appears you have to first edit the user.js file to allow access, and then enter the correct UNC path. Untested by me.
sfhowes said
It appears you have to first edit the user.js file to allow access, and then enter the correct UNC path. Untested by me.
Actually, it says you have to switch to "file://" syntax. I did actually try this already but it does not produce the correct result.
"file://server/share" links open in your browser. "\\server\share" links should open in explorer. Basically, Outlook runs the shell file association on links. UNCs go to Explorer. URLs go to the browser.
My reading of the instructions suggests you have to enable the access in user.js and then use this syntax: file://///servername/share/file.ext
Like I said, the file:// syntax does not produce the correct behaviour. It sends the file/folder to the browser, not to ShellExecute.
Is this the correct place for bug reports? Does anyone from Mozilla actually look at this?
re : It sends the file/folder to the browser So you are saying that the file is opening correctly, but it is in a browser tab and not in a specific app/Explorer window.
I was under the impression that it is supposed to put a UNC from Windows Explorer directly into a wiki/browser page. So it can be used in an internal intranet situation. Maybe I was mistaken?
re :Is this the correct place for bug reports? Bug reports: https://bugzilla.mozilla.org/home
Toad-Hall said
re : It sends the file/folder to the browser So you are saying that the file is opening correctly, but it is in a browser tab and not in a specific app/Explorer window. I was under the impression that it is supposed to put a UNC from Windows Explorer directly into a wiki/browser page. So it can be used in an internal intranet situation. Maybe I was mistaken?
No, UNC links are not opening at all. I don't know what it is "supposed" to do but let me try to summarise:
Observed behaviour
file://server/path link: Thunderbird: opens directory list in browser Outlook: opens directory list in browser
\\server\path link: Thunderbird: does nothing Outlook: open directory in Explorer
Expected behaviour
file://server/path link: Thunderbird: opens directory list in browser Outlook: opens directory list in browser
\\server\path link: Thunderbird: opens directory in Explorer Outlook: opens directory in Explorer
I'm still unsure what the problem is. The info in the link has already been mentioned that using \\server\path link is not going to work.
If you're linking to a file in a UNC path (you cannot use an operating-system-specific path eg: \\servername\share\file.ext), you need to use proper URI syntax for local file references, so you will need to specify the path thusly: file://///servername/share/file.ext (needs scheme identifier file: followed by five /////)
So according to your comment: Observed behaviour file://server/path link: Thunderbird: opens directory list in browser
This implies you are seeing the file correctly, but in a browser, so is it working in so far as it is opening in a browser ?
Ah, I see the problem. Outlook does some manipulation to link when it copies them.
I sent an email from Thunderbird with two links, one using the "file://\\server\" syntax and one using "\\server\".
When viewed in Outlook, the unc link has been re-formatted to the file:// syntax (as viewed on the tooltip), but the Copy Hyperlink context menu option copies but link styles as local file references. So basically, it's converting file:// references to local refs.
The local refs have a significant advantage over file:// refs though. They open using the local file association rules. file:// refs open in a single application (usually the browser) irrelevant of the type of file they are.
This is annoying as the browser is does not have file type specific tools and functions like dedicated apps do. For example, for parsing log files, Notepad++ is much more effective than a browser.
The question now becomes, how can I make Thunderbird behave like Outlook in this regard and respect local file association rules for file:// links?