rmate icon indicating copy to clipboard operation
rmate copied to clipboard

doesn't work on remote mac if Textmate installed & opened on the remote mac

Open benpptung opened this issue 5 years ago • 7 comments

I have been using rmate in all my remote servers. Recently, I've just bought another mac laptop, so I hope I can use rmate on it too.

However, it's interesting if the TextMate is opened on the remote mac, the rmate command will open the TextMate on the remote mac. I have to quit TextMate on the remote mac, so rmate will open the file locally.

I'm wondering if anything I can do to fix this? Thank you :)

benpptung avatar Oct 15 '19 05:10 benpptung

I am not sure if i understand your problem properly:

You are using a MacBook and want to open TextMate locally using rmate rather than opening the file on a remote Mac? Where is rmate located in this case - on your local Mac or on the remote Mac?

aurora avatar Oct 15 '19 09:10 aurora

Sorry for misunderstanding. That said, I have 2 mac computers A and B.

Using mac remote login, I can login B from A, and I hope to use rmate to open TextMate locally in A. The rmate is installed in B under ~/bin already.

In B, if TextMate is installed and opened, the rmate will open the file in B using TextMate. If I quit B's TextMate, rmate will work as expected, and open the file in A using A's TextMate.

benpptung avatar Oct 16 '19 14:10 benpptung

Thanks for clarification! I have to admit, that i never tested this case, will do so.

aurora avatar Oct 16 '19 17:10 aurora

Me and my colleague had the same problem. Worked around it using aliases to rmate which different port numbers.

tiktuk avatar Oct 27 '19 22:10 tiktuk

Sorry, will take a little longer to fix, because i am currently very busy with other things. I hope will be able to get back to this mid Novembre.

aurora avatar Oct 30 '19 13:10 aurora

I use this to change port number

.bashrc file on server

if ([[ -n "$SSH_CLIENT" ]] || [[ -n "$SSH_TTY" ]]); then
    export RMATE_PORT=52658
fi

.ssh/config in local

Host example.com
    RemoteForward 52658 localhost:52698
	User user

randy3k avatar Mar 16 '20 07:03 randy3k

if [[ -n $SSH_CLIENT || -n $SSH_TTY ]]; then
    export RMATE_PORT=52658
fi

or shorter

SuperSandro2000 avatar Mar 17 '20 12:03 SuperSandro2000