PDA

View Full Version : Steam: Firefox Protocol Handler How-To


fatbuttlarry
May 5th, 2007, 05:05 AM
*Note: This how-to requires wine, steam, and firefox.

http://ubuntuforums.org/attachment.php?attachmentid=31800&stc=1&d=1178355502 (http://www.winehq.org/site/download) + http://ubuntuforums.org/attachment.php?attachmentid=31801&stc=1&d=1178355750 (http://www.steampowered.com)+FIREFOX


Ever want those cool links like:steam:"-applaunch 70 +connect vnny.dyndns.org:27015"
to work with Steam under Ubuntu?

It can be done. This is how I did it.


Navigate your firefox browser to about:config
Set up the following values in firefox's about:config (http://ubuntuforums.org/attachment.php?attachmentid=31796&stc=1&d=1178355091) page
Right Click >> New >> Boolean:
(Preference Name)network.protocol-handler.external.steam
(Boolean Value)true
Right Click >> New >> String:
(Preference Name)network.protocol-handler.app.steam
(String Value)steam

Right Click >> New >> Boolean:
(Preference Name)network.protocol-handler.warn-external.steam
(Boolean Value)false
Create the following script: /usr/bin/steam
(Type this in a console window)sudo pico /usr/bin/steam
(Type this text)#!/bin/sh
#
# Steam wrapper script
#
exec wine "c:\\program files\\steam\\steam.exe" "$@"


