


The macOS graphics system is not network transparent, unlike X11, so there's no other way to get data from the remote system to your clipboard on the Mac. Whether your X11 server does that is unknown, because you haven't told us which one you're using. If you want to interact with the Mac system clipboard, then you will need to have your X11 server do that for you. If you also want to paste it to the remote system, then that should be sufficient for your needs: all you need to do is invoke the relevant paste command in your X11 server. What i would like to do is: from my keyboard ,using a shortcut-key copy that path. Since you're using ssh -X, you can copy with xclip or xsel to the X11 clipboard if one of those commands is installed on the remote system. from my mouse select the path given in for example pathsample.JPG and press ctrl+c to copy that path and paste that in the 'dialog box ' which pops up. These are not built-in commands, but extra packages, and usually have to be explicitly installed, especially on headless machines. Typically, the commands that can be used instead are xclip and xsel (you need one or the other, not both). Pbcopy and pbpaste are commands that are specific to macOS and don't work on Linux. Please not that I want to be able to paste the path of the directory to the remote machine terminal, even if once is copied on the clipboard it should work in both directions I guess, (unless the remote machine has its own clipboard).Īctually I also don't know it there would be any difference in the procedure if I would be working on linux pc instead of apple?
MAC COPY PATH OF A DIRECTORY SHORTCUT HOW TO
I was thinking that I could use an alias to write pwd to remote terminal's output but then I do not know how to copy it to the clipboard.

bashrc on my mac locally I have found and using this: alias pcd='pwd | pbcopy'īut it does not work on the ssh server if I copy this on the. In order to save time, I would like to set an alias, thus a keyboard shortcut, to copy the current directory path directly to the clipboard, instead of writing pwd and the manually copying the output.
MAC COPY PATH OF A DIRECTORY SHORTCUT INSTALL
I am working on macos and on the terminal app I am connecting to a server which run on linux, through ssh -X (and I actually I should not be allowed to install any software on it).
