树莓派图形界面启动chromium并全屏

方法1. 随便一搜都是这种方法

创建文件:  /home/pi/.config/autostart/my.desktop    文件名随意, 后缀必须.desktop

文件内容:

​[Desktop Entry]
Type=Application
Name=Auto Start Chromium
​Exec=chromium-browser  --disable-popup-blocking --no-first-run --disable-desktop-notifications  --kiosk --incognito "http://www.url.com/"


方法2:

创建shell脚本 /home/pi/autostart.sh

脚本内容: 
#!/bin/bash
/usr/bin/chromium-browser \
--disable-popup-blocking --no-first-run --disable-desktop-notifications --incognito --kiosk \
http://www.url.com/

编辑文件:/home/pi/.config/lxsession/LXDE-pi/autostart 
在文件最后添加  @/home/pi/autostart.sh

 

方法1一开始重启多次均无效, 在尝试方法2之后, 方法1生效了, 不明白为什么

 

posted @ 2018-12-18 19:12  Hanf  阅读(1007)  评论(0编辑  收藏  举报
Copyright © 2008-2016 Hanf All Rights Reserved