LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 12-01-2014, 06:22 PM   #1
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Rep: Reputation: 196Reputation: 196
Have firefox exec a shell script when a quake2:// is clicked?


The title pretty much says it all. I would like to have firefox launch a quake2 multiplayer shell script when a quake2://xxx.xxx.xxx.xxx:xxxx url is clicked

thanks
 
Old 12-02-2014, 05:57 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
You need to configure firefox to run your script for your protocol/scheme. I've never tried but this should work.

http://kb.mozillazine.org/Register_protocol
 
1 members found this post helpful.
Old 12-02-2014, 04:24 PM   #3
fogpipe
Member
 
Registered: Mar 2011
Distribution: Slackware 64 -current,
Posts: 550

Original Poster
Rep: Reputation: 196Reputation: 196
Quote:
Originally Posted by michaelk View Post
You need to configure firefox to run your script for your protocol/scheme. I've never tried but this should work.

http://kb.mozillazine.org/Register_protocol
Hey thanks this
Quote:
network.protocol-handler.expose.foo -> Value -> false (Replace foo with the protocol you're specifying)
along with a bit of perl
Code:
#!/usr/bin/perl
$ARGV[0] =~ s/quake2:\/\///;
print $ARGV[0];
`xterm -e "cd /usr/share/quake2&&/usr/share/quake2/quake2 +connect $ARGV[0]"`;
exit;
did the trick nicely.

You know, this is what i love about linux. On windows i would have had to download and futz around with some sort of server browser or something and clicked through a bunch of ads and cruft to get it.

Now i just click a server url and play Thanks again.

I looked everywhere for something like that. Guess my google skills are not what they might be.

Last edited by fogpipe; 12-02-2014 at 04:27 PM.
 
Old 12-02-2014, 05:41 PM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,784

Rep: Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937Reputation: 5937
Great that it worked. You can mark the thread as solved via the thread tools at the top of the page.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
exec in a shell script not working sanjosanjo Programming 3 04-13-2012 07:57 AM
[SOLVED] calling a shell script from exec. ankitm Programming 4 04-09-2012 06:05 AM
how to use exec in shell script sagar.gunjal Programming 16 12-19-2011 11:10 PM
Using exec in a shell script opus-outlaw Linux - Desktop 1 01-19-2008 11:47 AM
exec the expect command in a shell script wanghao Linux - Networking 6 11-23-2007 11:06 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 04:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration