Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Wine
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Ubuntu 9.10 is out!!!

When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu.

The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely.

Wine
This is the place for questions about using Windows programs under Linux using Wine, including productivity software, games, and anything else.

 
Thread Tools Display Modes
Old May 5th, 2007   #1
fatbuttlarry
A Carafe of Ubuntu
 
fatbuttlarry's Avatar
 
Join Date: Mar 2006
Beans: 153
Lightbulb Steam: Firefox Protocol Handler How-To

*Note: This how-to requires wine, steam, and firefox.

+ +FIREFOX


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

It can be done. This is how I did it.
  1. Navigate your firefox browser to about:config
  2. Set up the following values in firefox's about:config page
    Right Click >> New >> Boolean:
    (Preference Name)
    Code:
    network.protocol-handler.external.steam
    (Boolean Value)
    Code:
    true
    Right Click >> New >> String:
    (Preference Name)
    Code:
    network.protocol-handler.app.steam
    (String Value)
    Code:
    steam
    Right Click >> New >> Boolean:
    (Preference Name)
    Code:
    network.protocol-handler.warn-external.steam
    (Boolean Value)
    Code:
    false
  3. 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)
  4. Ensure the new file is executable:
    Code:
    sudo chmod +x /usr/bin/steam
  5. Test to see if it works: [sample link] and enjoy!

-Tres
Attached Images
File Type: png snapshot2.png (35.6 KB, 240 views)
File Type: png snapshot3.png (11.8 KB, 176 views)
File Type: png winehq_top_logo.png (5.8 KB, 507 views)
File Type: png steam.png (6.0 KB, 927 views)
Attached Files
File Type: gz steam.tar.gz (203 Bytes, 152 views)

Last edited by fatbuttlarry; May 11th, 2007 at 02:41 PM..
fatbuttlarry is offline   Reply With Quote
Old May 7th, 2007   #2
Darko-TheRaven
5 Cups of Ubuntu
 
Darko-TheRaven's Avatar
 
Join Date: Mar 2007
Beans: 29
Ubuntu 7.04 Feisty Fawn
Send a message via AIM to Darko-TheRaven
Re: Steam: Firefox Protocol Handler How-To

I just spotted a mistake.

network.protocol-handler.external.steam

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

Pour me another cup of fresh Ubuntu please.
w00t!!! Party over here!!

Last edited by Darko-TheRaven; May 7th, 2007 at 04:25 PM..
Darko-TheRaven is offline   Reply With Quote
Old May 7th, 2007   #3
fatbuttlarry
A Carafe of Ubuntu
 
fatbuttlarry's Avatar
 
Join Date: Mar 2006
Beans: 153
Re: Steam: Firefox Protocol Handler How-To

Thanks! Fixed! Cheers.

-Tres
fatbuttlarry is offline   Reply With Quote
Old May 8th, 2007   #4
KillerKiwi
Gee! These Aren't Roasted!
 
KillerKiwi's Avatar
 
Join Date: Jun 2005
Beans: 185
Re: Steam: Firefox Protocol Handler How-To

Im pretty sure you could do this in gconf... then the links would work in all gnome apps
KillerKiwi is offline   Reply With Quote
Old May 8th, 2007   #5
fatbuttlarry
A Carafe of Ubuntu
 
fatbuttlarry's Avatar
 
Join Date: Mar 2006
Beans: 153
Re: Steam: Firefox Protocol Handler How-To

Quote:
Originally Posted by KillerKiwi View Post
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 is offline   Reply With Quote
Old May 8th, 2007   #6
fatbuttlarry
A Carafe of Ubuntu
 
fatbuttlarry's Avatar
 
Join Date: Mar 2006
Beans: 153
Re: Steam: Firefox Protocol Handler How-To

Currently running the following command to get gconf installed:
Code:
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


Last edited by fatbuttlarry; May 8th, 2007 at 04:49 AM..
fatbuttlarry is offline   Reply With Quote
Old May 8th, 2007   #7
KillerKiwi
Gee! These Aren't Roasted!
 
KillerKiwi's Avatar
 
Join Date: Jun 2005
Beans: 185
Re: Steam: Firefox Protocol Handler How-To

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

Last edited by KillerKiwi; May 8th, 2007 at 07:55 PM..
KillerKiwi is offline   Reply With Quote
Old May 8th, 2007   #8
fatbuttlarry
A Carafe of Ubuntu
 
fatbuttlarry's Avatar
 
Join Date: Mar 2006
Beans: 153
Re: Steam: Firefox Protocol Handler How-To

Quote:
Originally Posted by KillerKiwi View Post
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.

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

Last edited by fatbuttlarry; May 8th, 2007 at 11:01 PM..
fatbuttlarry is offline   Reply With Quote
Old May 11th, 2007   #9
Orffen
First Cup of Ubuntu
 
Join Date: May 2007
Beans: 1
Ubuntu 7.04 Feisty Fawn
Re: Steam: Firefox Protocol Handler How-To

I also had to do a

Code:
sudo chmod +x /usr/bin/steam
before Firefox would properly handle it. It gave error

Quote:
"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.
Orffen is offline   Reply With Quote
Old May 11th, 2007   #10
fatbuttlarry
A Carafe of Ubuntu
 
fatbuttlarry's Avatar
 
Join Date: Mar 2006
Beans: 153
Re: Steam: Firefox Protocol Handler How-To

Thanks Orffen! Added to How-To!

-Tres
fatbuttlarry is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 01:35 PM.


vBulletin ©2000 - 2009, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. bilberry