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

important environment variables are not inherited when using --run #598

Open
2 tasks done
2-www opened this issue May 2, 2024 · 4 comments
Open
2 tasks done

important environment variables are not inherited when using --run #598

2-www opened this issue May 2, 2024 · 4 comments

Comments

@2-www
Copy link

2-www commented May 2, 2024

Checklist

  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for a bug that matches the one I want to file, without success.

flatpak-builder version

1.4.2

Flatpak version

1.14.6

How to reproduce

flatpak-builder --run app-build/ app.json env

Expected Behavior

environment variables such as WAYLAND_DISPLAY and XDG_SESSION_TYPE are not passed inside the sandbox, which makes most programs unable to run

Actual Behavior

files such as $XDG_RUNTIME_DIR/wayland-0 are still available inside the sandbox, but the environment is cleared, so apps don't know that wayland is actually available

Additional Information

https://docs.flatpak.org/en/latest/debugging.html:

@JakobDev
Copy link
Contributor

JakobDev commented May 6, 2024

You need to use the correct finish args

@2-www
Copy link
Author

2-www commented May 6, 2024

i have "--socket=wayland", in finish-args.
it works correctly if flatpak-builder --user --install && flatpak run. but flatpak-builder --run app fails because it doesn't have the needed variables

@JakobDev
Copy link
Contributor

JakobDev commented May 7, 2024

I think it's the best to just install the App and not use flatpak-builder --run. This feature is sadly broken. Portals sometimes don't work correct, but I don't knew that even Wayland was not working.

@2-www
Copy link
Author

2-www commented May 7, 2024

i read about it at https://docs.flatpak.org/en/latest/debugging.html
i want to use gdb, and --install doesn't install debug symbol files

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

No branches or pull requests

2 participants