feat(webext): try to determine app_id from native messaging binary environment - #234
michaelbeaumont wants to merge 1 commit into
Conversation
iinuwa
left a comment
There was a problem hiding this comment.
Thanks for the contribution!
For my learning purposes, could you submit a log or D-Bus trace (you can use the Bustle app for that) that shows the ID being used on Firefox? It seems curious that the app ID would be different on different distributions since org.mozilla.firefox is perfectly globally unique.
I think this is a good addition, regardless. Added a comment below
| browser_pid = os.getppid() | ||
| launched_pid = os.environ.get("GIO_LAUNCHED_DESKTOP_FILE_PID") | ||
| if launched_pid != str(browser_pid): | ||
| logging.debug( | ||
| f"Ignoring {desktop_file_name} from GIO_LAUNCHED_DESKTOP_FILE environment," | ||
| f"it comes from process {launched_pid}, not the browser at {browser_pid}." | ||
| ) | ||
| return None |
There was a problem hiding this comment.
If I'm understanding this correctly, I think this would break if the browser uses a separate process to launch the native messaging binaries than the main process? I think we can probably skip the PID matching check and just read from the desktop file entry.
I have to setup credentials portal fork again since i was having issues with it and wireplumber. But there were two issues. The shim was registering itself as Then once that's fixed, #233 comes in. |
Does this make sense? It makes running on systems that don't use
org.firefox.mozillaeasier, since we're just trusting theAPP_IDthe client tells us anyway...