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

Home directory isn’t displayed as ~ on Fedora Silverblue #94

Closed
fbruetting opened this issue Jul 8, 2018 · 6 comments
Closed

Home directory isn’t displayed as ~ on Fedora Silverblue #94

fbruetting opened this issue Jul 8, 2018 · 6 comments

Comments

@fbruetting
Copy link

In Fedora Silverblue everything in / is read-only, except for /var/ and /etc/ – thus /home/ is symlinked to /var/home/ for being writable. Powerline with default settings shows me this prompt at opening a terminal:
bildschirmfoto von 2018-07-08 13-09-15

When I execute cd ~, I then see the correct tilde symbol instead of that path:
bildschirmfoto von 2018-07-08 13-16-13

Can you maybe detect that, so that opening full paths in /var/home/$(USER)/… would always show the tilde symbol instead of that longer path?

@jwflory
Copy link
Contributor

jwflory commented Oct 6, 2018

@fbruetting I am curious, does Fedora Silverblue correctly note the user's home directory path in /etc/passwd on Linux?

@fbruetting
Copy link
Author

fbruetting commented Oct 6, 2018

Oh no, it doesn’t – I just reported that upstream, but changing that doesn’t work currently.

@jwflory
Copy link
Contributor

jwflory commented Oct 6, 2018

@fbruetting I say this with no understanding of the underlying code for the project here and obviously I am not a maintainer. But I would guess it is easier for @justjanne to fix this if Fedora Silverblue uses a common standard like updating the home directory path in /etc/passwd. Then, I would guess powerline-go could detect a user's home directory based on the passwd file and use that for whatever user is currently logged in.

cgwalters added a commit to cgwalters/rpm-ostree that referenced this issue Jan 5, 2019
For a long time I've resisted encoding "policy" into rpm-ostree
as much as possible.  Doing so makes it more distribution specific
for example.  That said, for `/var/home` there argument for doing
this in rpm-ostree is that we already make that symlink in our
hardcoded rootfs.  So we might as well do the other fixups for it.

coreos/fedora-coreos-config#18
https://pagure.io/workstation-ostree-config/pull-request/121
https://discussion.fedoraproject.org/t/adapting-user-home-in-etc-passwd/487/6
justjanne/powerline-go#94
rh-atomic-bot pushed a commit to coreos/rpm-ostree that referenced this issue Jan 7, 2019
For a long time I've resisted encoding "policy" into rpm-ostree
as much as possible.  Doing so makes it more distribution specific
for example.  That said, for `/var/home` there argument for doing
this in rpm-ostree is that we already make that symlink in our
hardcoded rootfs.  So we might as well do the other fixups for it.

coreos/fedora-coreos-config#18
https://pagure.io/workstation-ostree-config/pull-request/121
https://discussion.fedoraproject.org/t/adapting-user-home-in-etc-passwd/487/6
justjanne/powerline-go#94

Closes: #1726
Approved by: jlebon
@fbruetting
Copy link
Author

Okay, this got fixed. @justjanne, would this then be fixed?

@justjanne
Copy link
Owner

@fbruetting I don’t have an install of Red Hat Atomic (or distros based on it) here to test. I’d love to hear if it works for you.

@fbruetting
Copy link
Author

fbruetting commented Apr 14, 2019

Seems to be resolved (/var/home/<user> is still not displayed as ~, but I don’t have to enter cd manually anymore aftar starting the terminal, so bash now seems to start in symlinked /home/<user>).

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

No branches or pull requests

3 participants