This file is indexed.

/usr/share/astk/pref_config.tcl is in code-aster-gui 1.8.4-5.

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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
#########################################################################
# COPYRIGHT (C) 2003         EDF R&D              WWW.CODE-ASTER.ORG    #
#                                                                       #
# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR         #
# MODIFY IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS        #
# PUBLISHED BY THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE    #
# LICENSE, OR (AT YOUR OPTION) ANY LATER VERSION.                       #
# THIS PROGRAM IS DISTRIBUTED IN THE HOPE THAT IT WILL BE USEFUL,       #
# BUT WITHOUT ANY WARRANTY; WITHOUT EVEN THE IMPLIED WARRANTY OF        #
# MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. SEE THE GNU      #
# GENERAL PUBLIC LICENSE FOR MORE DETAILS.                              #
#                                                                       #
# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE     #
# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO : EDF R&D CODE_ASTER,       #
#    1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE.        #
#########################################################################

# $Id: pref_config.tcl 3530 2008-09-26 08:45:55Z courtois $

# reaction a Configuration/Preferences/Generales
#################################################################
proc Opt_prefs { } {
   bckup_prefs

   set fen .fen_pref
   catch {destroy $fen}
   toplevel $fen
   wm withdraw $fen
   wm title $fen "[ashare::mess ihm 33] - [ashare::mess ihm 37]"
   wm transient $fen .
   grab set $fen

   pack [frame $fen.liste -relief solid -bd 1]
# titre
   pack [frame $fen.liste.tit1 -relief solid -bd 0] -fill x
   label $fen.liste.tit1.lbl -font $astk::ihm(font,labbout) -text [ashare::mess ihm 141] -width 35 -anchor w
   pack $fen.liste.tit1.lbl -pady 3 -side left -fill x
# aide
   button $fen.liste.tit1.help -image [image create photo -file $astk::icon(help)] \
      -command "grab release $fen ; aff_aide . 190" -bd 0 -bg $astk::ihm(couleur,background)
   pack $fen.liste.tit1.help -side right

# infos "perso"
   pack [frame $fen.liste.nom -relief solid -bd 0] -anchor w
   label $fen.liste.nom.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 89] -width 35 -anchor w
   entry $fen.liste.nom.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,nom_user)
   pack $fen.liste.nom.lbl $fen.liste.nom.path -pady 3 -side left

   pack [frame $fen.liste.email -relief solid -bd 0] -anchor w
   label $fen.liste.email.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 90] -width 35 -anchor w
   entry $fen.liste.email.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,email)
   pack $fen.liste.email.lbl $fen.liste.email.path -pady 3 -side left

# organisme / unité
   pack [frame $fen.liste.org -relief solid -bd 0] -anchor w
   if { $astk::agla(num_serv) > -1 && [llength $astk::agla(infoid)] > 0 } {
      set astk::config(-1,org) [lindex $astk::agla(infoid) 3]
      label $fen.liste.org.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 240] -width 35 -anchor w
      label $fen.liste.org.inst -font $astk::ihm(font,lab) -text $astk::config(-1,org)
      pack $fen.liste.org.lbl $fen.liste.org.inst -pady 3 -side left
   } else {
      label $fen.liste.org.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 240] -width 35 -anchor w
      entry $fen.liste.org.inst -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,org)
      pack $fen.liste.org.lbl $fen.liste.org.inst -pady 3 -side left
   }

# instance AGLA
   pack [frame $fen.liste.agla -relief solid -bd 0] -anchor w
   if { $astk::agla(num_serv) > -1 } {
      label $fen.liste.agla.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 91] -width 35 -anchor w
      label $fen.liste.agla.inst -font $astk::ihm(font,lab) -text [join $astk::agla(instance)]
      pack $fen.liste.agla.lbl $fen.liste.agla.inst -pady 3 -side left
   }

