$ unset DISPLAY
$ wine ping
000b:fixme:winediag:start_process Wine Staging 3.21 is a testing version containing experimental patches.
000b:fixme:winediag:start_process Please mention your exact version when filing bug reports on winehq.org.
000b:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
000b:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0027:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
0027:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0027:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0027:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
002b:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
002b:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
0027:err:ole:apartment_createwindowifneeded CreateWindow failed with error -536870654
002d:err:winediag:nodrv_CreateWindow Application tried to create a window, but no driver could be loaded.
002d:err:winediag:nodrv_CreateWindow Make sure that your X server is running and that $DISPLAY is set correctly.
Could not load wine-gecko. HTML rendering will be disabled.
0027:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0027:err:ole:apartment_createwindowifneeded CreateWindow failed with error -536870654
0027:err:ole:apartment_createwindowifneeded CreateWindow failed with error 0
0027:err:ole:apartment_createwindowifneeded CreateWindow failed with error -536870654
wine: configuration in '/home/test/.wine' has been updated.
Usage: ping [-n count] [-w timeout] [-l buffer_length] target_name
Options:
-n Number of echo requests to send.
-w Timeout in milliseconds to wait for each reply.
-l Length of send buffer.
你只需要运行一个非图形化的 wine/windows 命令并且根本不需要设置
$DISPLAY
。这是一个例子:
通常会有弹出窗口要求下载 mono 和 wine-gecko。这些部件失败了(如果需要,它们可以预先提供 afaik),但正如您所看到的,无论如何都进行了升级:
(并且 ping 命令抱怨语法:它实际上运行了)。
当然,不能保证这种行为会保持不变。所以你应该做测试和备份。
编辑:如要求,对于更中立的命令和输出:
将只产生两行(或可能只有最后一行)到stderr并给出退出代码 0: