Create an account

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[SOLVED] How to launch from Firefox?

I see a server listing here, but when I click on a xonotic:// link, Firefox tells me the protocol is unrecognised. I added the protocol according to this page, and chose as the application to launch. Sure enough, it launches, but not at the server I selected. I tried the gconftool-2 suggestion, still no deal.

So, how can I click a xonotic link in Firefox and have Xonotic launch me into that game? I installed Xonotic by downloading it and unpacking it manually, ie. not by a package manager.

Incidentally, the servers listed on that page don't all (any?) appear in the in-game server list. I wonder if people get the wrong impression of player numbers because of that…

You should pass the server address to the "connect" command. Your full command should be
Code: +connect
, instead of
as I assume you're doing now.

As for the servers appearing or not, are you sure you're not filtering in your in-game list? The list of server should be exactly the same, because the server listing webpage runs on the master server from which the in-game server list fetches its data.

Firefox's application chooser dialog only allows to select binaries. How would I pass it arguments? And would I substitute the address for "%s"?

Right, the gconf thing might be able to, but Firefox' builtin handler does not. What distro do you use? Do you use GNOME?

Anyway, to use the builtin firefox handler instead of GNOME's, you'll have to create a script that takes the first argument and passes it to xonotic:
Create a directory "bin" in your home directory, and put the following in the file xonotic-connect:
"$HOME/whatever/" +connect "$@"
where you should replace "whatever" with whatever path your is in your home directory.

Then, make that file executable and use that as the url handler in Firefox.

I'm not using a desktop environment, just a window manager. Although I do have some KDE and Gnome stuff installed, I'm not using it on 'the desktop'.

I created the script like you said and it worked with a couple of modifications:


/home/vigil/Xonotic/xonotic-linux32-glx -basedir /home/vigil/Xonotic +connect "${1:10}"

-basedir was required, and ${1:10} strips away "xonotic://" from the address that gets passed to +connect.

Just had a couple of online games. Cool :-)

The servers not appearing was a result of my firewall.

Cool people don't need DEs Wink

-basedir is required because you used the path to the binary file, not the shell script! I think it's better to drop the basedir and use the script instead, which takes care of setting the environment just right.

I didn't know firefox would not strip away the prefix. Makes sense, though. Here's something a little more clever that you can do to strip it yourself:

"blablabla/" +connect "$sv" "$@"

It adds a little more flexibility in the sense that you can omit the xonotic:// and it will work just fine, and you can pass it extra parameters as well like +vid_fullscreen 0

This is of course completely optional and will behave the same as your current script.

Ah yes, I didn't think I'd need to call it with any other options. Best to have the flexibility.

Possibly Related Threads…
Thread Author Replies Views Last Post
  [NEED HELP] Cannot launch xonotic-linux64-dedicated server (v0.8.5) in Ubuntu18.04 ff8eyes 4 2,447 04-04-2024, 08:16 PM
Last Post: IvanLowery
  [SOLVED] Xonotic won't launch on Win10 noChance79 7 6,463 06-23-2023, 09:49 AM
Last Post: Cofein
  [NEED HELP] Segmentation fault on launch Gouldron 0 2,131 04-06-2019, 02:54 PM
Last Post: Gouldron
  [SOLVED] Trouble with launch Xonotic on Mac OS X kanatov 6 11,314 10-03-2015, 10:49 AM
Last Post: SomeGuy
Sad [NEEDS INFO] First Launch = Hard Reboot fr00ty_l00ps 9 8,813 10-04-2012, 11:56 PM
Last Post: Mr. Bougo
  [SOLVED] Black screen and crash at launch kiro 3 5,331 08-11-2012, 04:59 PM
Last Post: Mr. Bougo
  [SOLVED] crash at launch ApexjE 14 13,612 06-16-2012, 08:58 AM
Last Post: ApexjE
  [NEEDS INFO] Cant launch? ubuntu 10.04 shadowfaxim 4 9,562 01-25-2011, 07:54 PM
Last Post: lda17h

Forum Jump:

Users browsing this thread:
1 Guest(s)

Forum software by © MyBB original theme © iAndrew 2016, remixed by -z-