Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8055089
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T08:17:29+00:00 2026-06-05T08:17:29+00:00

I am developing a Firefox extension and would like to call an external binary

  • 0

I am developing a Firefox extension and would like to call an external binary from it. It would be great if I could use standard input/output to communicate, so I am looking for the best (and simplest) possible option.
This is what I learnt so far:

  • nslProccess is not suitable, since I need to get string as a return value. nslProccess can provide exit codes only.
  • I could use XPCOM but I would prefer if I didn’t need to modify code of the binary (it’s C, BTW). I would also like to make the most portable solution possible.
  • Protozilla IPC looks like a solution, but I’m not sure if this project is maintained. Last commit was 10 years ago.

As I understood, this functionality is implemented in Enigmail, which uses command line gpg tool. Does anyone have some specifics on that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T08:17:30+00:00Added an answer on June 5, 2026 at 8:17 am

    From all I know, Enigmail uses a binary XPCOM component to achieve this, usually this isn’t a viable solution for an extension. And communicating with another process via standard input/output isn’t part of the Gecko platform. So I think that you have three options:

    1. Use js-ctypes to call the necessary OS functions directly. E.g. on Windows you would call CreateProcess and specify handles for the standard input/output in the lpStartupInfo parameter. Of course you would also have to use OS functions to work with the streams. This quickly gets very hairy if you need to support multiple operating systems.
    2. Use the shell to redirect output. See this answer on how running a command with the shell works on Windows, on Unix-like systems you would use "/bin/sh" instead of env.get("COMSPEC"). You could write the input data for your command line application into in.txt and then run the command foo < in.txt > out.txt – the output will be in out.txt when the command is done. Obviously, this will not work if you need to interact with the application while it is running.
    3. You could change the application to use a different IPC approach, one that is supported by the Gecko platform. Typically that would mean using TCP sockets bound to localhost. Or you turn it into a dynamic library (.dll on windows, .so on Unix-like systems) and communicate with it via js-ctypes.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm developing a Firefox extension and would like to track its use with google
I would like to use an image in firefox extension I am developing. Can
I am developing a Firefox Extension (Firefox 3.6 and up) and i would like,
I am developing a firefox extension and ideally would be able to get the
While developing a firefox extension, I create a wizard window from overlay.js using: this.wizard
I'm developing an extension for FireFox. I use a XUL deck element that contains
I'm developing a firefox extension and i'd like to know: After i obtain a
I'm developing a firefox addon and would like to have a fixed position (relative
I am developing a Firefox extension and need to access a specific cookie from
I'm developing a firefox extension and I'd like to provide automatic update to my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.