无法使用 wine 启动桌面文件

无法使用 wine 启动桌面文件

我不完全确定这是发帖的正确位置,但我的计算机上有 Pop!_OS 22.04 LTS,并且我尝试玩怀旧游戏“变形金刚:塞伯坦的陨落”。我找到了一份 Windows 副本,由于我在 Linux 上完全是个菜鸟,所以我可能错过了一些明显的答案。当我在终端尝试时:

wine "/home/danielgrant/.local/share/applications/wine/Programs/Activision/Transformers Fall of Cybertron/Transformers Fall of Cybertron.desktop"

我收到以下错误:

MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

0054:err:ntoskrnl:ZwLoadDriver failed to create driver L"\\Registry\\Machine\\System\\CurrentControlSet\\Services\\nsiproxy": c0000003
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

0024:err:process:exec_process L"Z:\\home\\danielgrant\\.local\\share\\applications\\wine\\Programs\\Activision\\Transformers Fall of Cybertron\\Transformers Fall of Cybertron.desktop" not supported on this system

我不知道从哪里开始,所以我将不胜感激每一个可能的帮助。

答案1

Desktop文件旨在由图形桌面环境启动,您不能将它们作为应用程序启动(这就是您正在做的事情)。

您可以通过运行来检查文件cat "/home/danielgrant/.local/share/applications/wine/Programs/Activision/Transformers Fall of Cybertron/Transformers Fall of Cybertron.desktop",然后使用后面的字符串Exec=来启动它。它也可能包含Path=变量,所以你最好cd "directory"先进入它。

或者检查这个答案如何*desktop从控制台启动文件:https://askubuntu.com/questions/5172/running-a-desktop-file-in-the-terminal

答案2

您可以通过使用桌面文件启动 wine 来运行程序,而不是通过使用 wine 启动桌面文件来运行程序。

编辑桌面文件,将 Type 条目更改为Application,并将 Exec 条目更改为wine <path to exe file>

例如,这是一个工作桌面文件,用于在我的系统上启动旧视频游戏的 Windows exe...

#!/usr/bin/env xdg-open
[Desktop Entry]
Version=1.0
Type=Application
Name=Asteroids
Comment=
Exec=wine '/home/David/C/Program Files (x86)/Atari/The 80 Classic Games/Asteroids.exe'
Icon=/home/David/System/Icons/Local Shared Icons/hicolor/48x48/apps/54DF_Menu.0.png
Path=
Terminal=false
StartupNotify=false

相关内容