3 # Purpose: start browser with documentation for Grml (based) system
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 ################################################################################
10 [ -n "$distri" ] || distri=grml
12 if [ -r "/usr/share/doc/${distri}-docs/index.html" ] ; then
13 # support easy customisation, file doesn't exist
14 # by default on mainline Grml
15 local PAGE="/usr/share/doc/${distri}-docs/index.html"
17 local PAGE='/usr/share/doc/grml-docs/startpage.html'
20 . /etc/grml/script-functions
23 if [ -n "$DISPLAY" ] ; then
24 if check4progs dillo &>/dev/null ; then
26 elif check4progs xlinks2 &>/dev/null ; then
27 xlinks2 -mode 640x480 $PAGE
28 elif check4progs firefox &>/dev/null ; then
30 elif check4progs x-www-browser &>/dev/null ; then
32 elif check4progs zenity &>/dev/null ; then
33 zenity --no-wrap --error --text="Sorry, no usable X browser (dillo, xlinks2, firefox,...) found."
35 elif check4progs Xdialog &>/dev/null ; then
36 Xdialog --msgbox "Sorry, no usable X browser (dillo, xlinks2, firefox,...) found." 0 0
40 # do we have a real console?
41 if [[ $(tty) == /dev/tty* ]] ; then
42 # do we have framebuffer support?
43 if [ -c /dev/fb0 ] ; then
44 if check4progs links2 &>/dev/null ; then
45 links2 -driver fb $PAGE
46 elif check4progs w3m &>/dev/null; then
48 elif check4progs links &>/dev/null ; then
51 echo "Sorry, neither links2 nor w3m nor links available. Exiting.">&2
54 else # no, we don't have framebuffer
55 if check4progs w3m &>/dev/null ; then
57 elif check4progs links &>/dev/null ; then
59 elif check4progs links2 &>/dev/null ; then
62 echo "Sorry, neither w3m nor links nor links2 available. Exiting.">&2
66 else # no, probably we are running inside GNU screen
67 if check4progs w3m &>/dev/null ; then
69 elif check4progs links2 &>/dev/null ; then
71 elif check4progs links &>/dev/null ; then
74 echo "Sorry, neither w3m nor links2 nor links available. Exiting.">&2
80 ## END OF FILE #################################################################