(Alternately, you can download it here: http://ubuntuforums.org/images/uf/attach/gz.gif steam.tar.gz (http://ubuntuforums.org/attachment.php?attachmentid=31797&d=1178354817) (203 Bytes)
Ensure the new file is executable:
sudo chmod +x /usr/bin/steam
Test to see if it works: [sample link (http://vulgarnewbies.com/modules.php?name=Connect)] and enjoy (http://ubuntuforums.org/attachment.php?attachmentid=31798&d=1178354998)!


-Tres

Darko-TheRaven
May 7th, 2007, 04:09 PM
I just spotted a mistake.

network.protocol-handler.external.steam

is in the image but you do not specify to add that preference

fatbuttlarry
May 7th, 2007, 05:42 PM
Thanks! Fixed! Cheers.

-Tres

KillerKiwi
May 8th, 2007, 03:41 AM
Im pretty sure you could do this in gconf... then the links would work in all gnome apps

fatbuttlarry
May 8th, 2007, 04:29 AM
Im pretty sure you could do this in gconf... then the links would work in all gnome apps
Good idea.

Does it matter if I don't run gnome lol?

I'll apt-get that and see what it does! :)

-Tres

fatbuttlarry
May 8th, 2007, 04:34 AM
Currently running the following command to get gconf installed:

apt-get install gconf-editor


Then got CORBA errors. So I created a key thing, and it didn't show up.

I re-opened the program and some stuff was listed. Looks kind of like a registry. Cool. Lol I'm stopping that project right there. :)

-Tres

:popcorn:

KillerKiwi
May 8th, 2007, 07:34 PM
gconf is like a registry (windows like *ugg* ) only in the fact that its centralised... you can delete it corrupt it etc any everything will still work as the settings are actually distributed xml files.

Just to clarify it is NOT like the windows regiestry

END RANT

anyway you can create gconf keys like this (NOTE: you are ment to create an XML fall back but this hack works fine)

gconftool-2 -t string -s /desktop/gnome/url-handlers/steam/command exec wine "c:\\program files\\steam\\steam.exe" "%s"
gconftool-2 -t bool -s /desktop/gnome/url-handlers/steam/enabled true
gconftool-2 -t bool -s /desktop/gnome/url-handlers/steam/needs_terminal false

for KDE you can do this



[Protocol]
exec=wine "c:\\program files\\steam\\steam.exe" '%u'
protocol=steam
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false
icon=package
Description=steam

Save this code in ${KDEHOME}/share/services/steam.protocol

fatbuttlarry
May 8th, 2007, 10:59 PM
gconf is like a registry (windows like *ugg* ) only in the fact that its centralised... you can delete it corrupt it etc any everything will still work as the settings are actually distributed xml files.

Just to clarify it is NOT like the windows regiestry

END RANT

anyway you can create gconf keys like this (NOTE: you are ment to create an XML fall back but this hack works fine)

gconftool-2 -t string -s /desktop/gnome/url-handlers/steam/command exec wine "c:\\program files\\steam\\steam.exe" "%s"
gconftool-2 -t bool -s /desktop/gnome/url-handlers/steam/enabled true
gconftool-2 -t bool -s /desktop/gnome/url-handlers/steam/needs_terminal false

for KDE you can do this



[Protocol]
exec=wine "c:\\program files\\steam\\steam.exe" '%u'
protocol=steam
input=none
output=none
helper=true
listing=false
reading=false
writing=false
makedir=false
deleting=false
icon=package
Description=steam

Save this code in ${KDEHOME}/share/services/steam.protocol
It's my guess, that if I'm using KDE w/ Firefox, Firefox will only know the gconf settings, where as Konqueror will only know the KDE settings?

This is really cool stuff. Perhaps it's a better solution around the Firefox hack that started this thread. I guess I make a false assumption that most people using steam run firefox, which may not be the case. :guitar:

If I can get these changes to take and work, I will update the how-to with the more abstract settings.

BTW - Does anyone know how to remove these settings from Firefox once they've been created? Lol, I might want to take them back out for testing!

-Tres

Orffen
May 11th, 2007, 12:31 PM
I also had to do a

sudo chmod +x /usr/bin/steam

before Firefox would properly handle it. It gave error

"Firefox doesn't know how to open this address, because the protocol (steam) isn't associated with any program."

The message is confusing, but has been raised in the Mozilla Bugzilla (https://bugzilla.mozilla.org/show_bug.cgi?id=312953).

fatbuttlarry
May 11th, 2007, 02:42 PM
Thanks Orffen! Added to How-To!

-Tres

fatbuttlarry
May 14th, 2007, 04:20 AM
I have decided not to update this with the gconf / kde keys for now. I am working on another project at this time, so I'll leave it be until people have problems, etc. :popcorn:

Riboflavin
May 15th, 2009, 12:17 AM
Thanks! This worked great for me with the latest version of wine and ubuntu :)

frodomir
May 17th, 2009, 01:10 PM
Dude Im not Einstein What the hell does this mean


# Create the following script: /usr/bin/steam (Type this in a console window) Code: sudo pico /usr/bin/steam (Type this text) Code: #!/bin/sh # # Steam wrapper script # exec wine "c:\\program files\\steam\\steam.exe" "$@" (Alternately, you can download it here: steam.tar.gz (203 Bytes) # Ensure the new file is executable: Code: sudo chmod +x /usr/bin/steam # Test to see if it works: [sample link] and enjoy!

fatbuttlarry
May 17th, 2009, 03:06 PM
Einstein,

If you need help, you're going to have to be more specific on what part of the how-to you don't understand.

-Tres

frodomir
May 17th, 2009, 03:44 PM
Einstein,

If you need help, you're going to have to be more specific on what part of the how-to you don't understand.

-Tres

Im not coding or whatsoever einstein and dont you see i said i dont understand from script creating and so on part... I do not know what usr/so on means what to do... Nothing...

Sorry for being like this, its just ive een trying to download it half of day... Both IE (6, 8) FF (2, 3), opera... None owrked

http://i41.tinypic.com/15wdzmg.jpg


Idk what to do after this part

fatbuttlarry
May 17th, 2009, 08:53 PM
Einstein,

What are you trying to "download?"

This tutorial is for a script that launches Steam (Half-Life) in Ubuntu.

Your screenshot confuses me a little as I see the Windows version of Firefox running. The tutorial is for making a game launch from the Ubuntu version of Firefox. Is that what you are trying to do?

Please explain.

-Tres

frodomir
May 18th, 2009, 12:31 PM
Einstein,

What are you trying to "download?"

This tutorial is for a script that launches Steam (Half-Life) in Ubuntu.

Your screenshot confuses me a little as I see the Windows version of Firefox running. The tutorial is for making a game launch from the Ubuntu version of Firefox. Is that what you are trying to do?

Please explain.

-Tres

IDK what you are talknig about :lolflag: Like I said IM kinda new to all this stuff...

I have WIN Vista, And firefox is my main browser...

Is there any way to make it work? I tried to edit reg keys like said on steam forums but Im having ownership problems, even I have only 1 account... I cant just take rights, idk why, so that trick fails for me...

fatbuttlarry
May 18th, 2009, 05:39 PM
IDK what you are talknig about :lolflag: Like I said IM kinda new to all this stuff...

I have WIN Vista, And firefox is my main browser...

Is there any way to make it work? I tried to edit reg keys like said on steam forums but Im having ownership problems, even I have only 1 account... I cant just take rights, idk why, so that trick fails for me...

Well that would explain why the thread reads foreign to you. This is not a Windows forum (nor Vista for that matter).

This forum is for Ubuntu Linux. The tutorial you are reading is for Linux, not Windows, so many of the steps will not work. If you are having difficulties with Steam in Vista I suggest first visiting: http://store.steampowered.com/forums/ and asking there.

Firefox on Windows should automatically process your steam links. If you are having problems getting steam running, search a bit more on Google, there's quite a few instructions on it.

I can try to help you outside of this thread via IM if you'd like. FatButtLarry on AIM, MSN, Yahoo or Google chat.

Good luck.

-Tres

frodomir
May 19th, 2009, 01:21 PM
Well that would explain why the thread reads foreign to you. This is not a Windows forum (nor Vista for that matter).

This forum is for Ubuntu Linux. The tutorial you are reading is for Linux, not Windows, so many of the steps will not work. If you are having difficulties with Steam in Vista I suggest first visiting: http://store.steampowered.com/forums/ and asking there.

Firefox on Windows should automatically process your steam links. If you are having problems getting steam running, search a bit more on Google, there's quite a few instructions on it.

I can try to help you outside of this thread via IM if you'd like. FatButtLarry on AIM, MSN, Yahoo or Google chat.

Good luck.

-Tres


awww... Pity... I browsed steam forums for error but nothing helped me with getting it clear...