/usr/share/scilab/etc/scilab.start is in scilab-data 5.3.3-10.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 | // Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
// Copyright (C) 2007-2008 - INRIA
// Copyright (C) 2009-2010 - DIGITEO
//
// This file must be used under the terms of the CeCILL.
// This source file is licensed as described in the file COPYING, which
// you should have received as part of this distribution. The terms
// are also available at
// http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
// Main Scilab initialisation file
mode(-1); // silent execution mode
// clean database when restarted ======================================
predef("clear"); //unprotect all variables
clear // erase all variables
clearglobal();
// Set stack size ===================================================
defaultstacksize = 5000000;
old = stacksize()
params = sciargs();
nparam = find(params=="-mem");
if (nparam) then
ierr = execstr("newstacksize="+params(nparam+1),"errcatch");
if (ierr == 0) then
if old(1) <> newstacksize then
stacksize(newstacksize);
end
else
if old(1) <> defaultstacksize then
stacksize(defaultstacksize);
end
end
else
if old(1) <> defaultstacksize then
stacksize(defaultstacksize);
end
end
clear nparam params ierr old newstacksize defaultstacksize
// Special variables definition =======================================
ieee(2);
%inf = 1/0;
ieee(0);
%nan = %inf-%inf;
// boolean variables
%T = %t;
%F = %f;
MSDOS = (getos() == 'Windows');
%pvm = with_module('pvm');
%tk = (with_module('tclsci') & getscilabmode() <> 'NWNI');
// Set LANGUAGE ======================================================
// used mainly for on-line help
args = sciargs();
larg = find(args=="-l");
if larg<>[] & larg<=size(args,"*") then
L = args(larg+1);
setlanguage(L);
end
clear larg args L
// Startup message ===================================================
if (sciargs()<>"-nb") & ~fromjava() & ~fromc() then
banner();
write(%io(2),[' ';' ';gettext("Startup execution:")]);
write(%io(2),gettext(" loading initial environment"));
end
// Default Obsolete Warning policy ===================================
global %modalWarning;
// False -> Scilab will only display a Warning message in the console
// if warnings are enabled [warning('on'/'off')].
// True -> Scilab will show a blocking popup.
%modalWarning = %F;
clear %modalWarning;
// Create some configuration variables ================================
PWD = pwd();
// Define Initial demo tables ========================================
// demolist is a two column matrix of strings
global demolist
demolist = [];
clear demolist;
// loads modules ======================================================
modules = getmodules();
WITH_DEMOS = ((with_module("demo_tools")) & (getscilabmode() <> "NWNI"));
for i=1:size(modules,"*")
exec("SCI/modules/"+modules(i)+"/etc/"+modules(i)+".start",-1);
end
clear modules i add_demo WITH_DEMOS
// Create some configuration variables ================================
home = getenv("HOME",SCI);
if getos() == 'Windows' then
// path of scilab main directory for Windows
WSCI = getlongpathname(pathconvert(SCI,%f,%f,"w"));
else
if getenv('PRINTERS','ndef') == "ndef" then
setenv("PRINTERS","lp");
end
end
setenv("VERSION",getversion());
// ATOMS ===============================================================
if with_module("atoms") then
atomsSystemInit();
atomsAutoload();
clear atomsSystemInit atomsAutoload
end
// Protect variable previously defined ================================
predef("all");
// At startup, no interactive vertical paging is authorized.===========
// Note :
// This may happen when the .scilab startup configuration file is loaded.
// This may freeze a unit test, for which the .scilab file is so long
// that an interactive action is required ; but that interactive
// action cannot occur, since it is during a unit test.
_DEFAULT_LN_ = lines();
lines(0);
// load contrib menu if present ========================================
if isfile(SCI+"/contrib/loader.sce") then
global %toolboxes;
global %toolboxes_dir;
exec(SCI+"/contrib/loader.sce");
clear %toolboxes %toolboxes_dir;
end
// calling user initialization =========================================
if sciargs()<>"-nouserstartup" then
startupfiles = [ SCIHOME + filesep() + ".scilab" ; .. // Home directory startup
SCIHOME + filesep() + "scilab.ini" ]; // '' '' startup
if SCIHOME <> pwd() then
startupfiles = [ startupfiles ; ..
".scilab" ; .. // Working directory startup
"scilab.ini" ] ; // '' '' startup
end
for i=1:size(startupfiles,"*")
if isfile(startupfiles(i)) then
exec(startupfiles(i),-1);
end
end
clear startupfiles isempty i;
end
// Menus/toolbar can now be enabled ====================================
if getscilabmode() == "STD" then
setmenu(gettext("&File"));
setmenu(gettext("&Edit"));
setmenu(gettext("&Preferences"));
setmenu(gettext("&Control"));
setmenu(gettext("&Applications"));
if ~with_module("scinotes") then // Desactivate Editor menu
unsetmenu(gettext("&Applications"),1);
end
if ~with_module("xcos") then // Desactivate xcos menu
unsetmenu(gettext("&Applications"),3);
end
if ~with_module("m2sci") then // Desactivate mfile2sci menu
unsetmenu(gettext("&Applications"),5);
end
if ~with_module("atoms") then // Desactivate atoms menu
unsetmenu(gettext("&Applications"),7);
end
setmenu(gettext("&?"));
setmenu(gettext("&Toolboxes"));
toolbar(-1, "on");
end
// Restore initial lines mode ==========================================
lines(_DEFAULT_LN_(2),_DEFAULT_LN_(1));
clear _DEFAULT_LN_;
clear ans
|