# langue
   pack [frame $fen.liste.langue -relief solid -bd 0] -anchor w
   label $fen.liste.langue.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 101] -width 35 -anchor w
   set MenuLang [tk_optionMenu $fen.liste.langue.choix astk::config(-1,langue) $ashare::llang(lang,0)]
   $MenuLang configure \
        -foreground $astk::ihm(couleur,menu_foreground) \
        -background $astk::ihm(couleur,menu_background)
   $MenuLang entryconfigure 0 -font $astk::ihm(font,labmenu)
   for {set j 1} {$j < $ashare::llang(nb_lang)} {incr j} {
      $MenuLang add radiobutton
      $MenuLang entryconfigure $j -label $ashare::llang(lang,$j) -font $astk::ihm(font,labmenu) -variable astk::config(-1,langue)
   }
   $fen.liste.langue.choix configure -font $astk::ihm(font,labmenu) -bg $astk::ihm(couleur,liste)
   pack $fen.liste.langue.lbl $fen.liste.langue.choix -pady 3 -side left

# préférences - version par défaut
   pack [frame $fen.liste.defvers -relief solid -bd 0] -anchor w
   label $fen.liste.defvers.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 92] -width 35 -anchor w
   entry $fen.liste.defvers.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,def_vers)
   pack $fen.liste.defvers.lbl $fen.liste.defvers.path -pady 3 -side left

# xterm
   pack [frame $fen.liste.xterm -relief solid -bd 0] -anchor w
   label $fen.liste.xterm.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 82] -width 35 -anchor w
   entry $fen.liste.xterm.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,xterm)
   pack $fen.liste.xterm.lbl $fen.liste.xterm.path -pady 3 -side left

# editeur
   pack [frame $fen.liste.editeur -relief solid -bd 0] -anchor w
   label $fen.liste.editeur.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 93] -width 35 -anchor w
   entry $fen.liste.editeur.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,editeur)
   pack $fen.liste.editeur.lbl $fen.liste.editeur.path -pady 3 -side left

# navigateur
   pack [frame $fen.liste.browser -relief solid -bd 0] -anchor w
   label $fen.liste.browser.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 363] -width 35 -anchor w
   entry $fen.liste.browser.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,browser)
   pack $fen.liste.browser.lbl $fen.liste.browser.path -pady 3 -side left

# nbre de fichiers rémanents
   pack [frame $fen.liste.nb_reman -relief solid -bd 0] -anchor w
   label $fen.liste.nb_reman.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 94] -width 35 -anchor w
   scale $fen.liste.nb_reman.scl -orient horizontal -length 200 -from 0 -to 10 -tickinterval 1 \
      -variable astk::config(-1,nb_reman) -font $astk::ihm(font,lab) -showvalue 0
   pack $fen.liste.nb_reman.lbl $fen.liste.nb_reman.scl -pady 3 -side left

# niveau de debug
   pack [frame $fen.liste.dbg -relief solid -bd 0] -anchor w
   label $fen.liste.dbg.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 36] -width 35 -anchor w
   scale $fen.liste.dbg.scl -orient horizontal -length 200 -from 0 -to 5 -tickinterval 1 \
      -variable astk::config(-1,dbglevel) -font $astk::ihm(font,lab) -showvalue 0
   pack $fen.liste.dbg.lbl $fen.liste.dbg.scl -pady 3 -side left

# bip
   pack [frame $fen.liste.bip -relief solid -bd 0] -anchor w -padx 20
   checkbutton $fen.liste.bip.cb -variable astk::config(-1,bip) -anchor w
   label  $fen.liste.bip.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 362]"
   pack $fen.liste.bip.cb $fen.liste.bip.lbl -pady 3 -side left

# options asjob
# titre
   pack [frame $fen.liste.tit2 -relief solid -bd 0] -anchor w
   label $fen.liste.tit2.lbl -font $astk::ihm(font,labbout) -text [ashare::mess ihm 142] -width 35 -anchor w
   pack $fen.liste.tit2.lbl -pady 3 -side left

