Difference between revisions of "Steam"

From ArchWiki
Jump to: navigation, search
m (Removed extra whitespace from the top (cleaned up the look))
(Starting Steam Sound Conflict)
Line 106: Line 106:
  
 
=== Starting Steam Sound Conflict ===
 
=== Starting Steam Sound Conflict ===
With Steam version including the Steam Community feature the sound is reserved for the Steam client rather than for the game application. This means that applications started by Steam might not get access to the Linux sound resources. To prevent this start an MP3 player (e.g. XMMS) and play a song before starting Steam with the above command. After Steam is available you can close your MP3 player and can start your Steam application with sound.
+
With Steam version including the Steam Community feature the sound is reserved for the Steam client rather than for the game application. This means that applications started by Steam might not get access to the Linux sound resources. To prevent this start an MP3 player (e.g. XMMS) and play a song before starting Steam with the above command. After Steam is available you can close your MP3 player and can start your Steam application with sound. An alternative is to [http://wiki.archlinux.org/index.php/Allow_multiple_programs_to_play_sound_at_once allow multiple programs to play sound at once].
  
 
=== Application Launch Options ===
 
=== Application Launch Options ===

Revision as of 15:27, 4 January 2008

Steam is a content delivery system made by Valve Software. It is most known as the platform needed to play Half-Life 1 and Half-Life 2 based games (Counter-Strike, Day of Defeat, etc), but now offers many other games from other developers. For more information, please see SteamPowered.com

This article will describe how install and run it on Arch Linux using WINE.

Preparation

If you have an old ~/.wine/ directory, you may consider deleting it completely or backing it up. Old settings from previous installs may mess things up and Steam may not work correctly. If you do not have WINE installed yet, install it with pacman (you need the extra repository enabled in your /etc/pacman.conf file):

pacman -S wine

Now run the wine configuration program once to create an initial ~/.wine/

winecfg

Install Fonts

Steam requires the Tahoma font. You will have to get this from a Windows install or somewhere online.

mv tahoma.ttf ~/.wine/drive_c/windows/fonts/

Steam uses the Marlett font for the minimize/close/etc buttons. It's not absolutely required, but it will make it look nicer. Again, get this font from a Windows install or somewhere online.

mv marlett.ttf ~/.wine/drive_c/windows/fonts/


Download Steam and Install

Download the Steam installer from steampowered.com. It is no longer an .exe file so you have to start it with this command:

wine msiexec /i SteamInstall.msi

After it goes through the install procedure, it will automatically update itself and appear to shutdown and restart itself numerous times. Just be patient. If it crashes when the update process is at 26%, rename the SteamTemp.exe file to Steam.exe and run "wine Steam.exe" to complete the update. Eventually it will ask you to create an account or login to an existing account.


You cannot type text in the fields of the login box in Steam by default. In order to get keyboard focus, right-click on the text areas first, then type in your username and password. You may want to check "Remember my password" so you don't have to go through this hassle everytime Steam starts.

The old installer binary is no longer officially supported by Valve but it still works and doesn't cause problems when installing Steam. It's still hosted on many pages on the internet, so you can easily get it by searching for "steaminstaller.exe download" on Google.


Alternate Login Fix Method

If right-clicking on the text areas does not give you focus and you are unable to type in your username and password, you will have to enable a virtual desktop. First, go on to the next step of the Wiki describing how to start Steam correctly. Then, run winecfg

winecfg

Go to the "Graphics" tab, check the "Emulate a virtual desktop" box, and enter a resolution of 1024x768 or higher. Press OK and close the program.

Start Steam. It should start in a larger WINE window. Now you can enter your username and password. Remember to check "Remember my password". After you confirm you can login, close Steam.

Open winecfg, disable the virtual desktop, and start Steam again. It should login now without prompting for a username and password


After you login, it will update some more and finally bring up the Steam main menu and you should be able to operate Steam without problems.

When Steam tries to load webpages within it's UI, WINE will prompt you to install the Gecko Engine to show these pages. Choose to install it. Without it, Steam will become unstable and crash.

If you had an old version of Mozilla ActiveX Installed: You will notice that webpages are blank and will probably experience instability within Steam. You need to remove the old controls. Close Steam and run this command:

wine regedit /D "HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{1339B54C-3453-11D2-93B9-000000000000}"


Starting Steam

In order to start Steam again later, you need to first change to the Steam directory, and then run

wine steam.exe

Giving WINE a path to steam.exe will not work. Do not do this:

wine ~/.wine/drive_c/Program\ Files/Steam/steam.exe

Alternatively, you may use this method:

wine "C:\\Program Files\\Steam\\steam.exe" 

You should make a small startup script to start Steam, for example, steam.sh

#!/bin/bash

# WINE binary
CDLOADER_WINE="wine"

# Steam directory
STEAMDIR="$HOME/.wine/drive_c/Program Files/Steam"

cd "$STEAMDIR"

$CDLOADER_WINE "steam.exe" -- "$@" 


Starting Steam with Priority

Start Steam with priority by using

WINEDEBUG="-all" nice -n -8 wine steam.exe
Values of nice below -8 should be rejected with an access problem since the wine user does not have admin rights.

Starting Steam Sound Conflict

With Steam version including the Steam Community feature the sound is reserved for the Steam client rather than for the game application. This means that applications started by Steam might not get access to the Linux sound resources. To prevent this start an MP3 player (e.g. XMMS) and play a song before starting Steam with the above command. After Steam is available you can close your MP3 player and can start your Steam application with sound. An alternative is to allow multiple programs to play sound at once.

Application Launch Options

Go to "Properties" -> "Set Launch Options"

-console -dxlevel 90 -width 1280 -height 1024
  • console
    Activate the console in the application to change detailed applications settings.
  • dxlevel
    Set the application's DirectX level, e.g. 90 for DirectX Version 9.0. It is recommended to use the video card's DirectX version to prevent crashes. See the official Valve Software Wiki http://developer.valvesoftware.com/wiki/DirectX_Versions for details.
  • width and height
    Set the screen resolution. In some cases the graphic settings are not saved in the application and the applications always starts in the default resolution.

Please refer to http://developer.valvesoftware.com/wiki/Launch_options for a complete list of launch options.

Using a Pre-Existing Steam Install

If you have a shared drive with Windows, or already have a Steam installation somewhere else, you can simply symlink the Steam directory to ~/.wine/drive_c/Program Files/Steam/ . However, be sure to do all the previous steps in this Wiki. Confirm Steam launches and logs into your account, then do this:

cd ~/.wine/drive_c/Program\ Files/ 
mv Steam/ Steam.backup/   (or you can just delete the directory)
ln -s /mnt/windows_partition/Program\ Files/Steam/


Running Steam in a second X Server

Assuming you are using the script above to start Steam, make a new script, called x.steam.sh . You should run this when you want to start Steam in a new X server, and steam.sh if you want Steam to start in the current X server.

#!/bin/bash 

DISPLAY=:1.0

xinit $HOME/steam.sh $* -- :1

Now you can use CTRL+ALT+F7 to get to your first X server with your normal desktop, and CTRL+ALT+F8 to go back to your game.

Because the second X server is only running the game and the first X server with all your programs is backgrounded, performance should increase. In addition, it is much more convenient to switch X servers while in game to access other resources, rather than having to exit the game completely or alt-tab out. Finally, it is useful for when Steam or WINE goes haywire and leaves a bunch of processes in memory after Steam crashes. Simply CTRL+ALT+BACKSPACE on the second X server to kill that X and all processes on that desktop will terminate as well.

If you can't switch between X servers with the CTRL+ALT keys: Make sure your keyboard is set correctly in your xorg.conf. There may be help in this thread.

If you get errors that look like "Xlib: connection to ":1.0" refused by server" when starting the second X: You will need to adjust your X permissions. See section 9 of this page for help.

If you lose the ability to use the keyboard while using Steam: This is an odd bug that doesn't happen with other games. A solution is to use a WM in the second X as well. Thankfully, you don't need to run a large WM. Openbox and icewm have been confirmed to fix this bug (evilwm, pekwm, lwm don't work), but the icewm taskbar shows up on the bottom of the game. I would use openbox for now.

pacman -S openbox

Then add "openbox &" to the top of your steam.sh file. Note you can run other programs (ex. Teamspeak &) or set X settings (ex. xset, xmodmap) before the WINE call as well.


Known Issues

Besides not being able to type in the login window, here are some other issues:

  • The Steam windows do not respect WM desktop workspaces. All Steam windows will appear on all workspaces. In addition, all Steam windows will always be on top of other windows. (confirmed on Openbox only)
  • The system tray icon may not be placed in your WM's system tray. Instead it will be in a floating window, named "WINE System Tray Adapter". It still works as expected, however. (confirmed on Openbox only)
  • Switching the Audio Driver in "winecfg" from OSS to ALSA causes games to hang. (confirmed only with Half-Life 1 based games)