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

From where it assumes the user home path? #1935

Closed
danimesq opened this issue Dec 3, 2021 · 6 comments · Fixed by #2140
Closed

From where it assumes the user home path? #1935

danimesq opened this issue Dec 3, 2021 · 6 comments · Fixed by #2140
Labels
kind/support A question or request for support

Comments

@danimesq
Copy link

danimesq commented Dec 3, 2021

/home/.ipfs-desktop/IPFS_PATH is assigning a wrong username every time I start IPFS Desktop

Probably this bug affects from version 13 (or bellow) to the latest 17

@lidel
Copy link
Member

lidel commented Dec 3, 2021

go-ipfs uses https://github.com/mitchellh/go-homedir for finding homedir
Your path looks odd: /home/.ipfs-desktop/ is missing username(?)

What are your $USER and $HOME in env used when running ipfs-desktop?

@lidel lidel added the need/author-input Needs input from the original author label Dec 3, 2021
@danimesq
Copy link
Author

danimesq commented Dec 3, 2021

Your path looks odd: /home/.ipfs-desktop/ is missing username(?)

Sorry, I told here an sample non-absolute path.

What are your $USER and $HOME in env used when running ipfs-desktop?

❯ echo "$USER"
daniella

❯ echo "$HOME"
/home/daniella

However, every time I open IPFS Desktop, it overwrites /home/daniella/.ipfs-desktop/IPFS_PATH's content to /home/daniell/.ipfs
Seems like IPFS Desktop got it from some place, because my home folder's content is imported from my previous username which was daniell (I did a backup of the previous home folder into the new, in a fresh Ubuntu install); is IPFS Desktop assuming this old username elsewhere?

IPFS Desktop should write to /home/daniella/.ipfs-desktop/IPFS_PATH /home/daniella/.ipfs instead of /home/daniell/.ipfs

@danimesq
Copy link
Author

danimesq commented Dec 3, 2021

Possibly similar to #1749?

Because this issue also made my IPFS Desktop unusable despite /usr/bin/ipfs running its daemon and UI accessible from browser.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 3, 2022

Oops, seems like we needed more information for this issue, please comment with more details or this issue will be closed in 30 days.

@danimesq
Copy link
Author

danimesq commented Jan 3, 2022

There's already the detailed info.

@hacdias
Copy link
Member

hacdias commented Jan 4, 2022

@danimesq hi! Even though there is an underlying issue here, the feature that uses ~/.ipfs-desktop/IPFS_PATH, i.e., IPFS on PATH, is deprecated and only active if you've had it activated before. To disable it, click on the IPFS Desktop menubar icon, then Preferences and finally on Command Line Tools.

Regarding the value that is written to that file, it can be found on: ~/.config/IPFS Desktop/config.json > ipfsConfig > path. If you change the value there to the new username PATH, it should be fixed.

Either way, I would recommend you to simply disable this feature altogether due to the reasons mentioned here.

@hacdias hacdias added kind/support A question or request for support and removed need/author-input Needs input from the original author labels Jan 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/support A question or request for support
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants