Editing Text Files on Raspberry Pi remotely with Atom

  1. Install atom on your Debian / Ubuntu laptop / PC:
    1. Download atom-amd64.deb from the Atom releases page.
    2. Run sudo dpkg --install atom-amd64.deb on the downloaded package.
    3. Launch Atom using the installed atom command.
  2. On atom go to Edit -> Preferences -> Install -> look for remote-atom, click Install
  3. Run remote-atom server. On atom go to Packages  -> Remote Atom -> click Run Server
  4. ssh to your Pi using special port tunelling command, as such: ssh -R 52698:localhost:52698 pi@ipofyourpi
  5. Install rmate on your Pi:
    1. Install RMATE
      Now you need to ssh into the Raspberry Pi (ssh your_username@your_raspberry_pi_address). Once you’ve ssh-ed into the pi, run the following in the terminal:

      sudo wget -O /usr/local/bin/ratom https://raw.github.com/aurora/rmate/master/rmate

      This command downloads the  from github into a newly created ratomfile in the /usr/local/bin/ folder on the Raspberry Pi.

    2. Make the Script Executable
      sudo chmod +x /usr/local/bin/ratom
  6. On your Pi shell, run the following: ratom test.txt, it should open the test.txt file on your laptop / PC
  7. To make things simple, rather than ssh-ing using a complex command, you can store your config file in ~/.ssh/config of your laptop / PC.
    1. sudo nano ~/.ssh/config
      Host raspberry_pi_ip_address_or_hostname.com
          RemoteForward 52698
    2. Save it
    3. Quit the current Pi ssh session, log in again normally using: ssh pi@ipofyourpi
  8. Done! Any problem, refer to these websites and leave comments bellow.
    1. http://www.onenorth.com/blog/post/editing-files-on-raspberry-pi-with-local-sublime
    2. https://atom.io/packages/remote-atom
(Visited 3,293 times, 1 visits today)