I would like a program or website to connect to a computer and be able to edit a file there.

Say I have a server. Call it 192.168.1.2 Say I have a file. Call it /data/editme.txt

I want either a simple link I can bookmark to edit this file, or to a note app (such as Joplin or Obsidian) and also be able to edit this file.

I tried using Syncthing, however I would rather not have to sync the file from one location to another. This file has no need to be stored in multiple locations.

Anything that’ll solve this for me?

  • rentar42@kbin.social
    link
    fedilink
    arrow-up
    28
    ·
    11 months ago

    “Use vim in SSH” is not a great answer to asking for a convenient way to edit a single file, because it requires understanding multiple somewhat-complex pieces of technology that OP might not be familiar with and have a reasonably steep learning curve.

    But I’d still like to explain why it pops up so much. And the short version is very simple: versatility.

    Once you’ve learned how to SSH into your server you can do a lot more than just edit a file. You can download files with curl directly to your server, you can move around files, copy them, install new software, set up an entire new docker container, update the system, reboot the system and many more things.

    So while there’s definitely easier-to-use solutions to the one singular task of editing a specific file on the server, the “learn to SSH and use a shell” approach opens up a lot more options in the future.

    So if in 5 weeks you need to reboot the machine, but your web-based-file-editing tool doesn’t support that option, you’ll have to search for a new solution. But if you had learned how to use the shell then a simple “how do I reboot linux from the shell” search will be all that you need.

    Also: while many people like using vim, for a beginner in text based remote management I’d recommend something simpler like nano.

    • REdOG@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      11 months ago

      Often I use git and just edit my repo files with the GitHub app and then git pull the changes from the server that needa the file. If you’re already familiar with git it’s probably easier than learning vim. You can probably do it directly to a repo behind ssh. If not then I’d learn vim before git.

      • Tangent5280@lemmy.world
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 months ago

        Do you use your own git server? Or do you use github? I want to use git but i dont want microsofts grubby hands in my data

        • rentar42@kbin.social
          link
          fedilink
          arrow-up
          4
          ·
          11 months ago

          You don’t need a dedicated git server if you just want a simple place to store git. Simply place a git repository on your server and use ssh://yourserver/path/to/repo as the remote URL and you can push/pull.

          If you want more than that (i.e. a nice Web UI and user management, issue tracking, …) then Gitea is a common solution, but you can even run Gitlab itself locally.