Steam/zh: Difference between revisions

RhenCloud (talk | contribs)
Created page with "默认情况下,Steam 还会在 <code>~/.steam/root/compatibilitytools.d</code> 中查找自定义 Proton 版本。可以通过设置环境变量 <code>STEAM_EXTRA_COMPAT_TOOLS_PATHS</code> 来添加其他搜索路径。"
RhenCloud (talk | contribs)
Created page with "=== 修复 GNOME Dock 栏和活动概览中游戏图标缺失的问题 ==="
Line 147: Line 147:
<span id="Overriding_the_Steam_package"></span>
<span id="Overriding_the_Steam_package"></span>
=== 覆盖 Steam 软件包 ===
=== 覆盖 Steam 软件包 ===
<div lang="en" dir="ltr" class="mw-content-ltr">
在某些情况下,您可能需要覆盖默认的 Steam 程序包以提供缺失的依赖项或修改其构建。为此,请使用 <code>programs.steam.package</code> 选项。NixOS 上的 Steam 会在 FHS 环境下运行许多游戏,但 Steam 客户端本身或某些工具可能需要额外的库。
In some cases, you may need to override the default Steam package to provide missing dependencies or modify its build. Use the <code>programs.steam.package</code> option for this. Steam on NixOS runs many games in an FHS environment, but the Steam client itself or certain tools might need extra libraries.
示例:添加 Bumblebee Primus(适用于 NVIDIA Optimus):
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
Example: Adding Bumblebee and Primus (for NVIDIA Optimus):
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.steam.package = pkgs.steam.override {
programs.steam.package = pkgs.steam.override {
Line 162: Line 158:
</syntaxhighlight>
</syntaxhighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
示例:为 Gamescope 添加 Xorg 库(在 Steam 中使用时):
Example: Adding Xorg libraries for Gamescope (when used within Steam):
</div>
<syntaxhighlight lang="nix">
<syntaxhighlight lang="nix">
programs.steam.package = pkgs.steam.override {
programs.steam.package = pkgs.steam.override {
Line 183: Line 177:
</syntaxhighlight>
</syntaxhighlight>


<div lang="en" dir="ltr" class="mw-content-ltr">
<span id="Fix_missing_icons_for_games_in_GNOME_dock_and_activities_overview"></span>
=== Fix missing icons for games in GNOME dock and activities overview ===
=== 修复 GNOME Dock 栏和活动概览中游戏图标缺失的问题 ===
</div>
<div lang="en" dir="ltr" class="mw-content-ltr">
<div lang="en" dir="ltr" class="mw-content-ltr">
GNOME uses the window class to determine the icon associated with a window. Steam currently doesn't set the required key for this in its .desktop files<ref>https://github.com/ValveSoftware/steam-for-linux/issues/12207</ref>, but you can fix this manually by editing the <code>StartupWMClass</code> key for each game's .desktop file, found under <code>~/.local/share/applications/</code>.
GNOME uses the window class to determine the icon associated with a window. Steam currently doesn't set the required key for this in its .desktop files<ref>https://github.com/ValveSoftware/steam-for-linux/issues/12207</ref>, but you can fix this manually by editing the <code>StartupWMClass</code> key for each game's .desktop file, found under <code>~/.local/share/applications/</code>.