3 # Purpose: start browser with documentation for grml
4 # Authors: grml-team (grml.org), (c) Michael Prokop <mika@grml.org>
5 # Bug-Reports: see http://grml.org/bugs/
6 # License: This file is licensed under the GPL v2.
7 # Latest change: Son Mär 09 13:57:29 CET 2008 [mika]
8 ################################################################################
10 local PAGE='/usr/share/doc/grml-docs/startpage.html'
12 . /etc/grml/script-functions
15 if [ -n "$DISPLAY" ]; then
16 if check4progs dillo ; then
18 elif check4progs firefox ; then
20 elif check4progs x-www-browser ; then
22 elif check4progs Xdialog ; then
23 Xdialog --msgbox "Sorry, no usable X browser found." 0 0
27 if grep -q small /etc/grml_version ; then
28 check4progs links && links $PAGE || { echo "Sorry, links not available. Exiting.">&2 ; exit 10 }
30 # do we have a real console?
31 if [[ $(tty) == /dev/tty* ]] ; then
32 # do we have framebuffer support?
33 if [ -c /dev/fb0 ] ; then
34 if check4progs links2 ; then
35 links2 -driver fb $PAGE
36 elif check4progs w3m ; then
39 echo "Sorry, neither links2 nor w3m available. Exiting.">&2
43 # no, we don't have framebuffer
44 check4progs w3m && w3m $PAGE || { echo "Sorry, w3m not available. Exiting.">&2 ; exit 30 }
47 # no, probably we are running inside GNU screen
48 check4progs w3m && w3m $PAGE || { echo "Sorry, w3m not available. Exiting.">&2 ; exit 40 }
53 ## END OF FILE #################################################################