「Steam」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎インストール: 一部翻訳および転載)
19行目: 19行目:
 
Arch Linux で Steam を実行するには、以下の要件を満たす必要があります。
 
Arch Linux で Steam を実行するには、以下の要件を満たす必要があります。
   
* 32 ビット版の[[Xorg#Driver installation|OpenGL graphics driver]]をインストールします。
+
* 32 ビット版の [[Xorg#Driver installation|OpenGL graphics driver]] をインストールします。
 
* Generated [[Locale#Generating locales|en_US.UTF-8]] locale, preventing invalid pointer error.
 
* Generated [[Locale#Generating locales|en_US.UTF-8]] locale, preventing invalid pointer error.
 
* The GUI heavily uses the Arial font. See [[Microsoft fonts]]. An alternative is to use {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|fonts provided by Steam]] instead.
 
* The GUI heavily uses the Arial font. See [[Microsoft fonts]]. An alternative is to use {{Pkg|ttf-liberation}} or [[Steam/Troubleshooting#Text is corrupt or missing|fonts provided by Steam]] instead.

2021年8月27日 (金) 10:54時点における版

関連記事

Steam は Valve による人気のゲーム配信プラットフォームです。

ノート: Steam for Linux は Ubuntu LTS のみサポートします[1]。したがって、Arch Linux での Steam の問題のサポートを Valve に頼らないでください。

インストール

multilib リポジトリを有効にして、steam パッケージをインストールします。

Arch Linux で Steam を実行するには、以下の要件を満たす必要があります。

SteamCMD

Steam のコマンドライン版 steamcmdAURインストールします。

Alternative Flatpak installation

Steam can also be installed with Flatpak as com.valvesoftware.Steam from Flathub. The easiest way to install it for the current user is by using the Flathub repo and flatpak command:

 flatpak --user remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
 flatpak --user install flathub com.valvesoftware.Steam
 flatpak run com.valvesoftware.Steam

The Flatpak application currently does not support themes. Also you currently cannot run games via optirun/primusrun, see Issue#869 for more details.

Steam installed via Flatpak is not able to access your home directory and overriding this will cause Steam to not run because it is not safe. However, you can freely add directories outside the home directory. If you want to add an external library, run the following command to add it:

flatpak override com.valvesoftware.Steam --filesystem=/path/to/directory

Asian Font Problems with Flatpak

If you are having problem getting Asian fonts to show in game, it's because org.freedesktop.Platform does not include it. First try mounting your local font :

flatpak run --filesystem=~/.local/share/fonts --filesystem=~/.config/fontconfig  com.valvesoftware.Steam

If that does not work, consider this hack: make the fonts available by directly copying the font files into org.freedesktop.Platform's directories, e.g.

# replace ? with your version and hash
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.avail
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/etc/fonts/conf.d 
/var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/?/?/files/share/fonts

Directory structure

The default Steam install location is ~/.local/share/Steam. If Steam cannot find it, it will prompt you to reinstall it or select the new location. This article uses the ~/.steam/root symlink to refer to the install location.

Library folders

Every Steam application has a unique AppID, which you can find out by looking at its Steam Store page path.

Steam installs games into a directory under LIBRARY/steamapps/common/. LIBRARY normally is ~/.steam/root but you can also have multiple library folders (Steam > Settings > Downloads > Steam Library Folders).

In order for Steam to recognize a game it needs to have an appmanifest_AppId.acf file in LIBRARY/steamapps/. The appmanifest file uses the KeyValues format and its installdir property determines the game directory name.

Usage

steam [ -options ] [ steam:// URL ]

For the available command-line options see the Command Line Options article on the Valve Developer Wiki.

Steam also accepts an optional Steam URL, see the Steam browser procotol.

Launch options

When you launch a Steam game, Steam executes its launch command in a Bash shell. To let you alter the launch command Steam provides launch options, which can be set for a game by right-clicking on it in your library, selecting Properties and clicking on Set Launch Options.

By default Steam simply appends your option string to the launch command. To set environment variables or pass the launch command as an argument to another command you can use the %command% substitute.

Examples

  • only arguments: -foo
  • environment variables: FOO=bar BAZ=bar %command% -baz
  • completely different command: othercommand # %command%

Steam の起動

Big Picture モード

ディスプレイマネージャ (GDM など) から Big Picture モードで Steam を起動するには、以下の内容で /usr/share/xsessions/steam-big-picture.desktop ファイルを作成して下さい:

/usr/share/xsessions/steam-big-picture.desktop
[Desktop Entry]
Name=Steam Big Picture Mode
Comment=Start Steam in Big Picture Mode
Exec=/usr/bin/steam -bigpicture
TryExec=/usr/bin/steam
Icon=
Type=Application

ヒントとテクニック

Bumblebee/Primus などのカスタムコマンドでゲームを起動する

幸いにも Steam はカスタムコマンドを使ったゲーム起動のサポートを追加しました。これをするには、ライブラリページから、選択したゲームを右クリックして、プロパティをクリック、そして起動設定をしてください。Steam は %command% タグを実際に実行するコマンドに置き換えます。例えば、Team Fortress 2 を1920x1080の解像度で primusrun を使って起動するには、次のように入力します:

primusrun %command% -w 1920 -h 1080

AMD PRIME を使っている場合、起動オプションは以下のようになります:

DRI_PRIME=1 %command%

Linux-ck カーネルを動かしている場合、schedtool を使ってゲームを SCHED_ISO (低遅延、CPU 負担を減らす) で起動することで遅延を減らしたりパフォーマンスを向上させたりすることができるかもしれません:

# schedtool -I -e %command% other arguments

Steam のスキン

ノート: 最新の Steam クライアントのバージョンに対応していないスキンを使うと外観がおかしくなる可能性があります。

インターフェースファイルをスキンディレクトリにコピーしたりファイルを修正することで Steam のインターフェースを完全にカスタマイズすることができます。

スキンのリストは Steam のフォーラム にあります。

Steam フレンド通知の位置を変える

ノート: ゲームによっては位置の変更をサポートしていないことがあります。例えば XCOM: Enemy Unknown では使えません。

方法 1: スキンを使う

通知コーナーを変更だけを行うスキンを作ることができます。手動でスキンを作成する時間を節約したい場合は mediafire にアップロードされたスキンを使って下さい。ここからダウンロード してホームフォルダに展開します (サブディレクトリには展開しないで下さい、つまり zip の中にある .local フォルダはホームディレクトリに移動する必要があります)。その後 Steam を開いて、設定から、インターフェースタブを開いて下さい。< デフォルトスキン > と書かれたドロップダウンリストからお望みのスキンを選択すれば通知が移動されます。

ファイルを手動で作成してみたい場合、以下がその方法です。まずディレクトリを作成する必要があります:

$ mkdir -p $HOME/Top-Right/resource
$ cp -R $HOME/.steam/steam/resource/styles $HOME/Top-Right/resource/
$ mv $HOME/Top-Right $HOME/.local/share/Steam/skins/
$ cd .local/share/Steam/skins/
$ cp -R Top-Right Top-Left && cp -R Top-Right Bottom-Right

それから好きなテキストエディタで修正したいファイルを開いてください。gameoverlay.style はゲーム内のオーバーレイでのコーナーを変更し steam.style はデスクトップでのコーナーを変更します。次の例では nano を使ってゲーム内のオーバーレイのファイルを編集します。

$ nano Top-Right/resource/styles/gameoverlay.style

そして開いたファイルの中にある Notifications.PanelPosition エントリを探して適当な値に変更して下さい、例えば右上にするには:

Notifications.PanelPosition     "TopRight"

この行はどちらのファイルでも同じです。3つの種類 (Top-Right, Top-Left, Bottom-Left) があるので満足するまでスキン毎にデスクトップ・ゲーム内オーバーレイのコーナーを調整して、ファイルを保存してください。

上で説明しているように Steam でスキンを選択すれば作業は完了です。このスキンファイルは違うディストリビューションでも Windows でも使用することができます (macOS にはデスクトップ通知の配置を決める別のエントリが存在します)。

方法 2: オンザフライパッチ

この方法は Steam が将来アップデートされても互換性があります。上のスキンファイルは steam の一部としてアップデートされオリジナルのファイルが変更されたような場合、スキンは steam のグラフィックの変更に追従しないため、変更される度に再作成する必要があります。また、この方法ではゲームの起動オプションで通知の位置を変更するパッチを実行するように指定することができるので、ゲームごとに通知の場所を変えることが可能です。

Steam はアップデートするたびに (起動する度に行います) 編集する必要があるファイルを更新するので、Steam を起動した後にファイルにパッチをあてるのが一番効率的です。

まず このパッチ(pastebin バージョン) が必要です。エントリを編集して "BottomRight" (デフォルト), "TopRight", "TopLeft", "BottomLeft" で変えることができますが元のファイルでは "TopRight" を使っています。このファイルを $HOME/.steam/topright.patch として保存してください。

ノート: For pastebin to work you need to copy the raw data from line 1 through line 12 (line 12 is whitespace, but the patch will fail without it, this is why I provided a mediafire version too) you basically need to start copying behind the "-" sign at the bottom of the raw paste data and go up from there.

次に $HOME/.bashrc にエイリアスを作成します:

alias steam_topright='pushd $HOME/.steam/ && patch -p1 -f -r - --no-backup-if-mismatch < topright.patch && popd'

一度ログアウトしてログインしなおしエイリアスを更新してください。Steam を起動して完全にロードされるまで待ってから、エイリアスを実行します:

$ steam_topright

これでほとんどのゲームで通知が右上のコーナーに表示されるようになります。

ゲームによって使用するコーナーを変えたい場合、パッチを複製して他のコーナーのエイリアスを作成することができます。

この作業を自動化したい場合、steam の起動オプションはエイリアスを読み取れないためスクリプトファイルが必要です。ファイルのパスや名前は例えば $HOME/.scripts/steam_topright.sh などにして、実行可能属性を付与する必要があります:

$ chmod +755 $HOME/.scripts/steam_topright.sh

ファイルの中身は以下のようになります:

#!/bin/sh
pushd $HOME/.steam/ && patch -p1 -f -r - --no-backup-if-mismatch < topright.patch && popd

起動オプションは以下のようになります:

$HOME/.scripts/steam_topright.sh && %command%

gameoverlay.style フォルダと同じフォルダに steam.style という名前の別のファイルが存在し、パッチをあてたファイルと同じように働くエントリが存在し、(ゲーム内ではなく)デスクトップの通知コーナーを変更しますが、このファイルを編集して使うには steam を起動する前に設定して steam がファイルを書き換えないように読み取り専用にフォルダを設定する必要があります。そのためこのファイルを編集する方法は、ディレクトリを読み取り専用にして steam が起動時に変更しないようにする (アップデートが壊れる可能性あり) か、方法1のようにスキンを作成するかのどちらかしかありません。

サイレントモード

起動時にメインウィンドウを表示させたくない場合、-silent オプションを使ってください:

$ steam -silent
ヒント: 上記のオプションはデスクトップエントリに追加できます。

ストリーミングサーバー

https://steamcommunity.com/sharedfiles/filedetails/?id=680514371 を参照してください。

ゲームの appid の取得

以下の手順に従うことでゲームの appid を確認することができます:

  1. Steam の中からゲームを右クリックしてデスクトップショートカットを作成
  2. デスクトップファイル (例: ~/Desktop/<game>.desktop) を開いてください
  3. 以下のような行があったら 65980 がゲームの appid です:
Exec=steam steam://rungameid/65980 

appid を使うことでコマンドラインから直接ゲームを起動できます。例:

$ cat ~/Desktop/<game>.desktop | grep rungameid 
    Exec=steam steam://rungameid/65980
$ cd .steam/steam/steamapps/common/<game>
$ touch steam_appid.txt 
$ echo 65980 > steam_appid.txt
$ ./<game>

問題をトラブルシューティングするときに有用です。コマンドラインからゲームを起動したときに appid が見つからないというエラーが出る問題も解決できます。

トラブルシューティング

Steam/トラブルシューティングを参照してください。

参照