我怎样才能让 Mumble 的叠加层正常工作?

我怎样才能让 Mumble 的叠加层正常工作?

Mumble 和 Team Fortress 2 (TF2) 单独对我来说都工作得很好,但我无法让 Mumble-overlay 工作,无论是独立的还是在 TF2 中。

我尝试将以下启动选项放入 Steam 中的 TF2 属性中,但均无效。 (注意,我还使用 bumblebee 和 64 位计算机。)

mumble-overlay primusrun %command%
mumble-overlay primusrun %command% -nod3d9ex
mumble-overlay primusrun %command% -d3d9ex -32bit
LD_PRELOAD=/usr/lib/mumble/libmumble.so.1.2 primusrun %command%

TF2 处于窗口模式,因此我很高兴 Mumble 生成自己的覆盖层(未注入到 TF2 中)。

答案1

因为此修复依赖于修改复合管理器,并且一次只能有一个复合管理器,所以很难做到,除非您已经使用没有复合管理器的系统。我怀疑可以将 LD_PRELOAD 应用于任何组合管理器,但组合管理器特定于每个操作系统和桌面环境。我还怀疑您可以强制操作系统使用 compton 和修复程序,但这又是特定于操作系统/桌面环境的。

如果您有复合管理器,请跳过下一部分,如果您没有复合管理器,请按照以下步骤操作:

Install compton

Run the following command in your terminal and you will be all set, note that you must rerun this command every time you login, so I suggest putting this in your .bash_profile or .zprofile (if using ZSH).

LD_PRELOAD=/usr/lib/mumble/libmumble.so compton -CGb --backend glx --paint-on-overlay

The flags -CG disable shadow effects
The flag -b runs it in the background as a daemon
The flag --backend glx runs it using OpenGL

The flag --paint-on-overlay paints on X Composite overlay window instead of on root window. You can add the flag --vsync with an argument to enable vsync.

Run mumble. Because of the nature of the fix, you can start mumble after TF2 and still have the overlay show up. The overlay will appear whenever you are connected to a mumble server.

如果您像大多数人一样并且有一个与您的操作系统捆绑在一起的复合管理器,则此任务会变得更加复杂,因为您无法同时运行 2 个合成器。请注意,这个修复相当难看,需要一些时间来设置,并且还要求您每次想要使用 mumble 覆盖时都注销。以下步骤是根据本指南进行解释和修改的。

Install compton and openbox (you can optionally install obconf and obmenu, but they are not necessary)

Create the directory ~/.config/openbox if it does not exist

In that directory create a file called autostart

In that file, place the following (any line starting with a # is a comment and it will not be run)

# Starts compton and is necessary for the overlay to work, look at the above section on compton to decide what flags you want to use
LD_PRELOAD=/usr/lib/mumble/libmumble.so compton -CGb --backend glx --paint-on-overlay &

# Autostarts steam
steam &

# Autostarts mumble (comment out to stop mumble from automatically starting)
mumble &

# You also can place any program in here that you wish to start
# Use a & at the end of the name so that your computer does no wait until
# that program is fully started before it start the next program.

When you wish to play a game, logout of you account, and then select openbox as your desktop environment. This requires a login manager than supports multiple desktop environments. Most do, but it may require you to look around to find out how to switch desktop environments. If you are using startx/.xinitrc, make sure that you use exec openbox-session rather than exec openbox because exec openbox does not automatically load the autostart file.

To return to your normal desktop, logout of your account and then select your normal desktop environment from you login manager.

相关内容