0

I'd like to map my raspberry pi's sd card from my linux laptop, so I can directly edit text files without using vim. How would I do this?

  • I've now tried using Samba, this doesn't work as I'm unable to overwrite files, also Sublime Text doesn't natively support opening files located on a samba share. – Joseph Nov 13 '13 at 0:31
1
  1. Install sshfs and possibly fuse on your laptop
  2. On your laptop create a directory on which you will mount your RPi $ mkdir /mnt/rpi
  3. On your laptop add the following line to your /etc/fstab file (sudo) changing the xxx to the actual RPI ip address

    sshfs#pi@xxx.xxx.xxx.xxx:/ /mnt/rpi fuse user,noauto,uid=0,gid=0,follow_symlinks,defaults 0 0

  4. Finally mount: $ mount /mnt/rpi
  • An excellent example of a stackexchange answer. I also had to install sshfs, this wasn't part of the fuse package I had as default Any idea how I would add a password into /etc/fstab ? – Joseph Nov 15 '13 at 0:39
  • Best way is to work with ssh keys. To generate them on your laptop: ssh-keygen -t rsa. Leave passphrase blank. This will generate a private key: id_rsa that you will keep on the laptop, and a id_rsa.pub public key that you will append to the PRi's /home/pi/.ssh/authorized_keys file and you are set. You can check by ssh-ing your RPi from command line. If successful you shouldn't be asked for a password. For more detailed instructions, Google OpenSSH keys. – ripat Nov 15 '13 at 6:35
  • @joseph indeed, sshfs should also be installed. Post corrected. – ripat Nov 16 '13 at 13:11
0

Samba is one option - probably you just have permissions wrong NFS is another option

If Sublime Text can't work with networked filesystems I guess you need to choose a different editor.

You can also run an editor (doesn't have to be vim) on the raspberrypi

For text based editor you just ssh in and fire it up

For graphical editor, make sure you have "ForwardX11 yes" in your /etc/ssh/ssh_config, and fire it up

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.