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

bug: neovim not being in the path of foot-server service #5996

Open
2 tasks done
sachinchaudhary1808 opened this issue Oct 23, 2024 · 8 comments
Open
2 tasks done

bug: neovim not being in the path of foot-server service #5996

sachinchaudhary1808 opened this issue Oct 23, 2024 · 8 comments
Assignees
Labels
bug triage Issues or feature request that have not been triaged yet

Comments

@sachinchaudhary1808
Copy link

Are you following the right branch?

  • My Nixpkgs and Home Manager versions are in sync

Is there an existing issue for this?

  • I have searched the existing issues

Issue description

https://codeberg.org/dnkl/foot/issues/1844#issuecomment-2397192

Maintainer CC

No response

System information

~ via 🌙 
❯ nix-shell -p nix-info --run "nix-info -m"
fetching path input 'path:/nix/store/riqkpszjqk02bi1wppfg8ip5xvh102qd-source'
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.57, NixOS, 24.11 (Vicuna), 24.11.20241018.4c2fcb0`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Lix, like Nix) 2.91.0
System type: x86_64-linux
Additional system types: i686-linux, x86_64-v1-linux, x86_64-v2-linux, x86_64-v3-linux
Features: gc, signed-caches
System configuration file: /etc/nix/nix.conf
User configuration files: /home/coco/.config/nix/nix.conf:/etc/xdg/nix/nix.conf:/home/coco/.local/share/flatpak/exports/etc/xdg/nix/nix.conf:/var/lib/flatpak/exports/etc/xdg/nix/nix.conf:/home/coco/.nix-profile/etc/xdg/nix/nix.conf:/nix/profile/etc/xdg/nix/nix.conf:/home/coco/.local/state/nix/profile/etc/xdg/nix/nix.conf:/etc/profiles/per-user/coco/etc/xdg/nix/nix.conf:/nix/var/nix/profiles/default/etc/xdg/nix/nix.conf:/run/current-system/sw/etc/xdg/nix/nix.conf
Store directory: /nix/store
State directory: /nix/var/nix
Data directory: /nix/store/g839w7gjl0v4vc1gc9gd80ns57hb2kgm-lix-2.91.0/share`
 - nixpkgs: `/nix/store/riqkpszjqk02bi1wppfg8ip5xvh102qd-source`
@sachinchaudhary1808 sachinchaudhary1808 added bug triage Issues or feature request that have not been triaged yet labels Oct 23, 2024
@sachinchaudhary1808
Copy link
Author

@rycee
Copy link
Member

rycee commented Oct 25, 2024

Sorry, don't know much about either foot service or neovim. Perhaps @plabadens can help?

When you open a foot window, what does echo $PATH say?

@sachinchaudhary1808
Copy link
Author

Sorry, don't know much about either foot service or neovim. Perhaps @plabadens can help?

When you open a foot window, what does echo $PATH say?

echo $PATH
/run/wrappers/bin:/home/coco/.local/share/flatpak/exports/bin:/var/lib/flatpak/exports/bin:/home/coco/.nix-profile/bin:/nix/profile/bin:/home/coco/.local/state/nix/profile/bin:/etc/profiles/per-user/coco/bin:/nix/var/nix/profiles/default/bin:/run/current-system/sw/bin

i don't know if path is the issue but when i do foot -e nvim when server is running it just dosen't show me anything but when i open footclient and run nvim then it works

@sachinchaudhary1808
Copy link
Author

2024-10-25.15-01-16.mp4

look at this

@sachinchaudhary1808
Copy link
Author

to be sure it's a home-manager issue i tried comment the server.enable = true line in config and started foot --server on my sway config and things just work fine

@sachinchaudhary1808
Copy link
Author

and only something sap-rate related to this, that i had to remove dead code related to foot service cuz of it was not working, i guess foot module really needs some upgrade here

@plabadens
Copy link
Contributor

plabadens commented Oct 30, 2024

The reason this happens is that, by default, any new instances of footclient will run within the environment of the server (see under -E in https://man.archlinux.org/man/extra/foot/footclient.1.en). The server runs through a systemd user service, and does not have access to your entire path. There are two approaches to solve this:

  1. Import your PATH into the systemd user environment. Something like systemctl --user import-environment as part of your session setup (maybe WM config?) should do the trick.
  2. Run footclient with -E, so that it uses the environment of the client instead of the server.

I don't believe that this is an issue with home-manager itself, as it's one of the caveats of using foot in client-server mode.

@sachinchaudhary1808
Copy link
Author

sachinchaudhary1808 commented Nov 1, 2024

  1. systemctl --user import-environment

also i get this

❯ systemctl --user import-environment
Calling import-environment without a list of variable names is deprecated.

also this doesn't do any trick maybe some errors i have

exec systemctl --user import-environment

this in my config file

also doing like

exec systemctl --user import-environment PATH

does nothing too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug triage Issues or feature request that have not been triaged yet
Projects
None yet
Development

No branches or pull requests

5 participants