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 Xdialog &>/dev/null ; then
33 Xdialog --msgbox "Sorry, no usable X browser (dillo, xlinks2, firefox,...) found." 0 0
35 elif check4progs gdialog &>/dev/null ; then
36 gdialog --msgbox "Sorry, no usable X browser (dillo, xlinks2, firefox,...) found." 0 0
38 elif check4progs zenity &>/dev/null ; then
39 zenity --info --text="Sorry, no usable X browser (dillo, xlinks2, firefox,...) found."
43 # do we have a real console?
44 if [[ $(tty) == /dev/tty* ]] ; then
45 # do we have framebuffer support?
46 if [ -c /dev/fb0 ] ; then
47 if check4progs links2 &>/dev/null ; then
48 links2 -driver fb $PAGE
49 elif check4progs w3m &>/dev/null; then
51 elif check4progs links &>/dev/null ; then
54 echo "Sorry, neither links2 nor w3m nor links available. Exiting.">&2
57 else # no, we don't have framebuffer
58 if check4progs w3m &>/dev/null ; then
60 elif check4progs links &>/dev/null ; then
62 elif check4progs links2 &>/dev/null ; then
65 echo "Sorry, neither w3m nor links nor links2 available. Exiting.">&2
69 else # no, probably we are running inside GNU screen
70 if check4progs w3m &>/dev/null ; then
72 elif check4progs links2 &>/dev/null ; then
74 elif check4progs links &>/dev/null ; then
77 echo "Sorry, neither w3m nor links2 nor links available. Exiting.">&2
83 ## END OF FILE #################################################################