1Safe Tk(n)                   Tk Built-In Commands                   Safe Tk(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       loadTk - Load Tk into a safe interpreter.
9

SYNOPSIS

11       ::safe::loadTk slave ?-use windowId? ?-display displayName?
12_________________________________________________________________
13

DESCRIPTION

15       Safe  Tk  is  based on Safe Tcl, which provides a mechanism that allows
16       restricted and mediated access to auto-loading and  packages  for  safe
17       interpreters.   Safe  Tk  adds the ability to configure the interpreter
18       for safe Tk operations and load Tk into safe interpreters.
19
20       The ::safe::loadTk command initializes the required data structures  in
21       the  named safe interpreter and then loads Tk into it.  The interpreter
22       must have been created with ::safe::interpCreate or have been  initial‐
23       ized with ::safe::interpInit.  The command returns the name of the safe
24       interpreter.  If -use is specified, the window identified by the speci‐
25       fied  system  dependent  identifier windowId is used to contain the “.”
26       window of the safe interpreter; it can be any valid id, eventually ref‐
27       erencing  a  window belonging to another application. As a convenience,
28       if the window you plan to use is a Tk Window of the application you can
29       use  the  window  name  (e.g. .x.y) instead of its window Id ([winfo id
30       .x.y]).  When -use is not specified, a new toplevel window  is  created
31       for  the  “.”   window  of the safe interpreter. On X11 if you want the
32       embedded window to use another display than the default one, specify it
33       with  -display.   See the SECURITY ISSUES section below for implementa‐
34       tion details.
35
36

SECURITY ISSUES

38       Please read the safe manual page for Tcl to learn about the basic secu‐
39       rity considerations for Safe Tcl.
40
41       ::safe::loadTk  adds  the  value  of  tk_library  taken from the master
42       interpreter to the virtual access path of the safe interpreter so  that
43       auto-loading will work in the safe interpreter.
44
45       Tk  initialization is now safe with respect to not trusting the slave's
46       state for startup. ::safe::loadTk registers the slave's  name  so  when
47       the  Tk  initialization  (Tk_SafeInit)  is called and in turn calls the
48       master's ::safe::InitTk it will  return  the  desired  argv  equivalent
49       (-use windowId, correct -display, etc.)
50
51       When  -use is not used, the new toplevel created is specially decorated
52       so the user is always aware that the  user  interface  presented  comes
53       from  a potentially unsafe code and can easily delete the corresponding
54       interpreter.
55
56       On X11, conflicting -use and -display are likely to generate a fatal  X
57       error.
58
59

SEE ALSO

61       safe(n),   interp(n),   library(n),   load(n),  package(n),  source(n),
62       unknown(n)
63
64

KEYWORDS

66       alias,  auto-loading,  auto_mkindex,  load,  master  interpreter,  safe
67       interpreter, slave interpreter, source
68
69
70
71
72Tk                                    8.0                           Safe Tk(n)
Impressum