vrijdag 12 september 2014

How to use Steam Chat with Empathy

Like most Linux users, I prefer to have all my IM needs met by one and only one client. My client of choice being Empathy, since it integrates nicely with my Cinnamon desktop under Linux Mint Debian Edition 201403. So far, my People Nearby, XMPP/Google Talk, Facebook (back when I used it) and even SameTime (which I needed back when I was working for a customer that standardised on umm, let's say "weird" software stacks) all worked very well. But, I had one need unmet... Steam Chat!


You see, I have a cousin who does not use any "normal" chat protocols. He chats on Facebook through the website, and since I no longer use Facebook, he chats with me over Steam. This means I only see his messages when I'm at home, on the entertainment PC in the living room, which happens to run Steam fulltime. But I don't like using proprietary clients for my chat needs, and I don't regularly check that machine for new messages anyway. So I needed a better solution. Well, pidgin-opensteamworks to the rescue. Empathy supports all protocols that Pidgin knows of, through a connector named telepathy-haze. However, the Steam plugin requires a bit more work, which I'll document below for those who are struggling with the same problem, as this solution is not yet documented online, except for my reply to an issue on the pidgin-opensteamworks issue tracker.

First things first: you need to download the libsteam.so or libsteam64.so library, depending on the "bitness" of your kernel, and drop it in an appropriate location. This could be either in ~/.purple/plugins (not tested), or system-wide in /usr/lib/purple-2/ - I downloaded the 64-bit version, but copied it to /usr/lib/purple-2/libsteam.so. Not sure if the rename is necessary, nor if it needs to be installed system-wide; Pidgin picked it up from either location and both with or without the rename, but I still need to verify that this works.

Now, after doing this, you will notice you have a new "Steam" protocol in pidgin, which allows you to add your Steam account. But when you go to Empathy, a bunch of new protocols are added, but alas... No Steam.

So time to investigate. Following futpib's instructions, I added the following to my .profile:

HAZE_DEBUG=all
HAZE_LOGFILE=/tmp/haze-log

After logging out and in again, I examined the logfile in /tmp, and saw this:

purple/steam-Message: Purple core UI name: haze
purple/steam-Message: UI Core is Telepathy-Haze, attempting to load Gnome-Keyring
(haze:8374): purple/steam-CRITICAL **: Could not load Gnome-Keyring library. This plugin requires Gnome-Keyring when used with Telepathy-Haze

Googling it led me to the source. From there, I gathered the issue was an inability to load libgnome-keyring.so, and indeed, my system contained only these files:

/usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0
/usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0.2.0

So, all we needed was a new symlink, and killing the appropriate services:

sudo ln -s libgnome-keyring.so.0 /usr/lib/x86_64-linux-gnu/libgnome-keyring.so
killall -TERM mission-control-5 telepathy-haze

Now I see steam-mobile showing up in the Add Account dialog in Empathy.



After setting up the account, it wouldn't log in, but that's normal with Steam. An email was sent to my registered email address, with an access token. Simply select your Steam account in the Accounts window in Empathy, click "Edit Connection Parameters...", click on Advanced, and enter the access token in the Steam Guard Code field. Reconnect, and BOOM! You're in!

Tested it with my cousin; even offline messaging seems to be supported.



And indeed, inspecting the log file, it now looks a lot better:

purple/steam-Message: Purple core UI name: haze
purple/steam-Message: UI Core is Telepathy-Haze, attempting to load Gnome-Keyring
purple/steam-Message: status_types
purple/steam-Message: getting url /ISteamWebUserPresenceOAuth/Logon/v0001
purple/dnsquery-Message: Performing DNS lookup for api.steampowered.com
purple/dns-Message: Got response for 'api.steampowered.com'
purple/dnsquery-Message: IP resolved for api.steampowered.com
purple/proxy-Message: Connecting to api.steampowered.com:443 with no proxy
purple/proxy-Message: Connecting to api.steampowered.com:443.
purple/proxy-Message: Connected to api.steampowered.com:443.
purple/nss-Message: subject=CN=api.steampowered.com,O=Valve Corporation,L=Bellevue,ST=Washington,C=US,postalCode=98004,STREET=10900 NE 4th St,STREET=Suite 500,serialNumber=602290773,incorporationState=Washington,incorporationCountry=US,businessCategory=Private Organization issuer=CN=DigiCert High Assurance EV CA-1,OU=www.digicert. com,O=DigiCert Inc,C=US

So there you go. Hope this is useful for someone out there.

Geen opmerkingen:

Een reactie posten