# nbre de ligne
   pack [frame $fen.liste.nb_ligne -relief solid -bd 0] -anchor w
   label $fen.liste.nb_ligne.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 139] -width 35 -anchor w
   scale $fen.liste.nb_ligne.scl -orient horizontal -length 200 -from 50 -to 450 -tickinterval 100 -resolution 10 \
      -variable astk::config(-1,nb_ligne) -font $astk::ihm(font,lab) -showvalue 0
   pack $fen.liste.nb_ligne.lbl $fen.liste.nb_ligne.scl -pady 3 -side left

# frequence d'actualisation
   pack [frame $fen.liste.freq_actu -relief solid -bd 0] -anchor w
   label $fen.liste.freq_actu.lbl -font $astk::ihm(font,lab) -text [ashare::mess ihm 140] -width 35 -anchor w
   scale $fen.liste.freq_actu.scl -orient horizontal -length 200 -from 1 -to 5 -tickinterval 1 \
      -variable astk::config(-1,freq_actu) -font $astk::ihm(font,lab) -showvalue 0
   pack $fen.liste.freq_actu.lbl $fen.liste.freq_actu.scl -pady 3 -side left

# ok
   pack [frame $fen.valid -relief solid -bd 0]
   button $fen.valid.annuler -font $astk::ihm(font,labbout) -text [ashare::mess ihm 85] \
       -bg $astk::ihm(couleur,annul) \
      -command "restaure_prefs ; destroy $fen ; grab release $fen"
   button $fen.valid.ok -font $astk::ihm(font,labbout) -text "Ok" \
       -bg $astk::ihm(couleur,valid) \
      -command "accept_pref $ashare::lang ; destroy $fen ; grab release $fen"
   pack $fen.valid.ok $fen.valid.annuler -side left -padx 10 -pady 5
   
   wm deiconify $fen
}

# reaction a Configuration/Preferences/Reseau
#################################################################
proc Opt_prefs_net { } {
   bckup_prefs

   set fen .fen_prefnet
   catch {destroy $fen}
   toplevel $fen
   wm withdraw $fen
   wm title $fen "[ashare::mess ihm 33] - [ashare::mess ihm 378]"
   wm transient $fen .
   grab set $fen

   pack [frame $fen.liste -relief solid -bd 1]

# paramètres réseau
# titre
   pack [frame $fen.liste.tit3 -relief solid -bd 0] -anchor w
   label $fen.liste.tit3.lbl -font $astk::ihm(font,labbout) -text [ashare::mess ihm 356] -width 35 -anchor w
   pack $fen.liste.tit3.lbl -pady 3 -side left

# ipdhcp ou nom du client
   pack [frame $fen.liste.ipdhcp -relief solid -bd 0] -anchor w
   if { $astk::config(-1,isdhcp) == 1} {
      label $fen.liste.ipdhcp.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 348]" -width 35 -anchor w
      entry $fen.liste.ipdhcp.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,ipdhcp)
   } else {
      label $fen.liste.ipdhcp.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 349]" -width 35 -anchor w
      entry $fen.liste.ipdhcp.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,nom_complet) -state disabled
   }
   pack $fen.liste.ipdhcp.lbl $fen.liste.ipdhcp.path -pady 3 -side left

# switch mode DHCP / hostname
   pack [frame $fen.liste.mode -relief solid -bd 0] -anchor w -padx 20
   checkbutton $fen.liste.mode.cb -variable astk::config(-1,isdhcp) -anchor w
   label  $fen.liste.mode.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 350]"
   pack $fen.liste.mode.cb $fen.liste.mode.lbl -pady 3 -side left

# domain name
   pack [frame $fen.liste.domain -relief solid -bd 0] -anchor w
   label $fen.liste.domain.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 322] (ex.: domain.org)" -width 35 -anchor w
   entry $fen.liste.domain.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,nom_domaine)
   pack $fen.liste.domain.lbl $fen.liste.domain.path -pady 3 -side left

