• Kali Linux上以root身份运行PlayOnLinux


       安装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

     
  • 相关阅读:
    Linux下用命令格式化U盘
    ABAP
    [Java 并发] Java并发编程实践 思维导图
    html和css实现一级菜单和二级菜单学习笔记
    小贝_mysql建表以及列属性
    Android.mk具体解释
    Maven之——坐标和依赖(上)
    让 Nginx 支持 WAF 防护功能web防火墙
    EZHTTP首页、文档和下载
    http://www.sshguard.net/
  • 原文地址:https://www.cnblogs.com/awakenedy/p/12176405.html
Copyright © 2020-2023  润新知