Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Controlling the display name of mount points in Finder.

Finder displays the remote name of NFS mounts instead of the local name. How can I make it so that, for example, mounting server:/docs/User1 on ~/Documents will appear as Documents instead of User1 in Finder? I have a ton of mounts that appear one way in the CLI and another name in the GUI. Now, imagine how confusing it gets when I mount server:/docs/User1 on ~/Documents, server:/music/User1 on ~/Music, server:/pics/User1 on ~/Pictures and see a bunch of folders named User1 now in my home dir instead of what they SHOULD be.


Any help resolving this issue would be greatly appreciated!

Posted on Mar 17, 2013 10:11 AM

Reply
18 replies

Mar 17, 2013 11:20 PM in response to rccharles

I think you misunderstood the question. Or maybe you didn't read it. To clarify:


I want to make Finder display the name of the mount point, NOT the name of the remote folder. If I could get it to keep the original icon instead of the net drive icon as well, that would REALLY make my day.


So server:/docs/User1 mounted on ~/Documents should be displayed as Documents, not User1

I guess maybe this isn't so much Finder's doing, as it happens in all system file browser components. So the solution to my question must apply across all the system dialogs as well. I don't want to open a file upload dialog in Chrome and have to search through a load of folders with the same name.


Also, please do not suggest mounting somewhere else, or renaming the folders on the server.

Mar 18, 2013 9:19 AM in response to radman89

I really have only a vague sense of what you're trying to do - your question isn't very clear on the details - but I think you're approaching the problem from the wrong direction. in multi-user contexts (I'm assuming that this is multi-user), file systems are usually structured with separate areas for users, not by data type. in other words, you seem to have:


server:/docs/User1

server:/docs/User2

server:/docs/User3


when you ought to have:


server:/Users/user1/docs

server:/Users/user2/docs

server:/Users/user3/docs


if you work against file system conventions you're always going to give yourself headaches.


P.s. Please don't snap at people. You're here asking for free advice, and this site gives remarkably good value for what you spend. But nothing's really free in this world, right? Consider being gracious to people who give you answers you don't want as part of the fee we charge.

Mar 18, 2013 8:12 PM in response to twtwtw

Sorry if it seemed like I snapped, I just wanted to clarify my question. I apologize if I hurt anyone's feelings.


I thought it was a pretty straightforward question and that the details of my specific situation would be irrelevant, so I made up a generalized example to illustrate a scenario which would present the behavior I wish to change.


Now I'll divulge a bit more detail, to at least give you a better picture of what I'm doing, even if it doesn't necessarily pertain to my question.


I use different filesystems for different data types. The server is running FreeBSD, and storage is all in ZFS pools. I have the data stored separately by type, because it really does make sense to do it that way. Videos and music have compression and dedup off, on fast access storage, and the filesystem is tuned for large files and fast sequential reads. Documents and downloads compress well, and these files typically do not require streaming from disk so the storage can be slower without it being a problem. Other data types benefit from other configurations. Separating datasets like this also allows me to tune both the filesystems on the server and the mount parameters on the client for each dataset. Furthermore, it can help keep storage responsive under load.


I realize that this may seem completely asinine, but none of the above is relevant to my question. I simply wish to know if it is possible for OS X to be configured to display the name of the directory upon which a remote filesystem has been mounted, instead of displaying the name of the remote directory. In other words, I wish for the GUI to use the same naming conventions as the CLI.


Another example:

workstation:~ coder$ mkdir "Shared Music"
workstation:~ coder$ mount -o vers=4 fileshare:/music "Shared Music"
workstation:~ coder$ ls
Desktop Downloads Movies Pictures Shared Music
Documents Library Music Public
workstation:~ coder$ ls "Shared Music"
Sublime


In the Cocoa interface however, that directory would be displayed as "music", but I want it to display "Shared Music".


I have already figured out my own workarounds, I would simply like to know if there is a way to change this behavior in OS X, if only for my own knowledge.

Mar 18, 2013 9:45 PM in response to radman89

Out of my area of expertise really, but a quick google led me to this post from an older discussion, which leads me to think you should try a mount point rather than just a name in your mount command. i.e.


mount -o vers=4 fileshare:/music /Volumes/Shared\ Music


I don't have a remote device to test it with, sorry, so I can't tell you if it works as advertised.

Mar 18, 2013 10:49 PM in response to twtwtw

