安装PlayOnLinux
apt-get install playonlinux
以root身份运行PlayOnLinux
遇到一条消息“PlayOnLinux不应该以root身份运行。抱歉”
网上查找了一下参照了 https://blog.csdn.net/wislove/article/details/86703029 的方法解决了问题
其方法就是打开mainwindow.py文件
vim /usr/share/playonlinux/python/mainwindow.py
找以下行在行前添加#来注释掉它们:
if(os.popen("id -u").read() == "0
" or os.popen("id -u").read() == "0"):
wx.MessageBox(_("{0} is not supposed to be run as root. Sorry").format(os.environ["APPLICATION_TITLE"]),_("Error"))
os._exit(1)
打开sources文件
vim /usr/share/playonlinux/lib/sources
找以下行在行前添加#来注释掉它们:
if [ "$(id -u)" = "0" ]
then
echo "PlayOnLinux is not supposed to be run as root. Sorry"
exit
fi
在对文件进行上述更改后,重新以root运行playonlinux 出下了如下问题:
Looking for python... 2.7.17 - wxversion(s): 3.0-gtk3
selected
1
Traceback (most recent call last):
File "mainwindow.py", line 54, in <module>
wxversion.ensureMinimal('2.8')
File "/usr/lib/python2.7/dist-packages/wxversion.py", line 181, in ensureMinimal
raise AlreadyImportedError("wxversion.ensureMinimal() must be called before wxPython is imported")
wxversion.AlreadyImportedError: wxversion.ensureMinimal() must be called before wxPython is imported
解决 方法:
打开mainwindow.py文件
vim /usr/share/playonlinux/python/mainwindow.py
找到第54行在行前添加#来注释掉它:
wxversion.ensureMinial('2.8')
重新以root运行playonlinux