1

I needed to be able to set the cursor using mouse when editing text via nano over putty. I have already set the below in ~/.nanorc:

set mouse

If I start nano file just like that then it works, but if I require elevated rights and sudo nano file then it's not. How on earth is that possible? I suppose in that case nano is using another .nanorc?

2

I suppose in that case nano is using another .nanorc?

Yep. When you run sudo nano file, HOME environment variable is set to /root, so nano looks for .nanorc there.

Just add the setting into /root/.nanorc, and you should be fine.

  • Thank you for your answer. One more Q here if I may. Since I set up the above I can't paste anything into nano. I used to use right-click to do so. – fishmong3r May 14 '16 at 17:44
  • Never mind. Shift+Insert is still working. – fishmong3r May 15 '16 at 8:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.