Well, you can't mount on a directory that doesn't exist, and mkdir /Volumes/Music && mount server:/music /Volumes/Music still shows up as music instead of Music. I did notice that some magic occured and /Volumes/Music gets removed automatically when I unmount, but that's trivial. Thanks for looking into it anyway, but I guess my best hope is that the guy at Apple who wrote this part of the OS will respond with something along the lines of "I'm surprised you are the first person to ask for this, just use `defaults write -g NSMountsUseRemoteName FALSE' to change that behavior."


*fingers crossed*

Mar 19, 2013 5:30 AM in response to radman89

Well, last suggestion I have to offer is low-brow but effective. Use what I'm going to colorfully call shill folders: an extra directory layer added solely for naming purposes. In every UserX folder, add a new folder with the display name you want, dump all of the contents into that new folder, then use the new folder as the mount point. In other words, use this file structure:


server:/docs/User1/docs

server:/docs/User2/docs

server:/docs/User3/docs


If you have a lot of folders to handle it's trivial to script in applescript.


As far as getting a response from 'the guy at apple'... It would probably be a more effective use of your time to write it in a letter to Santa and mail it to the North Pole. At least that way you'll only be disappointed one day out of the year...

Mar 19, 2013 10:59 AM in response to twtwtw

well, twtwtw how adventures are you? For awhile, I had several Ubuntu linux machines setup in parallels. I had my login scripts ( .bash_profile ) shared by mac os & linux os. Get Oracle Virtual Box and run Ubuntu/Windows/etc. in it.


I thought you needed to do all the mounts in /Volumes for the finder to see them? It's not clear to me where the mounts were taking place. Maybe I had the info wrong?


I did run across the page on how to change the folder icon.

http://www.jcsenterprises.com/Japamacs_Page/Blog/A212A8B7-C222-46E5-9AD6-5FE950A 244C5.html


This page talks about the command line equivalent.

http://apple.stackexchange.com/questions/6901/changing-a-file-or-folder-icon-usi ng-the-terminal


You may have to adjust for a remote server. Don't know. If it doesn't work on the client, may you could create the files on the server. Maybe using those funny resource names.


Have you played around with renaming the folder?


How about the ln command?


Robert

Mar 19, 2013 11:16 AM in response to rccharles

rccharles wrote:


I thought you needed to do all the mounts in /Volumes for the finder to see them? It's not clear to me where the mounts were taking place. Maybe I had the info wrong?


No, you can mount anywhere; /Volumes is the default. All mounting means from a file system perspective is attaching one tree-hierarchy to another. It usually make sense to do that down near the root, but there are sometimes reasons to do otherwise. And creating a symbolic link wouldn't really solve the problem: the mounted file system has to be attached before a link can point to it. I suppose you could mount the volume and hide it from the user so that they only see the link, but I think that would come with its own set of headaches.


As for the cross-platform stuff, I'm a Mac guy. All I know about Ubuntu is that it's a great word to shout at people on Halloween night.

Mar 19, 2013 12:56 PM in response to twtwtw

I know you could mount them anywhere, though I don't think that I have tried.


I was wondering if the Finder would see the mount point if it wasn't in Volumes.


Ubuntu. Those folks solve all issues with a set of terminal commands. It's a good way of increasing your Unix skills. The last time I used Ubuntu they changed the GUI so I couldn't figure out how to troll around the filesystem. 😢


Robert

Mar 19, 2013 1:34 PM in response to twtwtw

Thanks for the idea, but as I already mentioned, I don't need suggestions for a workaround, I came up with one on my own when I first discovered this behavior. I'm in fact doing as you describe, nesting one layer deeper to have the name on the server match what I expect on the client. This works, but it's a bit clunky. And it's annoying that I have to do this at all, simply because OS X behaves inconsistently. I don't have the same problem on Windows; NFS shares mounted on folder "ABC" do not decide to call themselves "ZYX" in the user interface. Same with the X11 toolkits. OS X is the odd one out. And it's just Cocoa it seems; X11 apps on OS X behave the same as they would on other operating systems.


So again, I've already implemented a workaround, I'm just curious if it is possible to change the behavior.

Mar 20, 2013 9:46 AM in response to radman89

This works, but it's a bit clunky. And it's annoying that I have to do this at all, simply because OS X behaves inconsistently.


This is called a WAD -- "working as designed" as in crunch it up & throw it in the trash can or UE -- User Error as in u-turn.


mount -o vers=4 fileshare:/music /Volumes/Shared\ Music


Unix defines the mount command to work this way. The mount point "Shared Music" is going to get overlay with the mount name. It makes sense when you think about it. You do not want to get confused between the mkdir and the remote name. Remember mount is used for all external media. You do not want you flashdrives label: a: b: z: etc do you?


If you do not like it, get in your time machine. Go back to Murray Hills, NJ. Find Bell labs. Speak to Dennis M. Ritchie and Thompson. Ask for a change. If you time macine is out of q-ton, you will have to live with it.

The UNIX Time-Sharing System, Dennis M. Ritchie and Ken Thompson, Bell Laboratories



Mar 20, 2013 11:48 AM in response to rccharles

I am very familiar with how mounting works, this ain't my first rodeo.


Mounting overlays the FILESYSTEM, not the NAME. If as defined by UNIX it is supposed to work the way you described, explain to me why the UNIX layer of OS X doesn't work that way. I showed this on the lines immediately following the one you quoted.


To quote the PDF you reference, "The effect of mount is to cause references to the heretofore ordinary file to refer instead to the root directory of the file system on the removable volume." References to the ordinary file are in fact BROKEN when the name changes, they effectively refer to nothing. So by definition, the name should NOT change. It actually makes sense if you think about it. I intentionally mounted a filesystem at a point with a name that MEANS something. In my example, I specifically created the mount point using the mkdir command and gave it the name I wanted it to have. Displaying a different name in Finder is confusing. Try it for yourself:


$ mkdir mnt

$ ln -s mnt usb

$ ls -l usb

lrwxr-xr-x 1 ryan staff 3 Mar 20 12:35 usb -> mnt


The symbolic link "usb" references the "mnt" ordinary file (directory). Assuming an unmounted usb drive attached as disk1, hfs filesystem on slice 2, mount the filesystem onto "mnt" and notice what happens:


$ mount -t hfs /dev/disk1s2 mnt

$ ls -l usb

lrwxr-xr-x 1 ryan staff 3 Mar 20 12:35 usb -> mnt

$ ls mnt

file1 file2

$ ls usb

file1 file2

$ ls

mnt usb


The usb symbolic link still references the mnt directory. This demonstrates that the BSD (or UNIX) level behaves as expected, by keeping the name of the mount point instead of adopting the name of the mounted filesystem. In Finder, you wouldn't be able find the mnt directory. It would be displayed as the label of the mounted filesystem. Let's simulate the chaos that would ensue if the name of the mounted filesystem was adopted:


$ mv mnt THUMB\ DRIVE

$ ls usb

usb

$ ls -l usb

lrwxr-xr-x 1 ryan staff 3 Mar 20 12:35 usb -> mnt

$ ls

usb THUMB DRIVE


The "usb" link still references "mnt", but "mnt" was renamed "THUMB DRIVE" so the link now points to nothing.


The fact that Cocoa displays the name of the volume instead of the name of the point at which it is mounted is purely cosmetic; the actual underlying path is structured as it should be, with the name of the mount point remaining unchanged. The behavior of the core OS is exactly what I want to achieve in the Cocoa GUI elements.


Yes, it currently Works As Designed, but the design would appear to be Apple's (or NeXT's perhaps, I haven't tried this on historic versions of the OS), not that of the creators of UNIX. I'm asking if the Design includes the obscure ability to control the displayed name of mount points in system-wide Cocoa UI elements. Please don't say I'm doing it wrong. I just want to know if something is possible. I hope this doesn't seem unreasonable.

Jun 12, 2013 5:21 PM in response to radman89

I don't have a solution to offer. Just the commiseration of a shared problem. In my case, what would be helpful would be an arbitrary name of my choosing, since neither the server name nor the remote directory are quite right.


I'm in a primarily Windows-based company and there are several volumes that I need to use that each mount on the Mac as "public" which is completely unhelpful. Swapping that for the server name would be much better.


However, the desired behavior would be if I could assign the mount point my own name. Since everyone commonly referes to those volumes by their mapped Windows drive letters, renaming them I and T on the Mac would be the clearest from a user perspective. I don't want to rename the remote volume, just the icon that takes me there - essentially like a file alias can be renamed to whatever you want and still points to the same location.


If anyone has cracked this nut, I'd really appreciate the cracker. :-)

Controlling the display name of mount points in Finder.

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.