我在覆盆子pi3上开始使用铬有问题, python代码在/ etc / profile
中启动时启动cd /home/pi/Documents/raspberry/
DISPLAY=:0 python3 script.py
loader.html加载normaly,然后index.html退出kiosk模式,它全屏显示,但顶部有任务栏,即使我隐藏任务栏,代码只能打开全屏作为窗口打开(没有标签)。
def openstart(name="loader"):
if name=="index":
subprocess.Popen(['chromium-browser','--allow-file-access-from-files', '--kiosk', 'file:///home/pi/Documents/raspberry/'+name+'.html'])
else:
subprocess.Popen(['chromium-browser','--allow-file-access-from-files', '--kiosk', 'file
:///home/pi/Documents/raspberry/'+name+'.html'])
return True
openstart()
openstart("index")