「Steam」の版間の差分

提供: ArchWiki
ナビゲーションに移動 検索に移動
(→‎Steam のスキン: === Steam skins === から === Sharing Games With Windows Using Proton / Other Compatibility Layers === を英語版より転載)
145行目: 145行目:
   
 
スキンのリストは [http://forums.steampowered.com/forums/showthread.php?t=1161035 Steam のフォーラム] にあります。
 
スキンのリストは [http://forums.steampowered.com/forums/showthread.php?t=1161035 Steam のフォーラム] にあります。
  +
  +
=== Steam skins ===
  +
  +
The Steam interface can be customized using skins. Skins can overwrite interface-specific files in {{ic|~/.steam/root}}.
  +
  +
To install a skin:
  +
  +
# Place its directory in {{ic|~/.steam/root/skins}}.
  +
# Open ''Steam > Settings > Interface'' and select it.
  +
# Restart Steam.
  +
  +
An extensive list of skins can be found in [https://web.archive.org/web/20170528214751/http://forums.steampowered.com/forums/showthread.php?t=1161035 this Steam forums post].
  +
  +
{{Note|Using an outdated skin may cause visual errors.}}
  +
  +
==== Creating skins ====
  +
  +
Nearly all Steam styles are defined in {{ic|~/.steam/root/resource/styles/steam.styles}} (the file is over 3,500 lines long). For a skin to be recognized it needs its own {{ic|resource/styles/steam.styles}}.
  +
When a Steam update changes the official {{ic|steam.styles}} your skin may become outdated, potentially resulting in visual errors.
  +
  +
See {{ic|~/.steam/root/skins/skins_readme.txt}} for a primer on how to create skins.
  +
  +
=== Changing the Steam notification position ===
  +
  +
The default Steam notification position is bottom right.
  +
  +
You can change the Steam notification position by altering {{ic|Notifications.PanelPosition}} in
  +
  +
* {{ic|resource/styles/steam.styles}} for desktop notifications, and
  +
* {{ic|resource/styles/gameoverlay.styles}} for in-game notifications
  +
  +
Both files are overwritten by Steam on startup and {{ic|steam.styles}} is only read on startup.
  +
  +
{{Note|Some games do not respect the setting in {{ic|gameoverlay.styles}} e.g. XCOM: Enemy Unknown.}}
  +
  +
==== Use a skin ====
  +
  +
You can create a skin to change the notification position to your liking. For example to change the position to top right:
  +
  +
$ cd ~/.steam/root/skins
  +
$ mkdir -p Top-Right/resource
  +
$ cp -r ~/.steam/root/resource/styles Top-Right/resource
  +
$ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*
  +
  +
==== Live patching ====
  +
  +
{{ic|gameoverlay.styles}} can be overwritten while Steam is running, allowing you to have game-specific notification positions.
  +
  +
{{hc|~/.steam/notifpos.sh|
  +
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles
  +
}}
  +
  +
And the [[#Launch options]] should be something like:
  +
  +
~/.steam/notifpos.sh TopLeft && %command%
  +
  +
=== Steam Remote Play ===
  +
  +
{{Note|Steam In-Home Streaming [https://store.steampowered.com/news/51761/ has become Steam Remote Play].}}
  +
  +
Steam has built-in support for [https://store.steampowered.com/streaming/ remote play].
  +
  +
See [https://steamcommunity.com/sharedfiles/filedetails/?id=680514371 this Steam Community guide] on how to setup a headless streaming server on Linux.
  +
  +
=== Steam Controller ===
  +
  +
Normally a Steam controller requires the use of the Steam-overlay. In non-Steam native Linux games however the overlay may not be practical. For that, while the Steam client is running it will maintain a "desktop configuration". With your Steam controller, configure the desktop configuration for it as a generic XBOX controller. As long as the Steam client is running you can then use your Steam controller in other games, such as GOG games, as an XBOX controller. Make sure to select your type of controller to map to in "general controller settings".
  +
  +
=== Sharing Games With Windows Using Proton / Other Compatibility Layers ===
  +
  +
With the addition of Proton compatibility for games has increased thanks to Valve, you can use custom forks such as [https://github.com/GloriousEggroll/proton-ge-custom Proton GE] or others, to increase the amount of games that will work with it, you can extend this further to create a steam library on an NTFS volume containing your games, the only thing you ideally will have to force the uid and gid of the user you are currently logged in as so Steam may write files as needed, you will also need to make sure not to have the noexec option in your [[fstab]] or Steam will not be able to detect your games.
   
 
=== Steam フレンド通知の位置を変える ===
 
=== Steam フレンド通知の位置を変える ===

2021年8月31日 (火) 10:51時点における版

関連記事

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

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

インストール

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

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

  • 32 ビット版の OpenGL graphics driver をインストールします。
  • en_US.UTF-8 ロケールを生成して、無効なポインタエラーを防ぎます。
  • GUI は Arial フォントを多用しています。MS フォント を参照してください。別の方法は、代替として ttf-liberationSteam が提供するフォント を使うこともできます。
  • アジア言語のサポートを追加するには、wqy-zenhei をインストールしてください。
  • ネットワーク管理に systemd-networkd を使用している場合は、Steam がサーバーに接続できるようにするために lib32-systemd をインストールしてください。

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

ディレクトリ構造

Steam のデフォルトのインストール先は、~/.local/share/Steam です。Steam がこの場所を見つけられない場合、再インストールするか新しい場所を選択するように促されます。この記事では、~/.steam/root シンボリックリンクを使用してインストール場所を参照します。

ライブラリフォルダ

すべての Steam アプリケーションには固有の AppID が設定されており、Steam ストアのページパスを見ればわかります。

Steam はゲームを LIBRARY/steamapps/common/ 以下のディレクトリにインストールします。LIBRARY は通常、 ~/.steam/root ですが、複数のライブラリフォルダを作成することもできます。 (Steam > Settings > Downloads > Steam Library Folders).

Steam がゲームを認識するためには、LIBRARY/steamapps/appmanifest_AppId.acf ファイルが必要です。appmanifest ファイルは KeyValues フォーマットを使用し、その installdir プロパティでゲームのディレクトリを決定しています。

使用方法

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

使用可能なコマンドラインオプションについては、 Valve Developer Wiki のコマンドラインオプションの記事 を参照してください。

Steam はオプションで Steam URL も受けいれます。 Steam ブラウザプロトコル を参照してください。

起動オプション

Steam ゲームを起動すると、Steam は Bash シェルで 起動コマンド を実行します。起動コマンドを変更するために、Steam は 起動オプション を提供しています。起動オプションはライブラリ内のゲームを右クリックして、properties を選択し、Launch Options を設定します。

デフォルトでは、Steam はオプションの文字列を起動コマンドに追加します。環境変数を設定したり、起動コマンドを他のコマンドの引数として渡したりするには、%command% で代替して使用します。

使用例

  • 引数のみ: -foo
  • 環境変数: FOO=bar BAZ=bar %command% -baz
  • 完全に異なるコマンド: othercommand # %command%

ヒントとテクニック

Start Minimized

It's possible to have Steam start minimized to the system tray, rather than taking focus. Simply add -silent to the list of arguments in the autostart file.

~/.config/autostart/steam.desktop
...
Exec=/usr/bin/steam -silent
...

Fsync patch

Valve has released a special kernel patch that should help increase FPS in massively-threaded applications. There are few methods to get and use this patch:

Proton Steam-Play

Valve developed a compatibility tool for Steam Play based on Wine and additional components named Proton. It allows you to launch many Windows games (see compatibility list).

It is open-source and available on GitHub. Steam will install its own versions of Proton when Steam Play is enabled.

Proton needs to be enabled on Steam client: Steam > Settings > Steam Play. You can enable Steam Play for games that have and have not been whitelisted by Valve in that dialog.

If needed, to force enable Proton or a specific version of Proton for a game, right click on the game, click Properties > General > Force the use of a specific Steam Play compatibility tool, and select the desired version. Doing so can also be used to force games that have a Linux port to use the Windows version.

You can also install Proton from AUR with protonAUR or proton-gitAUR, but extra setup is required for them to work with Steam. See the Proton GitHub for details on how Steam recognizes Proton installs.

Big Picture Mode without a window manager

To start Steam in Big Picture Mode from a Display manager, you can either:

  • Install steamos-compositorAUR
  • Alternatively, install steamos-compositor-plusAUR, which hides the annoying color flashing on startup of Proton games and adds a fix for games that start in the background
  • Manually add a Steam entry (but you lose the steam compositor advantages: mainly you cannot control Big Picture mode with keyboard or gamepad):

create a /usr/share/xsessions/steam-big-picture.desktop file with the following contents:

/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

Steam のスキン

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

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

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

Steam skins

The Steam interface can be customized using skins. Skins can overwrite interface-specific files in ~/.steam/root.

To install a skin:

  1. Place its directory in ~/.steam/root/skins.
  2. Open Steam > Settings > Interface and select it.
  3. Restart Steam.

An extensive list of skins can be found in this Steam forums post.

ノート: Using an outdated skin may cause visual errors.

Creating skins

Nearly all Steam styles are defined in ~/.steam/root/resource/styles/steam.styles (the file is over 3,500 lines long). For a skin to be recognized it needs its own resource/styles/steam.styles. When a Steam update changes the official steam.styles your skin may become outdated, potentially resulting in visual errors.

See ~/.steam/root/skins/skins_readme.txt for a primer on how to create skins.

Changing the Steam notification position

The default Steam notification position is bottom right.

You can change the Steam notification position by altering Notifications.PanelPosition in

  • resource/styles/steam.styles for desktop notifications, and
  • resource/styles/gameoverlay.styles for in-game notifications

Both files are overwritten by Steam on startup and steam.styles is only read on startup.

ノート: Some games do not respect the setting in gameoverlay.styles e.g. XCOM: Enemy Unknown.

Use a skin

You can create a skin to change the notification position to your liking. For example to change the position to top right:

$ cd ~/.steam/root/skins
$ mkdir -p Top-Right/resource
$ cp -r ~/.steam/root/resource/styles Top-Right/resource
$ sed -i '/Notifications.PanelPosition/ s/"[A-Za-z]*"/"TopRight"/' Top-Right/resource/styles/*

Live patching

gameoverlay.styles can be overwritten while Steam is running, allowing you to have game-specific notification positions.

~/.steam/notifpos.sh
sed -i "/Notifications.PanelPosition/ s/\"[A-Za-z]*\"/\"$1\"/" ~/.steam/root/resource/styles/gameoverlay.styles

And the #Launch options should be something like:

~/.steam/notifpos.sh TopLeft && %command%

Steam Remote Play

ノート: Steam In-Home Streaming has become Steam Remote Play.

Steam has built-in support for remote play.

See this Steam Community guide on how to setup a headless streaming server on Linux.

Steam Controller

Normally a Steam controller requires the use of the Steam-overlay. In non-Steam native Linux games however the overlay may not be practical. For that, while the Steam client is running it will maintain a "desktop configuration". With your Steam controller, configure the desktop configuration for it as a generic XBOX controller. As long as the Steam client is running you can then use your Steam controller in other games, such as GOG games, as an XBOX controller. Make sure to select your type of controller to map to in "general controller settings".

Sharing Games With Windows Using Proton / Other Compatibility Layers

With the addition of Proton compatibility for games has increased thanks to Valve, you can use custom forks such as Proton GE or others, to increase the amount of games that will work with it, you can extend this further to create a steam library on an NTFS volume containing your games, the only thing you ideally will have to force the uid and gid of the user you are currently logged in as so Steam may write files as needed, you will also need to make sure not to have the noexec option in your fstab or Steam will not be able to detect your games.

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/トラブルシューティングを参照してください。

参照