I have two OS X machines that are "sharing" each other right now. I want to use emacs rather than finder to browse one machine from the other. How do I do this?
2 Answers
To access both machines from each other using a uniform syntax, then use TRAMP. For example, to open DIRED buffer on the remote machine:
C-x C-f /ssh:hostname:/path/to/folder RET
where you can replace hostname with its IP, DNS name, or local Apple name such as hostname.local.
You can use the same syntax to open a file directly:
C-x C-f /ssh:hostname:/path/to/folder/filename RET
Replace ssh with afp if that is how your local sharing is currently configured. TRAMP offers other protocols as well.
This syntax becomes handy when using emacs because you can use the same script to run from either machine. The path spec will pick up the same file/folder. You won't need separate programs for each machine.
-
Hmm, didn't think of using TRAMP. It didn't work at first, since I didn't realize that the name of the wanted volume as I saw it in the finder wasn't actually the full hostname. When I went back and looked at the remote machine, I discovered that the hostname was appended with
.local
. Now everything works perfectly!!– RubyJul 31, 2016 at 19:09
When machines are shared on OS X, the share-points are mounted in the folder /Volumes
. Type M-x dired
and in the mini-buffer type /Volumes
and press the enter/return key -- then select whichever share-point that is desired by navigating the dired-mode
buffer.
-
That helps with one problem: I didn't know to look in the
/Volumes
directory. But I don't find the entire shared hard drive there, just my own user account. I want to look at every file that I have access to on the other machine (of which I'm the owner). Symlinking/.../<directoryname>
to~/<directoryname>
doesn't help. Trying to view the symlink on the other machine gives me the error messageFile is a symlink to a nonexistent target
. I suppose I could copy<directoryname>
to~
, but it is a huge directory. Do I need to learn more about how the sharing stuff works with OS X?– RubyJul 31, 2016 at 18:47 -
Underneath the
SHARED
heading in the sidebar of Finder.app there should be a listing of devices on the network. A left-click of the mouse on the desired device (e.g., the other computer on the network) will display the folders that are available to be mounted -- however, some may require a username/password. If the root folder on the other computer is visible, then use a mouse left-click to select it. Once you have entered the username/password (if applicable) the mount will be visible in the/Volumes
folder. You can add additional folders in System Preferences under Sharing.– lawlistAug 1, 2016 at 3:32 -
I find that view "As Columns" in Finder.app (aka Command-3) with a visible sidebar (on the left) gives me a little more flexibility to mount folders and see a little better as to what I am doing.– lawlistAug 1, 2016 at 3:39