# forced display variable
   pack [frame $fen.liste.displ -relief solid -bd 0] -anchor w
   label $fen.liste.displ.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 376]" -width 35 -anchor w
   entry $fen.liste.displ.path -width 30 -font $astk::ihm(font,val) -textvariable astk::config(-1,forced_display)
   pack $fen.liste.displ.lbl $fen.liste.displ.path -pady 3 -side left

# remote shell protocol
   pack [frame $fen.liste.proto1 -relief solid -bd 0] -anchor w
   label $fen.liste.proto1.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 354]" -width 35 -anchor w
   radiobutton $fen.liste.proto1.rsh -font $astk::ihm(font,val) -text rsh -value RSH -variable astk::config(-1,remote_shell_protocol)
   radiobutton $fen.liste.proto1.ssh -font $astk::ihm(font,val) -text ssh -value SSH -variable astk::config(-1,remote_shell_protocol)
   pack $fen.liste.proto1.lbl $fen.liste.proto1.rsh $fen.liste.proto1.ssh -pady 3 -side left

# remote copy protocol
   pack [frame $fen.liste.proto2 -relief solid -bd 0] -anchor w
   label $fen.liste.proto2.lbl -font $astk::ihm(font,lab) -text "[ashare::mess ihm 355]" -width 35 -anchor w
   radiobutton $fen.liste.proto2.rcp -font $astk::ihm(font,val) -text rcp -value RCP -variable astk::config(-1,remote_copy_protocol)
   radiobutton $fen.liste.proto2.scp -font $astk::ihm(font,val) -text scp -value SCP -variable astk::config(-1,remote_copy_protocol)
   pack $fen.liste.proto2.lbl $fen.liste.proto2.rcp $fen.liste.proto2.scp -pady 3 -side left

# ok
   pack [frame $fen.valid -relief solid -bd 0]
   button $fen.valid.annuler -font $astk::ihm(font,labbout) -text [ashare::mess ihm 85] \
       -bg $astk::ihm(couleur,annul) \
      -command "restaure_prefs ; destroy $fen ; grab release $fen"
   button $fen.valid.ok -font $astk::ihm(font,labbout) -text "Ok" \
       -bg $astk::ihm(couleur,valid) \
      -command "accept_pref $ashare::lang ; destroy $fen ; grab release $fen"
   pack $fen.valid.ok $fen.valid.annuler -side left -padx 10 -pady 5
   
   wm deiconify $fen
}

# Acceptation des préférences
#################################################################
proc accept_pref { old_lang } {
   global old_pref

# nom de machine / domaine
   init_nom_complet $astk::config(-1,isdhcp)

   if { $astk::config(-1,ipdhcp) != $old_pref(-1,ipdhcp)
     || $astk::config(-1,isdhcp) != $old_pref(-1,isdhcp)
     || $astk::config(-1,nom_complet) != $old_pref(-1,nom_complet) } {
      check_nom_complet
   }
# display
   init_display
   check_display
# niveau debug
   set ashare::dbg $astk::config(-1,dbglevel)
# info en cas de changement de la langue
   if { $astk::config(-1,langue) != $old_lang } {
      set ashare::lang $astk::config(-1,langue)
      raffr_princ
   }
# mise à jour de la liste des profils (nb_reman)
   maj_prof
# sauvegarde des préférences
   ashare::save_prefs
}

#################################################################
proc bckup_prefs {} {
   global old_pref
   
# valeurs actuelles dans old_pref
   set mots_cles $ashare::mots(MCS_pref)
   lappend mots_cles "nom_complet"
   for { set k 0 } { $k < [ llength $mots_cles ] } { incr k } {
      set mcs [lindex $mots_cles $k]
      set old_pref(-1,$mcs) $astk::config(-1,$mcs)
   }
}

#################################################################
proc restaure_prefs {} {
   global old_pref

# récupère depuis old_pref
   set mots_cles $ashare::mots(MCS_pref)
   lappend mots_cles "nom_complet"
   for { set k 0 } { $k < [ llength $mots_cles ] } { incr k } {
      set mcs [lindex $mots_cles $k]
      set astk::config(-1,$mcs) $old_pref(-1,$mcs)
   }
}