2 #---------------------------------------------
3 # Script to start GeoGebra
4 #---------------------------------------------
6 #---------------------------------------------
7 # Used environment variables:
9 # GG_XMS=<initial Java heap size> # If unset, 32m will be used.
11 # GG_XMX=<maximum Java heap size> # If unset, 512m will be used.
13 # GG_DJAVA_LIBRARY_PATH=<native library path>
15 #---------------------------------------------
16 # If GG_XMS not set, set to 32m
18 if [ -z "$GG_XMS" ]; then
22 #---------------------------------------------
23 # If GG_XMX not set, set to 512m
25 if [ -z "$GG_XMX" ]; then
29 #---------------------------------------------
30 # Set Java default options
32 JAVA_OPTS
=("-Xms$GG_XMS" "-Xmx$GG_XMX")
33 if [ -n "$GG_DJAVA_LIBRARY_PATH" ]; then
34 JAVA_OPTS
[${#JAVA_OPTS[*]}]="-Djava.library.path=$GG_DJAVA_LIBRARY_PATH"
37 #---------------------------------------------
38 # Set GeoGebra default options
40 GG_OPTS
=(--primary=true
)
42 #---------------------------------------------
43 # Define usage function
48 Usage: geogebra [Java-options] [GeoGebra-options] [FILE]
50 GeoGebra - Dynamic mathematics software
53 -Xms<size> Set initial Java heap size, default $GG_XMS
54 -Xmx<size> Set maximum Java heap size, default $GG_XMX
55 -Djava.library.path=<path> Set native library path`if [ -n "$GG_DJAVA_LIBRARY_PATH" ]; then echo ", default $GG_DJAVA_LIBRARY_PATH"; fi`
58 --help Print this help message
60 --language=<iso_code> Set language using locale code, e.g. en, de_AT
61 --showAlgebraInput=<boolean> Show/hide algebra input field
62 --showAlgebraInputTop=<boolean> Show algebra input field at top/bottom
63 --showAlgebraWindow=<boolean> Show/hide algebra window
64 --showSpreadsheet=<boolean> Show/hide spreadsheet
65 --showCAS=<boolean> Show/hide CAS window
66 --showSplash=<boolean> Enable/disable the splash screen
67 --enableUndo=<boolean> Enable/disable Undo
68 --fontSize=<number> Set default font size
69 --showAxes=<boolean> Show/hide coordinate axes
70 --showGrid=<boolean> Show/hide grid
71 --settingsfile=[<path>|<filename>] Load/save settings from/in a local file
72 --resetSettings Reset current settings
73 --antiAliasing=<boolean> Turn anti-aliasing on/off
74 --regressionFile=<filename> Export textual representations of dependent objects, then exit
78 #---------------------------------------------
79 # Check for option --help and pass Java options to Java, others to GeoGebra
83 --help |
--hel |
--he |
--h )
86 if [ $
(expr match
"$i" '.*--') -ne 0 ]; then
87 GG_OPTS
[${#GG_OPTS[*]}]="$i"
89 elif [ $
(expr match
"$i" '.*-Xms') -ne 0 -o $
(expr match
"$i" '.*-Xmx') -ne 0 -o $
(expr match
"$i" '.*-Djava.library.path') -ne 0 ]; then
90 JAVA_OPTS
[${#JAVA_OPTS[*]}]="$i"
95 #---------------------------------------------
98 exec java
"${JAVA_OPTS[@]}" -jar "/usr/share/java/geogebra/geogebra.jar" "${GG_OPTS[@]}" "$@"