在 Windows 10 下面執行 Wine

試著在 Windows 10 下跑 Wine,結果文章作者發現意外的簡單:「Wine on Windows 10. It works.」。

實際上大多數的事情是透過 Windows 10 的 WSL (Windows Subsystem for Linux) 所疊出來的,可以從這步看到:

3. Open the Microsoft Store, install Ubuntu. (This is basically what WSL was created to run.) I installed "Ubuntu 18.04 LTS". Open Ubuntu, and you'll see a bash terminal.

這是作者的成果:

還是有些限制 (像是目前還 32 bits 程式還要等之後的 WSL 支援),但比起早年得自己從頭搞起來簡單不少 (而且問題不少),算是完成作者的悲怨?

在 Linux 下引用 Windows 的 DLL 檔

作者為了在 Linux 下進行安全分析而弄出來的計畫:「Porting Windows Dynamic Link Libraries to Linux」。

作者對 Windows 的架構有不少抱怨 XDDD

Distributed, scalable fuzzing on Windows can be challenging and inefficient. This is especially true for endpoint security products, which use complex interconnected components that span across kernel and user space. This often requires spinning up an entire virtualized Windows environment to fuzz them or collect coverage data.

This is less of a problem on Linux, and I've found that porting components of Windows Antivirus products to Linux is often possible. This allows me to run the code I’m testing in minimal containers with very little overhead, and easily scale up testing.

This is just personal opinion, but I also think Linux has better tools. ¯\_(ツ)_/¯

而這個專案跟 WineHQ 完整模擬不一樣,這只是給 Linux 下原生的程式使用 Windows 下 DLL 內的功能:

This project does not replace Wine or Winelib.

Winelib is used to port Windows C++ projects to Linux, and Wine is intended to run full Windows applications. This project is intended to allow native Linux code to load simple Windows DLLs.

The closest analogy would be ndiswrapper but for userspace.

作者拿了 Windows Defender 當範例,示範在 Linux 下呼叫 Windows 的 DLL...

新版 Battle.net launcher 更新造成 Wine 不能跑...

Linux 上玩 Diablo III 常見的解法是使用 Wine 執行,但在這次更新後就掛了,狀況是在輸入完帳號密碼後就 crash:「Battle.net launcher update on Wine/Linux - Forums - Diablo III」。

不過有人居然找出 workaround 了 (這 workaround 怎麼找出來的啊):

But, there's a workaround to have a launcher : disable dbghelp library (wine configuration, libraries, type dbghelp, add, -> disable).

據說是將 dbghelp 設定停用後就可以跑了。另外也有人提供直接執行的方法:(當然,路徑要改成自己安裝 Diablo III 的目錄)

/mnt/lvm/Playonlinux/DiabloIII/drive_c/Program\ Files/Diablo\ III/Diablo\ III.exe -launch -uid diablo3_frfr

不過我為了找問題,把整個 Wine 以及 Diablo III 都砍掉了,所以是回到安裝新軟體的階段... 但發現安裝時也會遇到同樣的 crash 問題,而使用第一個方式關掉 dbghelp 後就可以安裝了,不知道可以前進到哪一步...

過陣子 Wine 應該會放出新版,畢竟 Blizzard 家的遊戲可是重要項目...

Wine 玩 Diablo III 音樂會頓的問題...

這幾天用 WineDiablo III,有時聲音會狂 lag,關掉 Diablo III 後重跑還是一樣,要重開機才會恢復...

仔細看 Wine 丟出來的訊息,發現訊息內有給這個網頁:「winepulse in ubuntu wine ppa」,其中提到 1.5.3 以後的 ppa 版本 (寫這篇文章的時候是 1.5.4) 可以在啟動 Wine 時加上環境變數 WINENOPULSE=1 解決聲音的問題。

目前測起來是正常了,不知道還會不會有其他問題要解...

在 Ubuntu (12.04) 上用 Wine 1.5.4 跑 Diablo III

主要是參考「WineHQ - Diablo III 1.0.*」這個網頁,另外找資料的時候有找到「[心得] Diablo III on Ubuntu 12.04 x86 - 看板 DIABLO - 批踢踢實業坊」這篇。

我是使用沒有 non-patch wine 1.5.4 跑的 (透過「Latest official WineHQ releases : “Ubuntu Wine Team” team」這邊提供的 ppa),所以必須先用 Windows 裝完 Diablo III 後再 copy 到 Ubuntu 裡面。

登入問題用 echo 0|sudo tee /proc/sys/kernel/yama/ptrace_scope 解,但這個方法需要在每次重開機後再設定一次,在 /etc/sysctl.conf 內設定 kernel.yama.ptrace_scope=0 可以使得系統在每次重開機自動設定。

特效全開還是跑得不錯...