Changeset 3164 for lmd/trunk/fuentes/admin-center-ltsp.install
- Timestamp:
- Dec 22, 2016, 9:21:02 PM (4 years ago)
- Location:
- lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/i18n/ca-ES@valencia/messages.json
r3085 r3164 115 115 "ltsp_closing_connection":["Tancant la connexió"], 116 116 "ltsp_closing_connection_description":["La connexió es tancarà en breu..."], 117 "ltsp.description.module":["Creeu, gestioneu i configureu clients lleugers"] 117 "ltsp.description.module":["Creeu, gestioneu i configureu clients lleugers"], 118 "ltsconf.delete.option":["Esborra aquesta opció"], 119 "lmd.LliureX.Edit.LTS.Conf":["Opcions generals d'LTSP"], 120 "ltsp.lts.conf.edit.description":["Aquesta és una llista de les opcions per configurar el comportament en general de les opcions d'LTSP."], 121 "ltsconf.add.option":[" Afig una opció estàndard"], 122 "ltsconf.save.options":["Guarda"], 123 "NBD.Swap.Size":["Swap NBD"], 124 "NBD.Swap.Size.Desc":["Grandària de l'àrea d'intercanvi d'NBD"], 125 "lts_conf_available_options":["Variables de configuració disponibles"], 126 "ltsconf_helper_type":["Tipus:"], 127 "ltsconf_helper_default_value":["Valor per omissió:"], 128 "ltsconf_helper_description":["Descripció:"], 129 "lts_add_option":["Afig"], 130 "ltsconf.add.option.arbitrary":["Afig una nova opció personalitzada"], 131 "ltsconf_add_option_title":["Afig una variable personalitzada"], 132 "ltsconf_add_option_button":["Afig la variable"], 133 "ltsconf.new.param.name":["Nom de la variable"], 134 "ltsconf.new.param.value":["Valor de la variable"], 135 "ltsconf.msg.swap.saved":["El valor d'NBD_SWAP s'ha guardat correctament"], 136 "ltsconf.msg.swap.error":["No s'ha pogut guardar el valor d'NBD_SWAP. Resposta del servidor: "], 137 "ltsconf.msg.saved":["La configuració s'ha guardat correctament"], 138 "ltsconf.msg.error":["No s'ha pogut guardar la configuració. Resposta del servidor: "] 139 140 118 141 } 119 142 } -
lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/i18n/en-US/messages.json
r3085 r3164 115 115 "ltsp_closing_connection":["Closing Connection"], 116 116 "ltsp_closing_connection_description":["Session Connection will be closed shortly..."], 117 "ltsp.description.module":["Create, manage and configure thin clients"] 117 "ltsp.description.module":["Create, manage and configure thin clients"], 118 "ltsconf.delete.option":["Delete this Options"], 119 "lmd.LliureX.Edit.LTS.Conf":["LTSP Global Options"], 120 "ltsp.lts.conf.edit.description":["There is a list of the options to configure global behaviour of thin client images."], 121 "ltsconf.add.option":[" Add new option from list"], 122 "ltsconf.save.options":["Save"], 123 "NBD.Swap.Size":["Swap NBD"], 124 "NBD.Swap.Size.Desc":["NBD Swap Size"], 125 "lts_conf_available_options":["Available configuration variables"], 126 "ltsconf_helper_type":["Type:"], 127 "ltsconf_helper_default_value":["Default value:"], 128 "ltsconf_helper_description":["Description"], 129 "lts_add_option":["Add"], 130 "ltsconf.add.option.arbitrary":["Add custom option"], 131 "ltsconf_add_option_title":["Add new custom option"], 132 "ltsconf_add_option_button":["Add option"], 133 "ltsconf.new.param.name":["Variable name"], 134 "ltsconf.new.param.value":["Variable value"], 135 "ltsconf.msg.swap.saved":["NBD_SWAP values has been saved"], 136 "ltsconf.msg.swap.error":["Could not save NBD_SWAP value. Server response: "], 137 "ltsconf.msg.saved":["Config files has been saved"], 138 "ltsconf.msg.error":["Could not save config file. Server response: "] 118 139 } 119 140 } -
lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/i18n/es-ES/messages.json
r3085 r3164 115 115 "ltsp_closing_connection":["Cerrando la conexión"], 116 116 "ltsp_closing_connection_description":["La conexión se cerrará en breve..."], 117 "ltsp.description.module":["Cree, gestione y configure clientes ligeros"] 117 "ltsp.description.module":["Cree, gestione y configure clientes ligeros"], 118 "ltsconf.delete.option":["Borrar esta opción"], 119 "lmd.LliureX.Edit.LTS.Conf":["Opciones Generales de LTSP"], 120 "ltsp.lts.conf.edit.description":["Aquí se presenta una lista de opciones para configurar el comportamiento general de las imágenes de clientes ligeros."], 121 "ltsconf.add.option":[" Añadir opción estándard"], 122 "ltsconf.save.options":["Guardar"], 123 "NBD.Swap.Size":["Swap NBD"], 124 "NBD.Swap.Size.Desc":["Tamaño de la Swap de NBD"], 125 "lts_conf_available_options":["Variables de configuración disponibles"], 126 "ltsconf_helper_type":["Tipo:"], 127 "ltsconf_helper_default_value":["Valor per defecto:"], 128 "ltsconf_helper_description":["Descripción:"], 129 "lts_add_option":["Añadir:"], 130 "ltsconf.add.option.arbitrary":["Añadir opción personalizada"], 131 "ltsconf_add_option_title":["Nueva variable personalizada"], 132 "ltsconf_add_option_button":["Añadir bariable"], 133 "ltsconf.new.param.name":["Nombre de la variable"], 134 "ltsconf.new.param.value":["Valor de la variable"], 135 "ltsconf.msg.swap.saved":["El valor de NBD_SWAP se guardó orrectamente"], 136 "ltsconf.msg.swap.error":["No se pudo guardar el valor de NBD_SWAP. Resuesta del servidor: "], 137 "ltsconf.msg.saved":["La configuración se guardó correctamente"], 138 "ltsconf.msg.error":["No se pudo guardar la configuración. Respuesta del servidor: "] 139 118 140 119 141 } -
lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/js/imageManager.js
r3008 r3164 123 123 124 124 // Stage 1: Prepare Connection 125 var screenWidth= 1024;126 var screenHeight= 768;125 var screenWidth=819; 126 var screenHeight=614; 127 127 var credentials=[sessionStorage.username , sessionStorage.password]; 128 128 var n4dclass="RemoteWebGui"; -
lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/js/llx-ltsconf.js
r1994 r3164 1 1 2 //var llx_ltsconf_fields_actuals=[{name:'CONFIGURE_FSTAB',type:'text'}];// = [{ name:'LDM_SESSION',type:'text'},{name:'LDM_LANGUAGE',type:'text'},{name:'LTSP_FATCLIENT',type:'boolean'}] 3 var llx_ltsconf_fields_utilitzats; 4 var llx_ltsconf_llistaBuscador; 5 var llx_ltsconf_fields_actuals; 6 7 function Llx_ltsconf(){} 8 9 //Llx_ltsconf.prototype.initLlistes=function(CallbackBuscador){ 10 Llx_ltsconf.prototype.initLlistes=function(){ 11 var self=this; // NEW 12 13 llx_ltsconf_llistaBuscador = []; 14 pare = this; 2 function Llx_ltsconf(){ 3 this.helpers=null; 4 this.ltsconf=null; 5 this.swapSize="128"; 6 } 7 8 Llx_ltsconf.prototype._=function _(text){ 9 return ( i18n.gettext("lliurex-ltsp", text)); 10 } 11 12 13 Llx_ltsconf.prototype.init=function init(){ 14 var self=this; 15 // Reading all possible options for lts.conf in dictionary 16 17 $.getJSON('modules/lliurex-ltsp/src/js/llx_ltsconf_fields_actual.json?_=' + new Date().getTime(),function (data){ 18 self.helpers=data; 19 console.log(self.helpers); 20 self.readNBDSwapSize(); 21 self.readLTSConf(); 22 }); 23 }; 24 25 Llx_ltsconf.prototype.getHelpForItem=function getHelpForItem(item){ 26 var self=this; 27 var ret=$.grep(self.helpers , function(element){ return element.name == item; }); 28 if (ret.length>0) return self._(ret[0].help); 29 else return self._("unknown"); 30 31 } 32 33 34 Llx_ltsconf.prototype.createFormItem=function createFormItem(data, tag){ 35 var self=this; 36 37 var row=$(document.createElement("div")).addClass("col-md-12").addClass("ltsconfRowOption").attr("id", "ltsconf_"+tag); 38 39 if (data.toLowerCase()=="true" || data.toLowerCase()=="false"){ 40 item=Utils.formFactory.createCheckbox({"id":"ltsconf_option_"+tag.toString(), 41 "label":tag, 42 "default":data, 43 "help":self.getHelpForItem(tag)}, true); 44 } else { 45 item=Utils.formFactory.createText({"id":"ltsconf_option_"+tag.toString(), 46 "label": tag, 47 "help":self.getHelpForItem(tag), 48 "value":data}, true); 49 } 50 51 // Check for NBD_SWAP 52 var nbd_item=null; 53 if(tag=="NBD_SWAP"){ 54 nbd_item=Utils.formFactory.createSelect({"id":"lts_nbd_swap_size", 55 "label":self._("NBD.Swap.Size"), 56 "help":self._("NBD.Swap.Size.Desc"), 57 "default":"128", 58 "options":[ 59 {"value":"128", "label":"128 Mb"}, 60 {"value":"256", "label":"256 Mb"}, 61 {"value":"512", "label":"512 Mb"}, 62 {"value":"1024", "label":"1024 Mb"}, ]}, true); 63 } 64 65 //rmBt=$(document.createElement("div")).addClass("floatingDeleteButton").attr("title", self._("ltsconf.delete.option")).attr("target", "ltsconf_"+i); 66 rmBt=$(document.createElement("div")).addClass("floatingDeleteButton").attr("title", self._("ltsconf.delete.option")).attr("target", "ltsconf_"+tag); 67 $(row).append(item, rmBt); 68 if (nbd_item!==null) $(row).append(nbd_item); 69 70 return row; 71 } 72 73 74 Llx_ltsconf.prototype.readLTSConf=function readLTSConf(){ 75 var self=this; 76 // Get lts.conf options 77 15 78 var n4dClass="LmdBootManager"; 16 79 var n4dmethod = "getLtsConf"; 17 80 var argList=[]; 18 var credentials =[sessionStorage.username, sessionStorage.password]; 19 Utils.n4d(credentials,n4dClass,"ReadNBDSwapSize",arglist,function(response,status){ 20 var SWAP_SIZE = "128" ; 21 if (typeof(response)!="string") { 22 if (response.status==false){//error 23 24 } 81 82 Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response){ 83 dades = JSON.parse(response); 84 dades = dades.Default; 85 var content=document.createElement("div"); 86 var item=null; 87 88 for (var i in dades){ 89 if (i=="__name__") continue; 90 91 var row=self.createFormItem(dades[i], i); 92 93 $(content).append(row); 94 95 } 96 97 98 99 $("#llx_ltsconf_bootoptions").append(content); 100 $.material.init(); 101 102 $(".floatingDeleteButton").off("click"); 103 $(".floatingDeleteButton").on("click", function(){ 104 var itemToDelete="#"+$(this).attr("target"); 105 $(itemToDelete).css("background-color", "#ffeeee"); 106 $(itemToDelete).fadeOut(300, function(){ 107 $(itemToDelete).remove(); 108 }); 109 }); 110 111 },0); 112 113 } 114 115 Llx_ltsconf.prototype.readNBDSwapSize=function readNBDSwapSize(){ 116 var n4dClass="LmdBootManager"; 117 var n4dmethod = "ReadNBDSwapSize"; 118 var argList=[]; 119 var credentials =[]; 120 Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response,status){ 121 if (typeof(response)=="string") { 122 self.swapSize=response; 25 123 } 26 else{ 27 SWAP_SIZE=response 124 },0); // Syncronous 125 } 126 127 Llx_ltsconf.prototype.add_new_option= function add_new_option(){ 128 var self=this; 129 130 var content=""; 131 for (i in self.helpers){ 132 if ($("#ltsconf_option_"+self.helpers[i].name).length==0){ 133 // If not exists option in configuration, let's show it as an option to add 134 135 var optionRow=$(document.createElement("div")).addClass("ltsOptionsRow col-md-12").attr("id","ltsconf_to_add_"+self.helpers[i].name).attr("select", "false").attr("value", self.helpers[i].default); 136 $(optionRow).append($(document.createElement("div")).attr("target","ltsconf_to_add_body_"+self.helpers[i].name).addClass("ltsOptionsRowHeader col-md-12").html(self.helpers[i].name)); 137 138 //var optionRowBody=$(document.createElement("div")).addClass("ltsOptionsRowBody"); 139 var optionRowBody=$(document.createElement("div")).addClass("ltsOptionsRowBody col-md-11 col-md-offset-1").attr("id","ltsconf_to_add_body_"+self.helpers[i].name); 140 var optionRowBodyRow=$(document.createElement("div")).addClass("col-md-12").css("border-bottom","1px solid #aaaaaa"); 141 $(optionRowBodyRow).append($(document.createElement("div")).addClass("col-md-3 optionRowCol").html(self._("ltsconf_helper_type"))); 142 $(optionRowBodyRow).append($(document.createElement("div")).addClass("col-md-9 optionRowCol").html(self.helpers[i].type)); 143 $(optionRowBody).append(optionRowBodyRow); 144 $(optionRow).append(optionRowBody); 145 146 optionRowBodyRow=$(document.createElement("div")).addClass("col-md-12").css("border-bottom","1px solid #aaaaaa"); 147 $(optionRowBodyRow).append($(document.createElement("div")).addClass("col-md-3 optionRowCol").html(self._("ltsconf_helper_default_value"))); 148 $(optionRowBodyRow).append($(document.createElement("div")).addClass("col-md-9 optionRowCol").html(self.helpers[i].default)); 149 $(optionRowBody).append(optionRowBodyRow); 150 $(optionRow).append(optionRowBody); 151 152 optionRowBodyRow=$(document.createElement("div")).addClass("col-md-12").css("border-bottom","1px solid #aaaaaa"); 153 $(optionRowBodyRow).append($(document.createElement("div")).addClass("col-md-3 optionRowCol").html(self._("ltsconf_helper_description"))); 154 $(optionRowBodyRow).append($(document.createElement("div")).addClass("col-md-9 optionRowCol").html(self.helpers[i].help)); 155 $(optionRowBody).append(optionRowBodyRow); 156 $(optionRow).append(optionRowBody); 157 158 159 160 /*content+=self.helpers[i].name+"<br/>"; 161 content+=self.helpers[i].type+"<br/>"; 162 content+=self.helpers[i].default+"<br/>"; 163 content+=self.helpers[i].help+"<br/>";*/ 164 165 166 content+=$(optionRow).prop("outerHTML"); 167 } 168 169 } 170 171 172 173 var dialog=bootbox.dialog({ 174 message: content, 175 title: self._("lts_conf_available_options"), 176 buttons:{ 177 "Apply":{ 178 label:self._("lts_add_option"), 179 className: "btn-success btn-raised", 180 callback: function (){ 181 console.log($(".ltsOptionsRow[select='true']")); 182 var item=$(".ltsOptionsRow[select=true]").attr("id").replace("ltsconf_to_add_", ""); 183 var value=$(".ltsOptionsRow[select=true]").attr("value"); 184 185 var item=self.createFormItem(value, item); 186 187 console.log(item); 188 $("#llx_ltsconf_bootoptions").first().append(item); 189 $.material.init(); 190 //alert("Adding "+item+" with "+value); 191 $(".floatingDeleteButton").off("click"); 192 $(".floatingDeleteButton").on("click", function(){ 193 var itemToDelete="#"+$(this).attr("target"); 194 $(itemToDelete).css("background-color", "#ffeeee"); 195 $(itemToDelete).fadeOut(300, function(){ 196 $(itemToDelete).remove(); 197 }); 198 }); 199 200 201 } 202 }, 203 cancel:{ 204 label:self._("lmd.cancel"), 205 className: "btn-cancel btn-raised" } 206 } 207 }); 208 209 210 $.material.init(); 211 dialog.modal("show"); 212 $(".ltsOptionsRowHeader").off("click"); 213 $(".ltsOptionsRowHeader").on("click", function(){ 214 $(".ltsOptionsRow").css("background", "#ffffff").attr("select", "false"); 215 $(".ltsOptionsRowBody").css("display", "none"); 216 217 $(this).parent().css("background", "#eeeeee").attr("select", "true"); 218 $("#"+$(this).attr("target")).css("display", "block"); 219 220 221 }); 222 } 223 224 Llx_ltsconf.prototype.add_arbitrary_option= function add_arbitrary_option(){ 225 var self=this; 226 227 var ltsconf_add_option_title=self._("ltsconf_add_option_title"); 228 var ltsconf_add_option_button=self._("ltsconf_add_option_button"); 229 230 231 var form="<label for='ltsconf_new_param_name'>"+self._("ltsconf.new.param.name")+"</label><input required type='text' name='ltsconf_new_param_name' class='form-control is-empty' id='ltsconf_new_param_name' value=''>"; 232 form+="<label for='ltsconf_new_param_value'>"+self._("ltsconf.new.param.value")+"</label><input required type='text' name='ltsconf_new_param_value' class='form-control is-empty' id='ltsconf_new_param_value' value=''>"; 233 234 var dialog=bootbox.dialog({ 235 message: form, 236 title: ltsconf_add_option_title, 237 buttons:{ 238 "Ok":{ 239 label:ltsconf_add_option_button, 240 className: "btn-success btn-raised", 241 callback: function (){ 242 var newLabel=$('#ltsconf_new_param_name').val(); 243 var newValue=$('#ltsconf_new_param_value').val(); 244 if (newLabel==="" || newValue==="" ) { 245 if (newLabel==="" ) $('#ltsconf_new_param_name').focus(); 246 else $('#ltsconf_new_param_value').focus(); 247 //alert(self._("ltsconf_shoud_not_be_null")); 248 return false; 249 } else { 250 //alert(newLabel + " " +newDesc); 251 var item=self.createFormItem(newValue, newLabel); 252 $("#llx_ltsconf_bootoptions").first().append(item); 253 254 $(".floatingDeleteButton").off("click"); 255 $(".floatingDeleteButton").on("click", function(){ 256 var itemToDelete="#"+$(this).attr("target"); 257 $(itemToDelete).css("background-color", "#ffeeee"); 258 $(itemToDelete).fadeOut(300, function(){ 259 $(itemToDelete).remove(); 260 }); 261 }); 262 263 264 } 265 } 266 }, 267 cancel:{ 268 label:self._("lmd.cancel"), 269 className: "btn-cancel btn-raised" 270 } 271 } 272 }); 273 274 $.material.init(); 275 dialog.modal("show"); 276 277 } 278 279 280 Llx_ltsconf.prototype.saveOptions= function saveOptions(){ 281 var self=this; 282 283 284 // Saving NBD SWAP 285 var nbd_swap_size=$("#lts_nbd_swap_size").val(); 286 if (typeof(nbd_swap_size)!=="undefined") { 287 var credentials = [sessionStorage.username, sessionStorage.password]; 288 var n4dClass="LmdBootManager"; 289 var n4dmethod = "SaveNBDSwapSize"; 290 var argList=[nbd_swap_size]; 291 Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response){ 292 if (response.status && response.msg=="finished"){ 293 message=self._("ltsconf.msg.swap.saved"); 294 Utils.msg(message, MSG_INFO); 295 } else { 296 message=self._("ltsconf.msg.swap.error")+response.msg; 297 Utils.msg(message, MSG_ERROR); 298 } 299 300 },0); 301 302 } 303 304 // SAVING OPTIONS 305 306 var resJSONs ='{"Default":{\"__name__\":"Default",'; 307 308 var list=$("input[id^=ltsconf_option_]"); 309 for (var i=0; i<list.length;i++){ 310 console.log(list[i]); 311 var name=$(list[i]).attr("id").replace("ltsconf_option_", ""); 312 console.log(name); 313 var val; 314 if ($(list[i]).attr("type")=="checkbox") 315 val=$(list[i]).prop("checked"); 316 else val=$(list[i]).val(); 317 resJSONs+= '"' + name +'"' + ':"' + val.toString().replace(/\"/gi," ") + '"'; 318 if (i!=(list.length-1)) resJSONs+=","; 319 } // for 320 321 resJSONs += "}}"; 322 323 var credentials=[sessionStorage.username , sessionStorage.password]; 324 var n4dclass="LmdBootManager"; 325 var n4dmethod="setLtsConf"; 326 var arglist=[]; 327 arglist.push(resJSONs); 328 329 try { 330 Utils.n4d(credentials, n4dclass, n4dmethod, arglist, function(response){ 331 //console.log(response); 332 //alert(response); 333 if (response.status && response.msg=="all ok"){ 334 message=self._("ltsconf.msg.saved"); 335 Utils.msg(message, MSG_INFO); 336 } else { 337 message=self._("ltsconf.msg.error")+response.msg; 338 Utils.msg(message, MSG_ERROR); 28 339 } 29 // index = Llx_ltsconf_LI.buscaIndexNom("NBD_SWAP_SIZE",llx_ltsconf_fields_utilitzats); 30 index = self.buscaIndexNom("NBD_SWAP_SIZE",llx_ltsconf_fields_utilitzats); 31 llx_ltsconf_fields_utilitzats[index].default = SWAP_SIZE; 32 }); 33 34 Utils.n4d(credentials,n4dClass,n4dmethod,arglist,function(response,status){ 35 //cambiar la url per a que siga única i no done error 304 36 dades = JSON.parse(response); 37 dades = dades.Default; 38 39 40 for (var k in dades){ 41 //index = Llx_ltsconf_LI.buscaIndexNom(k,llx_ltsconf_fields_utilitzats); 42 index = self.buscaIndexNom(k,llx_ltsconf_fields_utilitzats); 43 if(index!=-1){ 44 llx_ltsconf_fields_utilitzats[index]["mandatory"]="true"; 45 llx_ltsconf_fields_utilitzats[index]["default"]=dades[k]; 46 } 47 else{ 48 //Si no està cal afegir-lo 49 if (k!="__name__"){ 50 var tipus = "text"; 51 //var valor = dades[k]; 52 var valor = dades[k]; 53 if (valor=="true"||valor=="True"||valor=="false"||valor=="False"){ 54 tipus = "boolean"; 55 } 56 var element = { 57 "name": k, 58 "type": tipus, 59 "mandatory":"true", 60 "default":valor, 61 "klass":"extra" 62 } 63 llx_ltsconf_fields_utilitzats.push(element); 64 } 65 } 340 341 342 },0); 343 344 66 345 } 67 var html = pare.creaLlistaCamps('basic'); 68 $('#Llx_ltsconf_formularibasic').html(html); 69 var html = pare.creaLlistaCamps('extra'); 70 $('#Llx_ltsconf_formulariextra').html(html); 71 $.material.init(); 72 //CallbackBuscador(); 73 self.initBuscador(); 74 }); 75 76 } 77 Llx_ltsconf.prototype.actualitzaAjudaDelsElementsQueNoEnTenen=function(){ 78 pare = this; 79 $(".elementLlista:not([title]) label").each(function(index,element){ 80 itemquefalta = $(element).html(); 81 var indexacanviar =pare.buscaIndexNom(itemquefalta,llx_ltsconf_llistaBuscador); 82 var ajuda =llx_ltsconf_llistaBuscador[indexacanviar].help; 83 $(element).parent().attr("title",ajuda); 84 }); 85 } 86 Llx_ltsconf.prototype.initBuscador=function(){ 87 var self=this; 88 89 pare = this; 90 91 $.getJSON('modules/lliurex-ltsp/src/js/llx_ltsconf_fields_actual.json?_=' + new Date().getTime(),function (data){ 92 llx_ltsconf_fields_actuals=data; 93 for(var i=0;i<llx_ltsconf_fields_actuals.length;i++){ 94 //if (Llx_ltsconf_LI.buscaIndex(llx_ltsconf_fields_actuals[i],llx_ltsconf_llistaBuscador)==-1){ 95 console.log(typeof(self.buscaIndex)); 96 console.log(self.buscaIndex); 97 if (self.buscaIndex(llx_ltsconf_fields_actuals[i],llx_ltsconf_llistaBuscador)==-1){ 98 llx_ltsconf_llistaBuscador.push(llx_ltsconf_fields_actuals[i]); 99 } 100 } 101 //var html = Llx_ltsconf_LI.creaLlistaBuscador(); 102 var html = self.creaLlistaBuscador(); 103 self.actualitzaAjudaDelsElementsQueNoEnTenen(); 104 $("#Llx-ltsconf-llistaVariablesElegibles").html(html); 105 }); 106 } 107 Llx_ltsconf.prototype.init=function(){ 108 //llx_ltsconf_fields_utilitzats=llx_ltsconf_fields_actuals.slice(0); 109 //this.initLlistes(this.initBuscador); 110 this.initLlistes(); 111 } 112 113 114 Llx_ltsconf.prototype.buscaIndex=function(element,vector){ 115 result = -1; 116 for (var i =0; i <vector.length; i++) { 117 if(vector[i].name == element.name) 118 result= i; 346 catch (error){ 347 var message=("Exception: ")+error; 348 Utils.msg(message, MSG_ERROR); 119 349 } 120 return result; 121 } 122 Llx_ltsconf.prototype.buscaIndexNom=function(nom,vector){ 123 result = -1; 124 for (var i =0; i <vector.length; i++) { 125 if(vector[i].name ==nom) 126 result= i; 127 } 128 return result; 129 } 130 Llx_ltsconf.prototype.afegixElementPopup = function(index){ 131 llx_ltsconf_fields_utilitzats.push(llx_ltsconf_llistaBuscador[index]); 132 var html = this.creaLlistaCamps('basic'); 133 $('#Llx_ltsconf_formularibasic').html(html); 134 var html = this.creaLlistaCamps('extra'); 135 $('#Llx_ltsconf_formulariextra').html(html); 136 137 $.material.init() 138 139 llx_ltsconf_llistaBuscador.splice(index,1); 140 html = this.creaLlistaBuscador(); 141 $("#Llx-ltsconf-llistaVariablesElegibles").html(html); 142 } 143 144 /*Llx_ltsconf.prototype.creaLlistaBuscador = function(){ 145 var self=this; 146 var html = "<div class='list-group'>"; 147 for (var i =0;i<llx_ltsconf_llistaBuscador.length;i++){ 148 help = ""; 149 if (llx_ltsconf_llistaBuscador[i].help) 150 var help = "<p class='list-group-item-text'>"+llx_ltsconf_llistaBuscador[i].help+"</p><br/>"; 151 //html += "<div class='list-group-item'><div class='row-content'><h4 class='list-group-item-heading'>"+llx_ltsconf_llistaBuscador[i].name+"<span class='glyphicon glyphicon-plus' aria-hidden='true' onClick='Llx_ltsconf_LI.afegixElementPopup("+i+")' style='cursor:pointer;float:right'></span></h4></div> "+help+"</div> "; 152 html += "<div class='list-group-item'><div class='row-content'><h4 class='list-group-item-heading'>"+llx_ltsconf_llistaBuscador[i].name+"<span class='glyphicon glyphicon-plus' aria-hidden='true' onClick='self.afegixElementPopup("+i+")' style='cursor:pointer;float:right'></span></h4></div> "+help+"</div> "; 153 } 154 html += "</div>" 155 return html; 156 }*/ 157 158 159 Llx_ltsconf.prototype.creaLlistaBuscador = function(){ 160 // MOLARIA QUE NO MOSTRARA LES OPCIONS QUE JA ESTAN AFEGIDES 161 var self=this; 162 163 var html=$(document.createElement("div")).addClass("list-group"); 164 165 for (var i=0;i<llx_ltsconf_llistaBuscador.length;i++){ 166 if (llx_ltsconf_llistaBuscador[i].help) 167 //var help = "<p class='list-group-item-text'>"+llx_ltsconf_llistaBuscador[i].help+"</p><br/>"; 168 var help=$(document.createElement("p")).addClass("list-group-item-text").html(llx_ltsconf_llistaBuscador[i].help); 169 var br=$(document.createElement("br")); 170 171 var div2=$(document.createElement("div")).addClass('list-group-item'); 172 var div3=$(document.createElement("div")).addClass("row-content"); 173 var span=$(document.createElement("span")).addClass("glyphicon glyphicon-plus"); 174 $(span).attr("aria-hidden","true").attr("whoami", i); 175 $(span).css({"cursor":"pointer","float":"right"}); 176 177 $(span).bind("click",function(event){ 178 self.afegixElementPopup($(event.target).attr("whoami")); 179 }); 180 181 var h4=$(document.createElement("h4")).addClass("list-group-item-heading").html(llx_ltsconf_llistaBuscador[i].name); 182 183 $(h4).append(span); 184 $(div3).append(h4); 185 $(div3).append(help); 186 $(div3).append(br); 187 $(div2).append(div3); 188 $(html).append(div2); 189 190 } 191 return html; 192 193 } 194 195 196 197 Llx_ltsconf.prototype.actualitzaCampsElegiblesPerAfegir = function(){ 198 llx_ltsconf_llistaBuscador = []; 199 for(var i=0;i<llx_ltsconf_fields_actuals.length;i++){ 200 if (this.buscaIndex(llx_ltsconf_fields_actuals[i],llx_ltsconf_fields_utilitzats)==-1){ 201 llx_ltsconf_llistaBuscador.push(llx_ltsconf_fields_actuals[i]); 202 } 203 } 204 html = this.creaLlistaBuscador(); 205 $("#Llx-ltsconf-llistaVariablesElegibles").html(html); 206 } 207 Llx_ltsconf.prototype.save_options=function(){ 208 var resultat = []; 209 var valor = ""; 210 for(i=0;i<llx_ltsconf_fields_utilitzats.length;i++){ 211 var q; 212 if (llx_ltsconf_fields_utilitzats[i].type=="text"){ 213 valor = $('#Llx-ltsconf'+llx_ltsconf_fields_utilitzats[i].name).val(); 214 if (valor == "" ) 215 valor = "\" \""; 216 } 217 if (llx_ltsconf_fields_utilitzats[i].type=="boolean"){ 218 valor = $('#Llx-ltsconf'+llx_ltsconf_fields_utilitzats[i].name).prop('checked'); 219 } 220 221 var q = { 222 name: llx_ltsconf_fields_utilitzats[i].name, 223 valor: valor 224 } 225 resultat.push(q); 226 } 227 var credentials = [sessionStorage.username, sessionStorage.password]; 350 351 352 353 /*var creds = [sessionStorage.username, sessionStorage.password]; 354 var n4dmethod ="setLtsConf"; 228 355 var n4dClass="LmdBootManager"; 229 var n4dmethod = "SaveNBDSwapSize"; 230 var index = this.buscaIndexNom("NBD_SWAP_SIZE",resultat); 231 var argList=[resultat[index].valor]; 232 Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response,status){ 233 234 // BEGIN TRUNYO 235 var resJSONs ='{"Default":{\"__name__\":"Default",'; 236 for(var i=0;i<resultat.length;i++){ 237 resJSONs+= '"' + resultat[i].name +'"' + ':"' + resultat[i].valor.toString().replace(/\"/gi," ") + '"'; 238 if (i!=(resultat.length-1)) resJSONs+=","; 239 240 } 241 resJSONs += "}}"; 242 //resJSON = JSON.parse(resJSONs); 243 var n4dmethod ="setLtsConf"; 244 //argList = [resJSONs]; 245 var argList = []; 246 argList.push(resJSONs); 247 Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response,status){ 248 249 }); 250 251 // END TRUNYO 252 253 }); 254 /*var resJSONs ='{"Default":{\"__name__\":"Default",'; 255 for(i=0;i<resultat.length;i++){ 256 resJSONs+= '"' + resultat[i].name +'"' + ':"' + resultat[i].valor.toString().replace(/\"/gi," ") + '"'; 257 if (i!=(resultat.length-1)) resJSONs+=","; 258 259 } 260 resJSONs += "}}"; 261 //resJSON = JSON.parse(resJSONs); 262 n4dmethod ="setLtsConf"; 263 //argList = [resJSONs]; 264 argList = []; 356 var argList = []; 265 357 argList.push(resJSONs); 266 Utils.n4d(credentials,n4dClass,n4dmethod,argList,function(response,status){ 267 alert(response) 358 359 Utils.n4d(creds,n4dClass,n4dmethod,argList,function(response){ 360 alert("123123123"); 268 361 });*/ 269 } 270 Llx_ltsconf.prototype.esborrarCamp=function(index){ 271 llx_ltsconf_fields_utilitzats.splice(index,1); 272 var html = this.creaLlistaCamps('basic'); 273 $('#Llx_ltsconf_formularibasic').html(html); 274 var html = this.creaLlistaCamps('extra'); 275 $('#Llx_ltsconf_formulariextra').html(html); 276 $.material.init() 277 this.actualitzaCampsElegiblesPerAfegir(); 278 } 279 280 281 /* 282 Llx_ltsconf.prototype.creaLlistaCamps=function(classe){ 283 var html = "<legend>Boot Options("+classe+")</legend>"; 284 285 for(var i=0;i<llx_ltsconf_fields_utilitzats.length;i++){ 286 if(llx_ltsconf_fields_utilitzats[i].klass == classe ){ 287 var creuEsborrar = ""; 288 if (typeof(llx_ltsconf_fields_utilitzats[i].mandatory) === 'undefined') { 289 // variable is undefined or null 290 creuEsborrar = "<span class='glyphicon glyphicon-remove' aria-hidden='true' onClick='Llx_ltsconf_LI.esborrarCamp("+i+")' style='cursor:pointer; float:right;' ></span>"; 291 //"<span class='glyphicon glyphicon-remove' aria-hidden='true' onClick='Llx_ltsconf_LI.esborrarCamp("+i+")' style='cursor:pointer;float:right;'></span>"; 292 } 293 var help = llx_ltsconf_fields_utilitzats[i].help; 294 switch(llx_ltsconf_fields_utilitzats[i].type){ 295 case "boolean": 296 var checked = ""; 297 if (llx_ltsconf_fields_utilitzats[i].default=="True") 298 checked = " checked "; 299 html += "<div data-toggle='tooltip' title='"+help+"' style='border:1px solid;margin-top:10px; padding:10px;background: #eeeeee;'>"; 300 html += "<div class='togglebutton'><label><input id='Llx-ltsconf"+llx_ltsconf_fields_utilitzats[i].name+"' "+checked +" type='checkbox'>"+llx_ltsconf_fields_utilitzats[i].name+"</label> "; 301 302 html += creuEsborrar+"</div>" 303 html += "</div>"; 304 break; 305 case "text": 306 html += "<div data-toggle='tooltip' title='"+help+"' style='border:1px solid;margin-top:10px; padding:10px; background: #eeeeee;'>"; 307 html += "<label class='control-label' for='inputDefault'>"+llx_ltsconf_fields_utilitzats[i].name+"</label> "; 308 html += creuEsborrar; 309 html += "<input id='Llx-ltsconf"+llx_ltsconf_fields_utilitzats[i].name+"' class='form-control' type='text' value='"+llx_ltsconf_fields_utilitzats[i].default+"'>"; 310 html += "</div>"; 311 312 break; 313 } 314 } 315 } 316 317 318 319 return html; 320 } 321 322 */ 323 324 Llx_ltsconf.prototype.creaLlistaCamps=function(classe){ 325 var self=this; 326 327 var html=$(document.createElement("legend")).html(classe); 328 329 console.log("**********"); 330 console.log(llx_ltsconf_fields_utilitzats); 331 console.log("**********"); 332 333 for(var i=0;i<llx_ltsconf_fields_utilitzats.length;i++){ 334 if(llx_ltsconf_fields_utilitzats[i].klass == classe ){ 335 var creuEsborrar=null; 336 if (typeof(llx_ltsconf_fields_utilitzats[i].mandatory) === 'undefined') { 337 // variable is undefined or null 338 console.log(i+" --> "+llx_ltsconf_fields_utilitzats[i].name); 339 creuEsborrar=$(document.createElement("span")).addClass("glyphicon glyphicon-remove").attr("aria-hidden", "true").attr("myid", i).attr("target",llx_ltsconf_fields_utilitzats[i].name); 340 $(creuEsborrar).css({"cursor":"pointer", "float":"right"}); 341 342 $(creuEsborrar).bind("click", function(event){ 343 self.esborrarCamp($(event.target).attr("myid")); 344 }); 345 346 } 347 var help = llx_ltsconf_fields_utilitzats[i].help; 348 switch(llx_ltsconf_fields_utilitzats[i].type){ 349 case "boolean": 350 var checked = ""; 351 if (llx_ltsconf_fields_utilitzats[i].default=="True") checked = " checked "; 352 var div1=$(document.createElement("div")).attr("data-toggle", "tooltip").addClass("elementLlista"); 353 $(div1).attr("title", help).css({"border":"1px solid", "margin-top":"10px", "padding":"10px;", "background": "#eeeeee;"}); 354 //$(html).append(div1); 355 var div2=$(document.createElement("div")).addClass("togglebutton"); 356 var label=$(document.createElement("label")).html(llx_ltsconf_fields_utilitzats[i].name); // falta $nbsp; 357 var input=$(document.createElement("input")).attr("type", "checkbox").attr("checked", "checked"); 358 $(input).attr("id", "Llx-ltsconf"+llx_ltsconf_fields_utilitzats[i].name); 359 //$(div1).append(input); 360 //$(div1).append(label); 361 $(label).append(input); 362 $(div2).append(label); 363 $(div2).append(creuEsborrar); 364 $(div1).append(div2); 365 366 367 $(html).append(div1); 368 //$(label).append(input); // Falta el 369 370 371 break; 372 373 case "text": 374 var div2=$(document.createElement("div")).attr("data-toggle", "tooltip").attr("title", help).addClass("elementLlista");; 375 $(div2).css({"border":"1px solid","margin-top":"10px","padding":"10px","background": "#eeeeee"}); 376 //$(html).append(div2); 377 var label2=$(document.createElement("label")).addClass("control-label").attr("for","inputDefault"); 378 $(label2).html(llx_ltsconf_fields_utilitzats[i].name); // falta $nbsp; 379 //$(html).append(label2); 380 $(div2).append(label2); 381 382 383 var input2=$(document.createElement("input")).attr("id", "Llx-ltsconf"+llx_ltsconf_fields_utilitzats[i].name); 384 $(input2).addClass("form-control").attr("type", "text").val(llx_ltsconf_fields_utilitzats[i].default); 385 $(div2).append(creuEsborrar); 386 $(div2).append(input2); 387 $(html).append(div2); 388 //$(html).append(input2); 389 390 391 392 break; 393 } 394 } 395 } 396 397 398 399 return html; 400 } 401 402 403 404 Llx_ltsconf.prototype.bindEvents= function(){ 362 363 364 } 365 366 367 Llx_ltsconf.prototype.bindEvents= function bindEvents(){ 405 368 var self=this; 406 369 $("#llx-ltsconf").on("componentShown", function(e, args){ 407 //Lliurex Instance370 //Lliurex Instance 408 371 self.init(); 409 372 }); 410 373 374 375 $("#ltsp_ltsconf_save_options_bt").off("click"); 411 376 $("#ltsp_ltsconf_save_options_bt").on("click", function(){ 412 self.save_options(); 377 self.saveOptions(); 378 413 379 }); 414 415 416 } 417 418 /*var Llx_ltsconf_LI; 419 Llx_ltsconf_LI=new Llx_ltsconf(); 420 Llx_ltsconf_LI.bindEvents();*/ 380 381 $("#ltsp_ltsconf_add_option_bt").off("click"); 382 $("#ltsp_ltsconf_add_option_bt").on("click", function(){ 383 self.add_new_option(); 384 }); 385 386 $("#ltsp_ltsconf_add_option_arbitrary_bt").off("click"); 387 $("#ltsp_ltsconf_add_option_arbitrary_bt").on("click", function(){ 388 self.add_arbitrary_option(); 389 }); 390 391 392 393 394 395 396 397 } -
lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/js/llx_ltsconf_fields_actual.json
r1663 r3164 1 [{"name":"CONFIGURE_FSTAB","type":"boolean","default":"True","klass":"extra","help":"/etc/fstab is generated by boot scripts"},{"name":"DNS_SERVER","type":"text","default":"","klass":"extra","help":"A valid IP for domain name server Used to build the client's resolv.conf file. Not needed by default."},{"name":"SEARCH_DOMAIN","type":"text","default":"","klass":"extra","help":"sets a valid search domain in the clients's resolv.conf file. Used to build the resolv.conf file. Not needed by default."},{"name":"HOSTNAME","type":"text","default":"","klass":"extra","help":"This parameter sets the host name for the thin client, for situations when if no DNS is available. A hostname is auto-generated if no hostname is set."},{"name":"HOSTNAME_BASE","type":"text","default":"","klass":"extra","help":"This parameter sets the base for the autogenerated host name for the thin client."},{"name":"HOSTNAME_EXTRA","type":"text","default":"ip","klass":"extra","help":"This parameter determines weather autogenerated host names are appended with information based on the ip address or mac address. Values are \"ip\" or \"mac\"."},{"name":"NBD_SWAP","type":"boolean","default":"False","klass":"extra","help":"If unspecified, it's automatically enabled for thin clients with less than 300 MB RAM and for fat clients with less than 800 MB RAM."},{"name":"NBD_SWAP_PORT","type":"text","default":"10809","klass":"basic","help":"The port on which NBD swapping will occur. An nbd-server export named swap is normally used."},{"name":"NBD_SWAP_SERVER","type":"text","default":"server","klass":"extra","help":"The NBD swap server can exist on any server on the network that is capable of handling it. You can specify the IP address of that server. The default is whatever the value of SERVER set to."},{"name":"NBD_SWAP_THRESHOLD","type":"text","default":"300","klass":"extra","help":"Automatically enable NBD_SWAP if the client has less RAM than the specified. For FAT clients, it defaults to 800"},{"name":"RM_SYSTEM_SERVICES","type":"text","default":"","klass":"extra","help":"A space separated list of services that shouldn't start on the clients even if they're installed, for example:\n RM_SYSTEM_SERVICES=\"apache2 dnsmasq mysql nbd-server nfs-kernel-server\""},{"name":"RM_THIN_SYSTEM_SERVICES","type":"text","default":"","klass":"extra","help":"Same as RM_SYSTEM_SERVICES, but it only affects thin clients."},{"name":"KEEP_SYSTEM_SERVICES","type":"text","default":"","klass":"extra","help":"Some services are deleted by default when an LTSP client boots,either to save RAM, or because they don't make sense for netbooted machines. If you need some of them you can list them in KEEP_SYSTEM_SERVICES, for example: KEEP_SYSTEM_SERVICES=\"acpid avahi-daemon bluetooth cups\""},{"name":"SERVER","type":"text","default":"","klass":"extra","help":"This is the server that is used for the XDM_SERVER, TELNET_HOST, XFS_SERVER and SYSLOG_HOST, if any of those are not specified explicitly. If you have one machine that is acting as the server for everything, then you can just specify the address here and omit the other server parameters. If this value is not set, it will be auto detected as the machine that the thin client booted from."},{"name":"XDM_SERVER","type":"text","default":"","klass":"extra","help":"If you're using the older startx screen script, and need to specify a different XDMCP server, then you can specify the server here. If this parameter is NOT specified, then it will use the SERVER parameter described above."},{"name":"TELNET_HOST","type":"text","default":"","klass":"extra","help":"If the thin client is setup to have a character based interface, then the value of this parameter will be used as the host to telnet into. If this value is NOT set, then it will use the value of SERVER above."},{"name":"XFS_SERVER","type":"text","default":"","klass":"extra","help":"If you are using an X Font Server to serve fonts, then you can use this entry to specify the IP address of the host that is acting as the font server. If this is not specified, it will use the default server, which is specified with the SERVER entry described above."},{"name":"SYSLOG_HOST","type":"text","default":"","klass":"extra","help":"If you want to send logging messages to a machine other than the default server, then you can specify the machine here. If this parameter is NOT specified, then it will use the SERVER parameter described above. Starting from LTSP 5.4.1 and on, this parameter must be specified to enable remote logging. You have to configure your server to accept remote logging as well."},{"name":"USE_LOCAL_SWAP","type":"boolean","default":"False","klass":"extra","help":"If you have a hard drive installed in the thin client, with a valid swap partition on it, this parameter will allow the thin client to swap to the local hard drive."},{"name":"TIMEZONE","type":"text","default":"","klass":"extra","help":" The timezone code for the thin client to use."},{"name":"TIMESERVER","type":"text","default":"","klass":"extra","help":"The address of an NTP time server that the thin client can set it's time from. If unset, the thin client just uses the BIOS time."},{"name":"SHUTDOWN_TIME","type":"text","default":"","klass":"extra","help":" Time at which thin client will automatically shut down."},{"name":"LTSP_FATCLIENT","type":"boolean","default":"True","klass":"basic","help":"Enable Fat Client support. It's automatically enabled if any sessions exist in /usr/share/xsessions."},{"name":"FAT_RAM_THRESHOLD","type":"text","default":"","klass":"extra","help":"Disable fat client support if less RAM is present."},{"name":"LOCALDEV","type":"boolean","default":"True","klass":"extra","help":"This parameter enables local devices support, like CD's and USB sticks. Users plugging them in should see them on the desktop, after they've been allowed to access the FUSE subsystem on the server. Check your distibutions docs to see how this is done on your distribution."},{"name":"LOCALDEV_DENY_CD","type":"boolean","default":"False","klass":"extra","help":"This parameter disables local device support for CD and DVD-rom devices"},{"name":"LOCALDEV_DENY_FLOPPY","type":"boolean","default":"False","klass":"extra","help":"This parameter disables local device support for floppy devices."},{"name":"LOCALDEV_DENY_INTERNAL_DISKS","type":"boolean","default":"True","klass":"extra","help":"This parameter disables local device support for internal ATA and SCSI hard disk devices."},{"name":"LOCALDEV_DENY_USB","type":"boolean","default":"False","klass":"extra","help":"This parameter disables local device support for USB devices."},{"name":"LOCALDEV_DENY","type":"text","default":"","klass":"extra","help":"This parameter disables local device support for devices matching certain patterns. Values are specified as a comma-separated list of sysfs attributes, which can be obtained by using udevadm info (or udevinfo). "},{"name":"PRINTER_0_DEVICE","type":"text","default":"","klass":"extra","help":"The device name of the printer. Valid device names such as /dev/lp0, or /dev/usblp0 are allowed."},{"name":"PRINTER_0_PORT","type":"text","default":"900","klass":"extra","help":" The TCP/IP Port number to use for the print server."},{"name":"PRINTER_0_TYPE","type":"text","default":"","klass":"extra","help":"Can either be set to P (for parallel), U (for USB) or S (for serial). Autodetected in most cases (except for serial)."},{"name":"PRINTER_0_WRITE_ONLY","type":"boolean","default":"False","klass":"extra","help":" Some parallel printers may need this set in order for the thin client to communicate to them properly. If you have problems with a parallel printer only printing part of the print job, try setting this to True."},{"name":"PRINTER_0_SPEED","type":"text","default":"900","klass":"extra","help":"Should be set to the baud rate of the printer (serial printers only)."},{"name":"PRINTER_0_FLOWCTRL","type":"text","default":"","klass":"extra","help":"Should be set to the flow control desired for the printer (serial printers only)."},{"name":"PRINTER_0_PARITY","type":"text","default":"","klass":"extra","help":"Specifies whether parity should be enabled for the printer (serial printers only)."},{"name":"PRINTER_0_DATABITS","type":"text","default":"8","klass":"extra","help":"Specifies how many data bits for the printer (serial printers only)."},{"name":"PRINTER_0_OPTIONS","type":"text","default":"","klass":"extra","help":"Specifies specific options for the printer (serial printers only)."},{"name":"LDM_PRINTER_LIST","type":"text","default":"","klass":"extra","help":"comma separated list of printers that will be displayed for that thin client (requires patched cups, included in Debian and Ubuntu)."},{"name":"LDM_PRINTER_DEFAULT","type":"text","default":"","klass":"extra","help":"Default printer for the thin client."},{"name":"SCANNER","type":"boolean","default":"False","klass":"extra","help":" This parameter enables scanners for the thin client."},{"name":"CONSOLE_KEYMAP","type":"text","default":"en","klass":"extra","help":"A valid console keymap. Allows you to specify a valid console keymap for TELNET_HOST sessions."},{"name":"XKBLAYOUT","type":"text","default":"","klass":"extra","help":"A valid xkb layout. Consult the X.org documentation for valid settings."},{"name":"XKBMODEL","type":"text","default":"","klass":"extra","help":"A valid xkb model. Consult the X.org documentation for valid settings."},{"name":"XKBVARIANT","type":"text","default":"","klass":"extra","help":"A valid xkb variant. Consult the X.org documentation for valid settings."},{"name":"XKBRULES","type":"text","default":"","klass":"extra","help":"A valid xkb rules specifier. Consult the X.org documentation for valid settings."},{"name":"XKBOPTIONS","type":"text","default":"","klass":"extra","help":"A valid xkb options specifier. Consult the X.org documentation for valid settings."},{"name":"USE_TOUCH","type":"boolean","default":"True","klass":"extra","help":""},{"name":"SOUND","type":"boolean","default":"True","klass":"extra","help":"This parameter enables sound for the thin client."},{"name":"SOUND_DAEMON","type":"text","default":"pulse","klass":"extra","help":"This parameter sets which sound daemon to use on the thin client. Values are esd, nasd, and pulse (default)."},{"name":"VOLUME","type":"text","default":"90","klass":"extra","help":"This represents an integer percentage of the volume, ranging from 0 to 100%."},{"name":"HEADPHONE_VOLUME","type":"text","default":"","klass":"extra","help":"This represents an integer percentage of the headphone volume, ranging from 0 to 100%."},{"name":"PCM_VOLUME","type":"text","default":"","klass":"extra","help":"This represents an integer percentage of the PCM volume, ranging from 0 to 100%."},{"name":"CD_VOLUME","type":"text","default":"","klass":"extra","help":"This represents an integer percentage of the CD input volume, ranging from 0 to 100%."},{"name":"FRONT_VOLUME","type":"text","default":"","klass":"extra","help":"This represents an integer percentage of the front speaker volume, ranging from 0 to 100%."},{"name":"MIC_VOLUME","type":"text","default":"","klass":"extra","help":"This represents an integer percentage of the microphone input volume, ranging from 0 to 100%."},{"name":"USE_XFS","type":"boolean","default":"False","klass":"extra","help":"Instructs the thin client to look at the XFS_SERVER option, and use XFS for serving fonts."},{"name":"CONFIGURE_X","type":"boolean","default":"False","klass":"extra","help":"If you want to be able to configure the individual settings of the X configuration file, without having the X automatically configure the graphics card for you, you must enable this option. By default this option is turned off."},{"name":"X_CONF","type":"text","default":"","klass":"extra","help":"If you want to create your own complete X.org config file, you can do so and place it in the /opt/ltsp/<arch>/etc/X11 directory. Then, whatever you decide to call it needs to be entered as a value for this configuration variable. For example: X_CONF = /etc/X11/my-custom-xorg.conf Note that for the thin client, you reference it from /etc/X11."},{"name":"X_RAMPERC","type":"text","default":"100","klass":"extra","help":"Percentage of RAM for X server. Some programs allocate a large amount of ram in the X.org server running on your thin client. Programs like Firefox and Evince can use up so much ram, that they eventually exhaust all your physical ram, and NBD swap, causing your thin client to crash. If you find your clients being booted back to a login prompt, or freezing up when viewing certain PDF's or web pages, this may be the problem. The X_RAMPERC variable stands for X RAM PERCent, and is a number between 0 and 100 that specifies how much of the free space on your thin client X.org is allowed to consume. You'll generally want to set it at something lower than 100 percent, if you're having problems. Experimentation has shown a value between 80 and 90 will usually keep the terminal alive. What will then happen is the program consuming the memory will die, as opposed to the thin client itself. If you're having unexplained terminal problems, specifying: X_RAMPERC = 80 in your lts.conf file may improve things."},{"name":"X_VIRTUAL","type":"text","default":"","klass":"extra","help":"If you want to have a virtual screen which is larger than the physical screen on your thin client, you would configure that by providing a string of the form \"width height\" in this parameter, similar to the xorg.conf format."},{"name":"XSERVER","type":"text","default":"","klass":"extra","help":"You can use this parameter to override which X server the thin client will run. For PCI and AGP video cards, this parameter should not be required. The thin client should normally be able to auto-detect the card."},{"name":"X_MOUSE_DEVICE","type":"text","default":"","klass":"extra","help":"This is the device node that the mouse is connected to. If it is a serial mouse, this would be a serial port, such as /dev/ttyS0 or /dev/ttyS1. This is not needed for PS/2 or USB mice, as they are auto-detected."},{"name":"X_MOUSE_PROTOCOL","type":"text","default":"","klass":"extra","help":"Should be auto-detected. However, valid entries include: sunkbd, lkkbd, vsxxxaa, spaceorb, spaceball, magellan, warrior, stinger, mousesystems, sunmouse, microsoft, mshack, mouseman, intellimouse, mmwheel, iforce, h3600ts, stowawaykbd, ps2serkbd,twiddler, twiddlerjoy"},{"name":"X_MOUSE_EMULATE3BTN","type":"boolean","default":"False","klass":"extra","help":"Normally unset, may need to be set to Y for certain 2 button mice."},{"name":"X_NUMLOCK","type":"boolean","default":"False","klass":"extra","help":"If this variable is set to True, then the numlock key will be defaulted to on when the terminal boots. Note that the numlockx command must be installed in the chroot for this to work."},{"name":"X_COLOR_DEPTH","type":"text","default":"","klass":"extra","help":"This is the number of bits to use for the colour depth. Possible values are 8, 16, 24 and 32. 8 bits will give 256 colours, 16 will give 65536 colours, 24 will give 16 million colours and 32 bits will give 4.2 billion colours! Not all X servers support all of these values. The default for thin clients is 16 in order to minimize network bandwidth, while for fat clients the X server default is used."},{"name":"X_SMART_COLOR_DEPTH","type":"boolean","default":"True","klass":"extra","help":"If set, thin clients no longer default to 16 bit colour depth but use the X server default instead."},{"name":"X_HORZSYNC","type":"text","default":"","klass":"extra","help":" This sets the X.org HorizSync configuration parameter. This should be auto-detected for your monitor, however, if you want to force a lower resolution, use this parameter to do so."},{"name":"X_VERTREFRESH","type":"text","default":"","klass":"extra","help":"This sets the X.org VertRefresh configuration parameter. This should be auto-detected for your monitor, however, if you want to force a lower resolution, use this parameter to do so."},{"name":"X_VIDEO_RAM","type":"text","default":"","klass":"extra","help":"This sets the X.org VideoRam configuration parameter. The setting is in kilobytes. This should be auto-detected for your monitor. If you need to force a different video ram setting, use this parameter to do so."},{"name":"X_BLANKING","type":"text","default":"","klass":"extra","help":"When set, X_BLANKING will cause DPMS standby to activate after the number of seconds provided. If the monitor does not support DPMS, then the blanking screensaver will activate. If X_BLANKING is set to 0, the monitor will remain on indefinitely. NOTE: This does not apply to the xdmcp or startx screen script. Also, server-side Xclients such as power managers and screensavers may override this setting."},{"name":"XRANDR_DISABLE","type":"boolean","default":"False","klass":"extra","help":" Disables XRANDR output handling so that the older X_MODE_0 way of setting resolution works. This is useful on older Xorg drivers that don't support XRANDR."},{"name":"LDM_AUTOLOGIN","type":"boolean","default":"False","klass":"extra","help":"This option allows the thin client to login automatically without the need for a username and password. To set it set LDM_AUTOLOGIN = True for the corresponding thin client. This will attempt to log in the thin client with username = hostname and password = hostname. You can also set a user and password with LDM_USERNAME and LDM_PASSWORD variables."},{"name":"LDM_USERNAME","type":"text","default":"","klass":"extra","help":""},{"name":"LDM_PASSWORD","type":"text","default":"","klass":"extra","help":""},{"name":"LDM_DEBUG_TERMINAL","type":"boolean","default":"False","klass":"extra","help":"Opens a local terminal after login for debugging purposes."},{"name":"LDM_DIRECTX","type":"boolean","default":"False","klass":"extra","help":"This is arguably the most important LDM option, as it allows you to turn off the encrypted X tunnel via SSH, and instead run a less secure, but much faster unencrypted tunnel. Users who have slower thin clients will want to set this to True. It is set to True by default in Fedora."},{"name":"LDM_GUESTLOGIN","type":"boolean","default":"False","klass":"extra","help":"This option places a GUEST LOGIN button underneath the entry field for username and password. To set it set LDM_GUESTLOGIN = True for the corresponding thin client. You can also set a user and password with LDM_USERNAME = John and LDM_PASSWORD = secret, although not setting these will default to the hostname of the thin client."},{"name":"LDM_GUEST_SERVER","type":"text","default":"","klass":"extra","help":"This is a space-separated list of available servers where guest logins are available. The first server in the list will be the default guest login server unless the user selects another from the preferences menu at login time."},{"name":"LDM_USER_ALLOW","type":"text","default":"","klass":"extra","help":" This option allows you to give access to certain thin clients based on the username set in /etc/passwd. For example, thin client A should only be used by Jane, Bob, and Fred, while thin client B is to be used by Harry only. By adding these options to the corresponding mac addresses you allow or deny access to the thin clients in question. Example:<br/> [thin:client:A:mac:address]<br/> LDM_USER_ALLOW = Jane,Bob,Fred<br/>[thin:client:B:mac:adddress]<br/>LDM_USER_ALLOW = Harry<br/>"},{"name":"LDM_LOGIN_TIMEOUT","type":"text","default":"","klass":"extra","help":"This lets LDM automatically login after the set amount of time in seconds. If you specify this option, then do not specify LDM_AUTOLOGIN. Use it in this format:<br/>[thin:client:mac:address]<br/>LDM_LOGIN_TIMEOUT = 25<br/>Note that you will need to also set LDM_GUESTLOGIN=True for LDM_LOGIN_TIMEOUT to be useful."},{"name":"LDM_SYSLOG","type":"boolean","default":"False","klass":"extra","help":"Normally, LDM logs to a simple file on the thin client, namely /var/log/ldm.log. This has the advantage of being fast, but the disadvantage of being hard to read for the administrator in the event of a problem, as the administrator must either spawn a shell screen session, or enable root login in tty1. By setting this option to \"True\", you can log up to the server if you've enabled your server's syslog for remote logging."},{"name":"LDM_SERVER","type":"text","default":"","klass":"extra","help":"This is a space-separated list of available servers for LDM to log into. The first server in the list will be the default server unless the user selects another from the preferences menu at login time"},{"name":"LDM_LANGUAGE","type":"text","default":"es_ES.UTF-8","klass":"basic","help":"This allows the system administrator to override the default locale settings on the server by setting the environment variables LANG, LANGUAGE and LC_ALL at login. Use the LANG variable to set the default locale for LDM's user interface."},{"name":"LDM_FORCE_LANGUAGE","type":"text","default":"","klass":"extra","help":"Same as LDM_LANGUAGE, but it overrides any previously user selected language and it even hides the LDM language selection menu."},{"name":"LDM_SSHOPTIONS","type":"text","default":"","klass":"extra","help":"Allows you to specify custom options to the ssh sessions started between LDM and the server."},{"name":"SSH_OVERRIDE_PORT","type":"text","default":"","klass":"extra","help":"If you run your ssh server different from the defult, you may set the port the thin client will use with this parameter."},{"name":"SSH_FOLLOW_SYMLINKS","type":"boolean","default":"False","klass":"extra","help":"Causes sshfs mounted filesystems for local applications to follow symlinks. By default it's false for symlinks under $HOME and true for any LOCAL_APPS_EXTRAMOUNTS."},{"name":"LOCAL_APPS_EXTRAMOUNTS","type":"text","default":"","klass":"extra","help":"This parameter enables extra mount points to be mounted on the thin client with sshfs. This require a commas separated list of directory."},{"name":"LDM_SESSION","type":"text","default":"gnome-fallback","klass":"basic","help":"Used to chose the default session on the server, for example: LDM_SESSION=\"gnome-fallback\" You can find the list of services that your server provides in /usr/share/xsessions. If the user has selected a specific session though LDM or another DM in the past, that's stored in his ~/.dmrc, and it overrides the default session."},{"name":"LDM_FORCE_SESSION","type":"text","default":"","klass":"extra","help":"Same as LDM_SESSION, but it overrides any previously selected sessions by the user and it even hides the LDM session selection menu."},{"name":"LDM_XSESSION","type":"text","default":"","klass":"extra","help":"Allows you to specify custom script on the server for LDM to run, rather than the server's standard script for starting an X session (usually Xsession)."},{"name":"LDM_LIMIT_ONE_SESSION","type":"boolean","default":"False","klass":"extra","help":"Only allow a given user to log into one thin-client at a time."},{"name":"LDM_LIMIT_ONE_SESSION_PROMPT","type":"boolean","default":"False","klass":"extra","help":"Prompt to kill processes of other logins when other logins are detected. Requires LDM_LIMIT_ONE_SESSION to be set."},{"name":"LDM_THEME","type":"text","default":"","klass":"extra","help":"Specify the name of the LDM theme. It can reference a directory in /usr/share/ldm/themes, or be specified as a full path to the theme dir (both relative to the chroot). To use the theme in /opt/ltsp/i386/usr/share/ldm/themes/MYTHEME, you'd specify: LDM_THEME=MYTHEME In your lts.conf file. Alternately, To use the theme in /opt/ltsp/i386/etc/MYTHEME, you'd specify: LDM_THEME=/etc/MYTHEME In your lts.conf file."},{"name":"LDM_PASSWORD_HASH","type":"boolean","default":"False","klass":"extra","help":"When set to True, this will create a proper shadow entry on the client, allowing for screen locking, and other things which require authentication to work. Note, this allows you to change your password locally, or possibly other actions such as sudo, but these changes are only temporary and will not persist on reboot. versions: LDM 2.2.14+, LTSP 5.5.2+"},{"name":"LOCAL_APPS","type":"boolean","default":"True","klass":"extra","help":"Enables support for running local apps on the thin client."},{"name":"LOCAL_APPS_MENU","type":"boolean","default":"False","klass":"extra","help":"Enables overriding of menu items from remote (server) applications. If this is set to True, local applications in the users menu will be used instead of the applications on the server."},{"name":"LOCAL_APPS_MENU_ITEMS","type":"text","default":"","klass":"extra","help":"This item should contain a comma separated list of application names as they appear on their .desktop files."},{"name":"LOCAL_APPS_WHITELIST","type":"text","default":"","klass":"extra","help":"Used to allow only specified space-separated commands to be run as local apps, allow all is default if unset. Full-paths are required for each command. No spaces in the names are allowed."}] 1 [ 2 { 3 "name":"CONFIGURE_FSTAB", 4 "type":"boolean", 5 "default":"True", 6 "klass":"extra", 7 "help":"/etc/fstab is generated by boot scripts" 8 }, 9 { 10 "name":"DNS_SERVER", 11 "type":"text", 12 "default":"", 13 "klass":"extra", 14 "help":"A valid IP for domain name server Used to build the client's resolv.conf file. Not needed by default." 15 }, 16 { 17 "name":"SEARCH_DOMAIN", 18 "type":"text", 19 "default":"", 20 "klass":"extra", 21 "help":"sets a valid search domain in the clients's resolv.conf file. Used to build the resolv.conf file. Not needed by default." 22 }, 23 { 24 "name":"HOSTNAME", 25 "type":"text", 26 "default":"", 27 "klass":"extra", 28 "help":"This parameter sets the host name for the thin client, for situations when if no DNS is available. A hostname is auto-generated if no hostname is set." 29 }, 30 { 31 "name":"HOSTNAME_BASE", 32 "type":"text", 33 "default":"", 34 "klass":"extra", 35 "help":"This parameter sets the base for the autogenerated host name for the thin client." 36 }, 37 { 38 "name":"HOSTNAME_EXTRA", 39 "type":"text", 40 "default":"ip", 41 "klass":"extra", 42 "help":"This parameter determines weather autogenerated host names are appended with information based on the ip address or mac address. Values are \"ip\" or \"mac\"." 43 }, 44 { 45 "name":"NBD_SWAP", 46 "type":"boolean", 47 "default":"False", 48 "klass":"extra", 49 "help":"If unspecified, it's automatically enabled for thin clients with less than 300 MB RAM and for fat clients with less than 800 MB RAM." 50 }, 51 { 52 "name":"NBD_SWAP_PORT", 53 "type":"text", 54 "default":"10809", 55 "klass":"basic", 56 "help":"The port on which NBD swapping will occur. An nbd-server export named swap is normally used." 57 }, 58 { 59 "name":"NBD_SWAP_SERVER", 60 "type":"text", 61 "default":"server", 62 "klass":"extra", 63 "help":"The NBD swap server can exist on any server on the network that is capable of handling it. You can specify the IP address of that server. The default is whatever the value of SERVER set to." 64 }, 65 { 66 "name":"NBD_SWAP_THRESHOLD", 67 "type":"text", 68 "default":"300", 69 "klass":"extra", 70 "help":"Automatically enable NBD_SWAP if the client has less RAM than the specified. For FAT clients, it defaults to 800" 71 }, 72 { 73 "name":"RM_SYSTEM_SERVICES", 74 "type":"text", 75 "default":"", 76 "klass":"extra", 77 "help":"A space separated list of services that shouldn't start on the clients even if they're installed, for example:\n RM_SYSTEM_SERVICES=\"apache2 dnsmasq mysql nbd-server nfs-kernel-server\"" 78 }, 79 { 80 "name":"RM_THIN_SYSTEM_SERVICES", 81 "type":"text", 82 "default":"", 83 "klass":"extra", 84 "help":"Same as RM_SYSTEM_SERVICES, but it only affects thin clients." 85 }, 86 { 87 "name":"KEEP_SYSTEM_SERVICES", 88 "type":"text", 89 "default":"", 90 "klass":"extra", 91 "help":"Some services are deleted by default when an LTSP client boots,either to save RAM, or because they don't make sense for netbooted machines. If you need some of them you can list them in KEEP_SYSTEM_SERVICES, for example: KEEP_SYSTEM_SERVICES=\"acpid avahi-daemon bluetooth cups\"" 92 }, 93 { 94 "name":"SERVER", 95 "type":"text", 96 "default":"", 97 "klass":"extra", 98 "help":"This is the server that is used for the XDM_SERVER, TELNET_HOST, XFS_SERVER and SYSLOG_HOST, if any of those are not specified explicitly. If you have one machine that is acting as the server for everything, then you can just specify the address here and omit the other server parameters. If this value is not set, it will be auto detected as the machine that the thin client booted from." 99 }, 100 { 101 "name":"XDM_SERVER", 102 "type":"text", 103 "default":"", 104 "klass":"extra", 105 "help":"If you're using the older startx screen script, and need to specify a different XDMCP server, then you can specify the server here. If this parameter is NOT specified, then it will use the SERVER parameter described above." 106 }, 107 { 108 "name":"TELNET_HOST", 109 "type":"text", 110 "default":"", 111 "klass":"extra", 112 "help":"If the thin client is setup to have a character based interface, then the value of this parameter will be used as the host to telnet into. If this value is NOT set, then it will use the value of SERVER above." 113 }, 114 { 115 "name":"XFS_SERVER", 116 "type":"text", 117 "default":"", 118 "klass":"extra", 119 "help":"If you are using an X Font Server to serve fonts, then you can use this entry to specify the IP address of the host that is acting as the font server. If this is not specified, it will use the default server, which is specified with the SERVER entry described above." 120 }, 121 { 122 "name":"SYSLOG_HOST", 123 "type":"text", 124 "default":"", 125 "klass":"extra", 126 "help":"If you want to send logging messages to a machine other than the default server, then you can specify the machine here. If this parameter is NOT specified, then it will use the SERVER parameter described above. Starting from LTSP 5.4.1 and on, this parameter must be specified to enable remote logging. You have to configure your server to accept remote logging as well." 127 }, 128 { 129 "name":"USE_LOCAL_SWAP", 130 "type":"boolean", 131 "default":"False", 132 "klass":"extra", 133 "help":"If you have a hard drive installed in the thin client, with a valid swap partition on it, this parameter will allow the thin client to swap to the local hard drive." 134 }, 135 { 136 "name":"TIMEZONE", 137 "type":"text", 138 "default":"", 139 "klass":"extra", 140 "help":" The timezone code for the thin client to use." 141 }, 142 { 143 "name":"TIMESERVER", 144 "type":"text", 145 "default":"", 146 "klass":"extra", 147 "help":"The address of an NTP time server that the thin client can set it's time from. If unset, the thin client just uses the BIOS time." 148 }, 149 { 150 "name":"SHUTDOWN_TIME", 151 "type":"text", 152 "default":"", 153 "klass":"extra", 154 "help":" Time at which thin client will automatically shut down." 155 }, 156 { 157 "name":"LTSP_FATCLIENT", 158 "type":"boolean", 159 "default":"True", 160 "klass":"basic", 161 "help":"Enable Fat Client support. It's automatically enabled if any sessions exist in /usr/share/xsessions." 162 }, 163 { 164 "name":"FAT_RAM_THRESHOLD", 165 "type":"text", 166 "default":"", 167 "klass":"extra", 168 "help":"Disable fat client support if less RAM is present." 169 }, 170 { 171 "name":"LOCALDEV", 172 "type":"boolean", 173 "default":"True", 174 "klass":"extra", 175 "help":"This parameter enables local devices support, like CD's and USB sticks. Users plugging them in should see them on the desktop, after they've been allowed to access the FUSE subsystem on the server. Check your distibutions docs to see how this is done on your distribution." 176 }, 177 { 178 "name":"LOCALDEV_DENY_CD", 179 "type":"boolean", 180 "default":"False", 181 "klass":"extra", 182 "help":"This parameter disables local device support for CD and DVD-rom devices" 183 }, 184 { 185 "name":"LOCALDEV_DENY_FLOPPY", 186 "type":"boolean", 187 "default":"False", 188 "klass":"extra", 189 "help":"This parameter disables local device support for floppy devices." 190 }, 191 { 192 "name":"LOCALDEV_DENY_INTERNAL_DISKS", 193 "type":"boolean", 194 "default":"True", 195 "klass":"extra", 196 "help":"This parameter disables local device support for internal ATA and SCSI hard disk devices." 197 }, 198 { 199 "name":"LOCALDEV_DENY_USB", 200 "type":"boolean", 201 "default":"False", 202 "klass":"extra", 203 "help":"This parameter disables local device support for USB devices." 204 }, 205 { 206 "name":"LOCALDEV_DENY", 207 "type":"text", 208 "default":"", 209 "klass":"extra", 210 "help":"This parameter disables local device support for devices matching certain patterns. Values are specified as a comma-separated list of sysfs attributes, which can be obtained by using udevadm info (or udevinfo). " 211 }, 212 { 213 "name":"PRINTER_0_DEVICE", 214 "type":"text", 215 "default":"", 216 "klass":"extra", 217 "help":"The device name of the printer. Valid device names such as /dev/lp0, or /dev/usblp0 are allowed." 218 }, 219 { 220 "name":"PRINTER_0_PORT", 221 "type":"text", 222 "default":"900", 223 "klass":"extra", 224 "help":" The TCP/IP Port number to use for the print server." 225 }, 226 { 227 "name":"PRINTER_0_TYPE", 228 "type":"text", 229 "default":"", 230 "klass":"extra", 231 "help":"Can either be set to P (for parallel), U (for USB) or S (for serial). Autodetected in most cases (except for serial)." 232 }, 233 { 234 "name":"PRINTER_0_WRITE_ONLY", 235 "type":"boolean", 236 "default":"False", 237 "klass":"extra", 238 "help":" Some parallel printers may need this set in order for the thin client to communicate to them properly. If you have problems with a parallel printer only printing part of the print job, try setting this to True." 239 }, 240 { 241 "name":"PRINTER_0_SPEED", 242 "type":"text", 243 "default":"900", 244 "klass":"extra", 245 "help":"Should be set to the baud rate of the printer (serial printers only)." 246 }, 247 { 248 "name":"PRINTER_0_FLOWCTRL", 249 "type":"text", 250 "default":"", 251 "klass":"extra", 252 "help":"Should be set to the flow control desired for the printer (serial printers only)." 253 }, 254 { 255 "name":"PRINTER_0_PARITY", 256 "type":"text", 257 "default":"", 258 "klass":"extra", 259 "help":"Specifies whether parity should be enabled for the printer (serial printers only)." 260 }, 261 { 262 "name":"PRINTER_0_DATABITS", 263 "type":"text", 264 "default":"8", 265 "klass":"extra", 266 "help":"Specifies how many data bits for the printer (serial printers only)." 267 }, 268 { 269 "name":"PRINTER_0_OPTIONS", 270 "type":"text", 271 "default":"", 272 "klass":"extra", 273 "help":"Specifies specific options for the printer (serial printers only)." 274 }, 275 { 276 "name":"LDM_PRINTER_LIST", 277 "type":"text", 278 "default":"", 279 "klass":"extra", 280 "help":"comma separated list of printers that will be displayed for that thin client (requires patched cups, included in Debian and Ubuntu)." 281 }, 282 { 283 "name":"LDM_PRINTER_DEFAULT", 284 "type":"text", 285 "default":"", 286 "klass":"extra", 287 "help":"Default printer for the thin client." 288 }, 289 { 290 "name":"SCANNER", 291 "type":"boolean", 292 "default":"False", 293 "klass":"extra", 294 "help":" This parameter enables scanners for the thin client." 295 }, 296 { 297 "name":"CONSOLE_KEYMAP", 298 "type":"text", 299 "default":"en", 300 "klass":"extra", 301 "help":"A valid console keymap. Allows you to specify a valid console keymap for TELNET_HOST sessions." 302 }, 303 { 304 "name":"XKBLAYOUT", 305 "type":"text", 306 "default":"", 307 "klass":"extra", 308 "help":"A valid xkb layout. Consult the X.org documentation for valid settings." 309 }, 310 { 311 "name":"XKBMODEL", 312 "type":"text", 313 "default":"", 314 "klass":"extra", 315 "help":"A valid xkb model. Consult the X.org documentation for valid settings." 316 }, 317 { 318 "name":"XKBVARIANT", 319 "type":"text", 320 "default":"", 321 "klass":"extra", 322 "help":"A valid xkb variant. Consult the X.org documentation for valid settings." 323 }, 324 { 325 "name":"XKBRULES", 326 "type":"text", 327 "default":"", 328 "klass":"extra", 329 "help":"A valid xkb rules specifier. Consult the X.org documentation for valid settings." 330 }, 331 { 332 "name":"XKBOPTIONS", 333 "type":"text", 334 "default":"", 335 "klass":"extra", 336 "help":"A valid xkb options specifier. Consult the X.org documentation for valid settings." 337 }, 338 { 339 "name":"USE_TOUCH", 340 "type":"boolean", 341 "default":"True", 342 "klass":"extra", 343 "help":"" 344 }, 345 { 346 "name":"SOUND", 347 "type":"boolean", 348 "default":"True", 349 "klass":"extra", 350 "help":"This parameter enables sound for the thin client." 351 }, 352 { 353 "name":"SOUND_DAEMON", 354 "type":"text", 355 "default":"pulse", 356 "klass":"extra", 357 "help":"This parameter sets which sound daemon to use on the thin client. Values are esd, nasd, and pulse (default)." 358 }, 359 { 360 "name":"VOLUME", 361 "type":"text", 362 "default":"90", 363 "klass":"extra", 364 "help":"This represents an integer percentage of the volume, ranging from 0 to 100%." 365 }, 366 { 367 "name":"HEADPHONE_VOLUME", 368 "type":"text", 369 "default":"", 370 "klass":"extra", 371 "help":"This represents an integer percentage of the headphone volume, ranging from 0 to 100%." 372 }, 373 { 374 "name":"PCM_VOLUME", 375 "type":"text", 376 "default":"", 377 "klass":"extra", 378 "help":"This represents an integer percentage of the PCM volume, ranging from 0 to 100%." 379 }, 380 { 381 "name":"CD_VOLUME", 382 "type":"text", 383 "default":"", 384 "klass":"extra", 385 "help":"This represents an integer percentage of the CD input volume, ranging from 0 to 100%." 386 }, 387 { 388 "name":"FRONT_VOLUME", 389 "type":"text", 390 "default":"", 391 "klass":"extra", 392 "help":"This represents an integer percentage of the front speaker volume, ranging from 0 to 100%." 393 }, 394 { 395 "name":"MIC_VOLUME", 396 "type":"text", 397 "default":"", 398 "klass":"extra", 399 "help":"This represents an integer percentage of the microphone input volume, ranging from 0 to 100%." 400 }, 401 { 402 "name":"USE_XFS", 403 "type":"boolean", 404 "default":"False", 405 "klass":"extra", 406 "help":"Instructs the thin client to look at the XFS_SERVER option, and use XFS for serving fonts." 407 }, 408 { 409 "name":"CONFIGURE_X", 410 "type":"boolean", 411 "default":"False", 412 "klass":"extra", 413 "help":"If you want to be able to configure the individual settings of the X configuration file, without having the X automatically configure the graphics card for you, you must enable this option. By default this option is turned off." 414 }, 415 { 416 "name":"X_CONF", 417 "type":"text", 418 "default":"", 419 "klass":"extra", 420 "help":"If you want to create your own complete X.org config file, you can do so and place it in the /opt/ltsp/<arch>/etc/X11 directory. Then, whatever you decide to call it needs to be entered as a value for this configuration variable. For example: X_CONF = /etc/X11/my-custom-xorg.conf Note that for the thin client, you reference it from /etc/X11." 421 }, 422 { 423 "name":"X_RAMPERC", 424 "type":"text", 425 "default":"100", 426 "klass":"extra", 427 "help":"Percentage of RAM for X server. Some programs allocate a large amount of ram in the X.org server running on your thin client. Programs like Firefox and Evince can use up so much ram, that they eventually exhaust all your physical ram, and NBD swap, causing your thin client to crash. If you find your clients being booted back to a login prompt, or freezing up when viewing certain PDF's or web pages, this may be the problem. The X_RAMPERC variable stands for X RAM PERCent, and is a number between 0 and 100 that specifies how much of the free space on your thin client X.org is allowed to consume. You'll generally want to set it at something lower than 100 percent, if you're having problems. Experimentation has shown a value between 80 and 90 will usually keep the terminal alive. What will then happen is the program consuming the memory will die, as opposed to the thin client itself. If you're having unexplained terminal problems, specifying: X_RAMPERC = 80 in your lts.conf file may improve things." 428 }, 429 { 430 "name":"X_VIRTUAL", 431 "type":"text", 432 "default":"", 433 "klass":"extra", 434 "help":"If you want to have a virtual screen which is larger than the physical screen on your thin client, you would configure that by providing a string of the form \"width height\" in this parameter, similar to the xorg.conf format." 435 }, 436 { 437 "name":"XSERVER", 438 "type":"text", 439 "default":"", 440 "klass":"extra", 441 "help":"You can use this parameter to override which X server the thin client will run. For PCI and AGP video cards, this parameter should not be required. The thin client should normally be able to auto-detect the card." 442 }, 443 { 444 "name":"X_MOUSE_DEVICE", 445 "type":"text", 446 "default":"", 447 "klass":"extra", 448 "help":"This is the device node that the mouse is connected to. If it is a serial mouse, this would be a serial port, such as /dev/ttyS0 or /dev/ttyS1. This is not needed for PS/2 or USB mice, as they are auto-detected." 449 }, 450 { 451 "name":"X_MOUSE_PROTOCOL", 452 "type":"text", 453 "default":"", 454 "klass":"extra", 455 "help":"Should be auto-detected. However, valid entries include: sunkbd, lkkbd, vsxxxaa, spaceorb, spaceball, magellan, warrior, stinger, mousesystems, sunmouse, microsoft, mshack, mouseman, intellimouse, mmwheel, iforce, h3600ts, stowawaykbd, ps2serkbd,twiddler, twiddlerjoy" 456 }, 457 { 458 "name":"X_MOUSE_EMULATE3BTN", 459 "type":"boolean", 460 "default":"False", 461 "klass":"extra", 462 "help":"Normally unset, may need to be set to Y for certain 2 button mice." 463 }, 464 { 465 "name":"X_NUMLOCK", 466 "type":"boolean", 467 "default":"False", 468 "klass":"extra", 469 "help":"If this variable is set to True, then the numlock key will be defaulted to on when the terminal boots. Note that the numlockx command must be installed in the chroot for this to work." 470 }, 471 { 472 "name":"X_COLOR_DEPTH", 473 "type":"text", 474 "default":"", 475 "klass":"extra", 476 "help":"This is the number of bits to use for the colour depth. Possible values are 8, 16, 24 and 32. 8 bits will give 256 colours, 16 will give 65536 colours, 24 will give 16 million colours and 32 bits will give 4.2 billion colours! Not all X servers support all of these values. The default for thin clients is 16 in order to minimize network bandwidth, while for fat clients the X server default is used." 477 }, 478 { 479 "name":"X_SMART_COLOR_DEPTH", 480 "type":"boolean", 481 "default":"True", 482 "klass":"extra", 483 "help":"If set, thin clients no longer default to 16 bit colour depth but use the X server default instead." 484 }, 485 { 486 "name":"X_HORZSYNC", 487 "type":"text", 488 "default":"", 489 "klass":"extra", 490 "help":" This sets the X.org HorizSync configuration parameter. This should be auto-detected for your monitor, however, if you want to force a lower resolution, use this parameter to do so." 491 }, 492 { 493 "name":"X_VERTREFRESH", 494 "type":"text", 495 "default":"", 496 "klass":"extra", 497 "help":"This sets the X.org VertRefresh configuration parameter. This should be auto-detected for your monitor, however, if you want to force a lower resolution, use this parameter to do so." 498 }, 499 { 500 "name":"X_VIDEO_RAM", 501 "type":"text", 502 "default":"", 503 "klass":"extra", 504 "help":"This sets the X.org VideoRam configuration parameter. The setting is in kilobytes. This should be auto-detected for your monitor. If you need to force a different video ram setting, use this parameter to do so." 505 }, 506 { 507 "name":"X_BLANKING", 508 "type":"text", 509 "default":"", 510 "klass":"extra", 511 "help":"When set, X_BLANKING will cause DPMS standby to activate after the number of seconds provided. If the monitor does not support DPMS, then the blanking screensaver will activate. If X_BLANKING is set to 0, the monitor will remain on indefinitely. NOTE: This does not apply to the xdmcp or startx screen script. Also, server-side Xclients such as power managers and screensavers may override this setting." 512 }, 513 { 514 "name":"XRANDR_DISABLE", 515 "type":"boolean", 516 "default":"False", 517 "klass":"extra", 518 "help":" Disables XRANDR output handling so that the older X_MODE_0 way of setting resolution works. This is useful on older Xorg drivers that don't support XRANDR." 519 }, 520 { 521 "name":"LDM_AUTOLOGIN", 522 "type":"boolean", 523 "default":"False", 524 "klass":"extra", 525 "help":"This option allows the thin client to login automatically without the need for a username and password. To set it set LDM_AUTOLOGIN = True for the corresponding thin client. This will attempt to log in the thin client with username = hostname and password = hostname. You can also set a user and password with LDM_USERNAME and LDM_PASSWORD variables." 526 }, 527 { 528 "name":"LDM_USERNAME", 529 "type":"text", 530 "default":"", 531 "klass":"extra", 532 "help":"" 533 }, 534 { 535 "name":"LDM_PASSWORD", 536 "type":"text", 537 "default":"", 538 "klass":"extra", 539 "help":"" 540 }, 541 { 542 "name":"LDM_DEBUG_TERMINAL", 543 "type":"boolean", 544 "default":"False", 545 "klass":"extra", 546 "help":"Opens a local terminal after login for debugging purposes." 547 }, 548 { 549 "name":"LDM_DIRECTX", 550 "type":"boolean", 551 "default":"False", 552 "klass":"extra", 553 "help":"This is arguably the most important LDM option, as it allows you to turn off the encrypted X tunnel via SSH, and instead run a less secure, but much faster unencrypted tunnel. Users who have slower thin clients will want to set this to True. It is set to True by default in Fedora." 554 }, 555 { 556 "name":"LDM_GUESTLOGIN", 557 "type":"boolean", 558 "default":"False", 559 "klass":"extra", 560 "help":"This option places a GUEST LOGIN button underneath the entry field for username and password. To set it set LDM_GUESTLOGIN = True for the corresponding thin client. You can also set a user and password with LDM_USERNAME = John and LDM_PASSWORD = secret, although not setting these will default to the hostname of the thin client." 561 }, 562 { 563 "name":"LDM_GUEST_SERVER", 564 "type":"text", 565 "default":"", 566 "klass":"extra", 567 "help":"This is a space-separated list of available servers where guest logins are available. The first server in the list will be the default guest login server unless the user selects another from the preferences menu at login time." 568 }, 569 { 570 "name":"LDM_USER_ALLOW", 571 "type":"text", 572 "default":"", 573 "klass":"extra", 574 "help":" This option allows you to give access to certain thin clients based on the username set in /etc/passwd. For example, thin client A should only be used by Jane, Bob, and Fred, while thin client B is to be used by Harry only. By adding these options to the corresponding mac addresses you allow or deny access to the thin clients in question. Example:<br/> [thin:client:A:mac:address]<br/> LDM_USER_ALLOW = Jane,Bob,Fred<br/>[thin:client:B:mac:adddress]<br/>LDM_USER_ALLOW = Harry<br/>" 575 }, 576 { 577 "name":"LDM_LOGIN_TIMEOUT", 578 "type":"text", 579 "default":"", 580 "klass":"extra", 581 "help":"This lets LDM automatically login after the set amount of time in seconds. If you specify this option, then do not specify LDM_AUTOLOGIN. Use it in this format:<br/>[thin:client:mac:address]<br/>LDM_LOGIN_TIMEOUT = 25<br/>Note that you will need to also set LDM_GUESTLOGIN=True for LDM_LOGIN_TIMEOUT to be useful." 582 }, 583 { 584 "name":"LDM_SYSLOG", 585 "type":"boolean", 586 "default":"False", 587 "klass":"extra", 588 "help":"Normally, LDM logs to a simple file on the thin client, namely /var/log/ldm.log. This has the advantage of being fast, but the disadvantage of being hard to read for the administrator in the event of a problem, as the administrator must either spawn a shell screen session, or enable root login in tty1. By setting this option to \"True\", you can log up to the server if you've enabled your server's syslog for remote logging." 589 }, 590 { 591 "name":"LDM_SERVER", 592 "type":"text", 593 "default":"", 594 "klass":"extra", 595 "help":"This is a space-separated list of available servers for LDM to log into. The first server in the list will be the default server unless the user selects another from the preferences menu at login time" 596 }, 597 { 598 "name":"LDM_LANGUAGE", 599 "type":"text", 600 "default":"es_ES.UTF-8", 601 "klass":"basic", 602 "help":"This allows the system administrator to override the default locale settings on the server by setting the environment variables LANG, LANGUAGE and LC_ALL at login. Use the LANG variable to set the default locale for LDM's user interface." 603 }, 604 { 605 "name":"LDM_FORCE_LANGUAGE", 606 "type":"text", 607 "default":"", 608 "klass":"extra", 609 "help":"Same as LDM_LANGUAGE, but it overrides any previously user selected language and it even hides the LDM language selection menu." 610 }, 611 { 612 "name":"LDM_SSHOPTIONS", 613 "type":"text", 614 "default":"", 615 "klass":"extra", 616 "help":"Allows you to specify custom options to the ssh sessions started between LDM and the server." 617 }, 618 { 619 "name":"SSH_OVERRIDE_PORT", 620 "type":"text", 621 "default":"", 622 "klass":"extra", 623 "help":"If you run your ssh server different from the defult, you may set the port the thin client will use with this parameter." 624 }, 625 { 626 "name":"SSH_FOLLOW_SYMLINKS", 627 "type":"boolean", 628 "default":"False", 629 "klass":"extra", 630 "help":"Causes sshfs mounted filesystems for local applications to follow symlinks. By default it's false for symlinks under $HOME and true for any LOCAL_APPS_EXTRAMOUNTS." 631 }, 632 { 633 "name":"LOCAL_APPS_EXTRAMOUNTS", 634 "type":"text", 635 "default":"", 636 "klass":"extra", 637 "help":"This parameter enables extra mount points to be mounted on the thin client with sshfs. This require a commas separated list of directory." 638 }, 639 { 640 "name":"LDM_SESSION", 641 "type":"text", 642 "default":"gnome-fallback", 643 "klass":"basic", 644 "help":"Used to chose the default session on the server, for example: LDM_SESSION=\"gnome-fallback\" You can find the list of services that your server provides in /usr/share/xsessions. If the user has selected a specific session though LDM or another DM in the past, that's stored in his ~/.dmrc, and it overrides the default session." 645 }, 646 { 647 "name":"LDM_FORCE_SESSION", 648 "type":"text", 649 "default":"", 650 "klass":"extra", 651 "help":"Same as LDM_SESSION, but it overrides any previously selected sessions by the user and it even hides the LDM session selection menu." 652 }, 653 { 654 "name":"LDM_XSESSION", 655 "type":"text", 656 "default":"", 657 "klass":"extra", 658 "help":"Allows you to specify custom script on the server for LDM to run, rather than the server's standard script for starting an X session (usually Xsession)." 659 }, 660 { 661 "name":"LDM_LIMIT_ONE_SESSION", 662 "type":"boolean", 663 "default":"False", 664 "klass":"extra", 665 "help":"Only allow a given user to log into one thin-client at a time." 666 }, 667 { 668 "name":"LDM_LIMIT_ONE_SESSION_PROMPT", 669 "type":"boolean", 670 "default":"False", 671 "klass":"extra", 672 "help":"Prompt to kill processes of other logins when other logins are detected. Requires LDM_LIMIT_ONE_SESSION to be set." 673 }, 674 { 675 "name":"LDM_THEME", 676 "type":"text", 677 "default":"", 678 "klass":"extra", 679 "help":"Specify the name of the LDM theme. It can reference a directory in /usr/share/ldm/themes, or be specified as a full path to the theme dir (both relative to the chroot). To use the theme in /opt/ltsp/i386/usr/share/ldm/themes/MYTHEME, you'd specify: LDM_THEME=MYTHEME In your lts.conf file. Alternately, To use the theme in /opt/ltsp/i386/etc/MYTHEME, you'd specify: LDM_THEME=/etc/MYTHEME In your lts.conf file." 680 }, 681 { 682 "name":"LDM_PASSWORD_HASH", 683 "type":"boolean", 684 "default":"False", 685 "klass":"extra", 686 "help":"When set to True, this will create a proper shadow entry on the client, allowing for screen locking, and other things which require authentication to work. Note, this allows you to change your password locally, or possibly other actions such as sudo, but these changes are only temporary and will not persist on reboot. versions: LDM 2.2.14+, LTSP 5.5.2+" 687 }, 688 { 689 "name":"LOCAL_APPS", 690 "type":"boolean", 691 "default":"True", 692 "klass":"extra", 693 "help":"Enables support for running local apps on the thin client." 694 }, 695 { 696 "name":"LOCAL_APPS_MENU", 697 "type":"boolean", 698 "default":"False", 699 "klass":"extra", 700 "help":"Enables overriding of menu items from remote (server) applications. If this is set to True, local applications in the users menu will be used instead of the applications on the server." 701 }, 702 { 703 "name":"LOCAL_APPS_MENU_ITEMS", 704 "type":"text", 705 "default":"", 706 "klass":"extra", 707 "help":"This item should contain a comma separated list of application names as they appear on their .desktop files." 708 }, 709 { 710 "name":"LOCAL_APPS_WHITELIST", 711 "type":"text", 712 "default":"", 713 "klass":"extra", 714 "help":"Used to allow only specified space-separated commands to be run as local apps, allow all is default if unset. Full-paths are required for each command. No spaces in the names are allowed." 715 } 716 ] -
lmd/trunk/fuentes/admin-center-ltsp.install/lliurex-ltsp/src/llx-ltsconf.html
r2844 r3164 1 <div class='container row ' id="Llx_ltsconf_contendor" >2 <div class='col-md-6 well bs-component col-md-offset-3'>3 <form class="form-horizontal" id="llx_ltsconf_bootoptions">4 <div class="form-group" id='Llx_ltsconf_formularibasic'>5 </div>6 <div class="form-group" id='Llx_ltsconf_formulariextra'>7 </div>8 1 9 <label><a href="javascript:void(0)" class="btn btn-primary btn-fab btn-fab-mini" data-toggle="modal" data-target="#Llx_ltsconfyModal"><i class="material-icons"><span class='glyphicon glyphicon-plus' aria-hidden='true'></span></i></a> Add Options</label> 10 <!--button type="button" class="btn btn-info btn-lg" data-toggle="modal" data-target="#Llx_ltsconfyModal">Open Modal</button--> 11 </form> 12 <button type='button' id="ltsp_ltsconf_save_options_bt" class='btn btn-primary' onclick='Llx_ltsconf_LI.save_options()'>Save options<div class='ripple-container'></div></button--> 13 <!-- MOVED TO BIND EVENTS!! button type='button' class='btn btn-primary' onclick='Llx_ltsconf_LI.save_options()'>Save options<div class='ripple-container'></div></button--> 2 <div class="container col-md-10 col-md-offset-1"> 3 <div class="panel panel-default" style="padding: 0px;"> 4 <div class="panel-heading"><h2 i18n="">lmd.LliureX.Edit.LTS.Conf</h2></div> 5 <div id="LtspMainWindow" class="panel-body"> 6 <p i18n>ltsp.lts.conf.edit.description</p> 7 8 <div id="llx_ltsconf_bootoptions" class="col-md-12"> 9 10 </div> 11 12 <button type='button' id="ltsp_ltsconf_add_option_bt" class='btn btn-raised btn-success'> 13 <i class="material-icons"><span class='glyphicon glyphicon-plus' aria-hidden='true'></span></i> 14 <span i18n>ltsconf.add.option</span> 15 <div class='ripple-container'></div> 16 </button> 17 18 <button type='button' id="ltsp_ltsconf_add_option_arbitrary_bt" class='btn btn-raised btn-success'> 19 <i class="material-icons"><span class='glyphicon glyphicon-pencil' aria-hidden='true'></span></i> 20 <span i18n>ltsconf.add.option.arbitrary</span> 21 <div class='ripple-container'></div> 22 </button> 23 24 <button type='button' id="ltsp_ltsconf_save_options_bt" class='btn btn-primary' style="float: right"><span i18n>ltsconf.save.options</span><div class='ripple-container'></div></button> 25 26 </div></div></div> 14 27 15 </div>16 28 17 </div>18 29 19 <!-- Pop up --> 20 <div class="modal fade" id="Llx_ltsconfyModal" role="dialog"> 21 <div class="modal-dialog"> 22 23 <!-- Modal content--> 24 <div class="modal-content"> 25 <div class="modal-header"> 26 <button type="button" class="close" data-dismiss="modal">×</button> 27 <h4 class="modal-title">Variables</h4> 28 </div> 29 <div class="modal-body" id='Llx-ltsconf-llistaVariablesElegibles'> 30 31 32 </div> 33 <div class="modal-footer"> 34 <button type="button" class="btn btn-default" data-dismiss="modal">Close</button> 35 </div> 36 </div> 37 38 </div> 39 </div> 30 <!--div id="test2">Test2</div> 31 32 <div id="test3">Test3</div-->
Note: See TracChangeset
for help on using the changeset viewer.