Jump to content

Mount network shares with automatic discovery


Recommended Posts

This is a workflow to mount your network shares with automatic discovery. No configuration or bookmarks required!

 

Download stable version. Please report problems here. Your computer won't explode and your shares are safe, I promise.

 

screenshot.png

screenshot-unmount.png

 

Troubles?

Make sure that both, Apple Filing Protocol (afp) and Samba (short smb, QNAP calls it "Microsoft Network") are enabled on your NAS. Due to the nature of the protocols and the available tools on OSX, both of them are required in order to disover network shares in your network. Also note that already mounted shares are not listed in Alfred. Enable guest access to the NAS, not for a specific share, but for the system in general if things don't work.

 

 

The source code is available here: https://github.com/pstadler/alfred-mount

Edited by Patrick Stadler
Link to comment

Try to enable guest access to the NAS, not for a specific share, but for the system in general. Also make sure, that both AFP and SMB services are activated.

 

If this doesn't help, open Terminal.app, run the following commands and post the output here.

 

dns-sd -B _afpovertcp._tcp

smbutil view -g //<HOSTNAME-OF-YOUR-NAS>   (e.g. smbutil view -g //my-nas.local)

The seconds command is used by alfred-mount for getting a list of available shares as a guest, that's why you should enable guest access.

Edited by pstadler
Link to comment

mmh... doesn't help

MacBook-Pro-de-Benoit:~ nibelune$ dns-sd -B _afpovertcp._tcp
Browsing for _afpovertcp._tcp
DATE: ---Fri 22 Mar 2013---
16:48:34.168  ...STARTING...
Timestamp     A/R Flags if Domain                    Service Type              Instance Name
16:48:34.168  Add     3  6 local.                    _afpovertcp._tcp.         MacBook Pro de Benoît
16:48:34.168  Add     3  5 local.                    _afpovertcp._tcp.         MacBook Pro de Benoît
16:48:34.168  Add     3  5 local.                    _afpovertcp._tcp.         Freebox Server
16:48:34.168  Add     3  6 local.                    _afpovertcp._tcp.         Freebox Server
16:48:34.169  Add     2  5 local.                    _afpovertcp._tcp.         readynas (AFP)
^C
MacBook-Pro-de-Benoit:~ nibelune$ smbutil view -g //readynas
Share                                           Type    Comments
-------------------------------
media                                           Disk    Media Server Share
backup                                          Disk    Backup Share
resources                                       Disk    Resources Share
IPC$                                            Pipe    IPC Service (readynas)
softwares                                       Disk    Software Share

5 shares listed

Edited by nibelune
Link to comment

For all QNAP users: 
 
To have the automatic detection of Shares working you have to activate beside the Apple Networking (AFP) also the Microsoft Networking on your QNAP NAS under "Network Services" > "Microsoft Networking".
 
MS-Networking_QNAPs.jpg

 

 

Link to comment
  • 1 year later...
  • 2 years later...

Glad to hear that. I'm using it frequently, means you can count on an update if this should break in the future.

 

Regarding your question: Enabling SMB in "System Preferences > Sharing > File Sharing > Options..." could potentially solve this problem. Please let me know if this works for you.

Edited by pstadler
Link to comment
  • 7 months later...

Whoa! Just saw this months later. Still working fine in Oct 2017!

 

Can you update the workflow so if I know the name of the shared folder I can just type it in? Then hopefully that either mounts it straight away or brings up a login prompt?

mount music

Bonjour is great but it's also kinda slow when you have multiple shares. Thanks so much.

 

P.S. If you have even more time could you implement a shortcut key to save a folder as a favorite? For example, CMD + Enter pins a folder so that next time "mount" is envoked it displays the Favorite folders beneath and users could select them without waiting for auto discovery. This could save time also. Thanks. 

Edited by Kevllar
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...