2

Is there a way to make Firefox accept bash commands to handle an application protocol?

Currently, I am opening irc:// links in XChat from Firefox via a shell script as described in this answer. I would like to eliminate the script step and directly move on to opening the link in XChat.

2
  • Can you please give an example of what you're trying to achieve?
    – arrange
    Sep 9, 2011 at 15:33
  • Well, I do not understand how the command itself will make a difference to the way to get Firefox to run it, but edited in the thing I command I want to run.
    – Oxwivi
    Sep 9, 2011 at 16:41

2 Answers 2

1

You said you wanted to skip the shell script part. Basically you can execute the content of every shell skript like this:

bash -c "contents of shell script in one line"

In your case it would look like this:

bash -c "xchat --existing --url=\"%s\""

Since xchat is an executable independet of bash you should be able to start xchat directly:

/usr/bin/xchat --existing --url="%s"

Use which xchat to find out where xchat is installed on your system and replace the /usr/bin part if it is installed somewhere else.

1
  • Yes, I know the command itself (and it's /usr/bin/xchat by the way), but what I want to know is how to get Firefox to actually take commands instead just the path to directory.
    – Oxwivi
    Sep 11, 2011 at 8:15
0

Please see this old post, it helped other people before: http://www.linuxquestions.org/questions/linux-software-2/how-to-register-irc-protocol-to-firefox-browser-283057/

P.S.: read the entire thread.

2
  • I already tried that suggested in a Ubuntu Forums thread. No luck.
    – Oxwivi
    Sep 9, 2011 at 19:15
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – RolandiXor
    Sep 17, 2011 at 16:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .