Closed alexandre1985 closed 8 years ago
That is because of shell. When you use sudo you run target program at root environment, not user
try to use -E
option to preserve your current environment:
sudo -E rsub ...
No, it was because I had an alias "rsub -p 2222" on user and not on root. Do you know how I can change the default port that rsub uses so that I can delete the alias? Thank you
Yes, it is. That is different environment for user and root. Have you tried -E
sudo option?
You can also do in your .bashrc
or .bash_profile
to setup port for rsub:
export RMATE_PORT="12345"
Thank you for the RMATE_PORT
tip. Didn't know that.
I already deleted the alias but when I had and tried with sudo -E
it didn't work because I had no alias in root.
Now it works with the RMATE_PORT
:)
I have changed rsub default port and it works great. I'm on a debian machine. But when I try to change root priveligied files with sudo or in root user it doesn't work. It says: /usr/local/bin/rsub: connect: Connection refused /usr/local/bin/rsub: line 327: /dev/tcp/localhost/52698: Connection refused Unable to connect to TextMate on localhost:52698
It appears that on root user rsub tries to use the default port instead of the one that i'm using. Hope that someone can give me some feedback. Thanks