Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let Desktop use pre-existing IPFS installation or already running daemon #542

Closed
hacdias opened this issue Dec 8, 2017 · 11 comments · Fixed by #623
Closed

Let Desktop use pre-existing IPFS installation or already running daemon #542

hacdias opened this issue Dec 8, 2017 · 11 comments · Fixed by #623

Comments

@hacdias
Copy link
Member

hacdias commented Dec 8, 2017

Ref.: ipfs/js-ipfsd-ctl#182

/cc @machawk1 @diasdavid

@machawk1
Copy link
Contributor

machawk1 commented Dec 8, 2017

It might also be good to advertise a way for other tools to leverage Station's IPFS installation. I am thinking of this in the context of https://github.com/oduwsdl/ipwb, which initially checks IPFS_PATH then defaults to ~/.ipfs if it hasn't been set. For other tools to leverage Station's IPFS, both the binary and the repo, might require an API on Station's end to ensure that Station gets all of the information needed for files added via other tools.

@hacdias hacdias changed the title Let Station use pre-existing IPFS installation Let Station use pre-existing IPFS installation or already running daemon Jan 11, 2018
@lidel
Copy link
Member

lidel commented Jan 26, 2018

Another data point from me :)

On one of my workstations I run go-ipfs under Docker.
Due to this my ~/.ipfs has only one text file named ~/.ipfs/api with multiaddr of a remote node:

$ cat ~/.ipfs/api
/ip4/127.0.0.1/tcp/5001

This setup seems to break startup of ipfs-desktop:


> [email protected] start /home/lidel/projects/ipfs-desktop
> electron-forge start

✔ Checking your system
✔ Locating Application
✔ Preparing native dependencies: 3 / 3
✔ Launching Application
  desktop Application is ready +0ms
  desktop Starting daemon +5ms
  desktop Uncaught Exception: Error: ENOENT: no such file or directory, open '/home/lidel/.ipfs/config' +23ms

I guess ipfs-desktop should detect ~/.ipfs/api and connect to remote node 🚀

@bedri
Copy link

bedri commented Mar 16, 2018

Files added with command line ipfs (I think I had installed ipfs-go but it shouldn't matter which client user uses) does not show up in the ipfs-desktop GUI. I guess this should also go under this topic. If requested I can open a separate issue for this.

Thank you.

@hacdias
Copy link
Member Author

hacdias commented Mar 16, 2018

@bedri the files we show on IPFS Desktop are the same we show on IPFS WebUI: from the Mutable File System. They should be added through ipfs files write and not ipfs add.

@hacdias hacdias changed the title Let Station use pre-existing IPFS installation or already running daemon Let Desktop use pre-existing IPFS installation or already running daemon Mar 16, 2018
@bedri
Copy link

bedri commented Mar 16, 2018

@hacdias oh ok. I did not know that. I will check it.
Although I am able to see the files that I add with "ipfs add" from Web UI. I am confused at that part.
I couldn't also managed to use ipfs files write to add files but i will figure it out eventually.

@hacdias
Copy link
Member Author

hacdias commented Mar 17, 2018

@bedri I think the version on /webui address is not the same from master on IPFS-WebUI repo and they probably have some differences regarding on which files they show. 😄

About ipfs files write: ipfs files write --create [path-on-mfs] [path-of-the-data-on-your-disk]. MFS is like a file system (you can have directories and all of that. Imagine you have a file called sec.txt you want to add to the root of MFS, just run:

ipfs files write --create /sec.txt ~/my/path/to/sec.txt

@bedri
Copy link

bedri commented Mar 17, 2018

Oh got it. Thank you very much 😄

@zricethezav
Copy link

zricethezav commented Nov 18, 2018

Any plans to have cli ipfs add populate files in the gui by default?? Otherwise i think the there needs to be a disclaimer in the gui.

@hacdias
Copy link
Member Author

hacdias commented Nov 19, 2018

@zricethezav the GUI shows your MFS (Mutable File System) and not files added by ipfs add. That command only adds files to your repo temporarily unless you pin them. If you add something to MFS (through ipfs files write/cp/mv), it will be automatically pinned and won't be removed by the garbage collector.

We recommend you to use the MFS so you can see the files on the UI and you also have the feel of a file system with directories and such things.

@olizilla please correct me if I'm wrong.

@olizilla
Copy link
Member

@zricethezav yes, very much so. Right now, ipfs add does the job of adding files to the IPFS universe... chunking and hashing them to calculate the CID (Content ID). What it doens't do yet is update your local file-system view of the repo (internally referred to as the Mutable File System, as it's the view of your files that you can edit). It's a significant UX issue that we are working on!

@hacdias MFS isn't a concept users should have to think about, it's an implementation detail. The workaround right now is an extra step to ipfs files cp things into it after adding them, but that's not the UX we want.

@lidel
Copy link
Member

lidel commented Nov 25, 2018

Obligatory disclaimer:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants