使用127.0.0.1的時候,默認打開的是index.html,可以通過配置文件修改成我們想要的html
vi /etc/apache2/mods-enabled/dir.conf
<IfModule mod_dir.c>DirectoryIndex WS.html index.html index.cgi index.pl index.php index.xhtml index.htm
</IfModule># vim: syntax=apache ts=4 sw=4 sts=4 sr noet
如上是修改為了WS.html
開機自啟動火狐瀏覽器,打開127.0.0.1,延遲啟動(等待設備啟動,10s),步驟如下(建議使用desktop文件)
sudo vi?/etc/xdg/autostart/firefox-localhost.desktop
[Desktop Entry]
Type=Application
Name=Firefox Localhost
Exec=bash -c "sleep 10 && firefox --new-window 127.0.0.1"
StartupNotify=false
X-GNOME-Autostart-enabled=true
或者? sudo vi /etc/rc.local,在exit 0
之前添加
sleep 30
su - [你的用戶名] -c "export DISPLAY=:0 && firefox --new-window 127.0.0.1" &