version 1.42, 2004/09/10 13:20:22 |
version 1.46, 2006/01/26 08:42:33 |
|
|
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.41 2004/08/28 05:23:55 takayama Exp $ |
%%%%%%%%%%% $OpenXM: OpenXM/src/kan96xx/Doc/ox.sm1,v 1.45 2004/09/17 12:32:11 takayama Exp $ |
|
|
/ox.sm1.myname (ox-new.sm1) def |
/ox.sm1.myname (ox-new.sm1) def |
|
|
Line 48 ox.version [(Version)] system_variable gt |
|
Line 48 ox.version [(Version)] system_variable gt |
|
/@@@.Xm_noX Xm_noX def |
/@@@.Xm_noX Xm_noX def |
}{ } ifelse |
}{ } ifelse |
/Xm_noX @@@.Xm_noX def |
/Xm_noX @@@.Xm_noX def |
|
/Xm_engineLogToStdout 0 def |
|
|
/oxNoX { |
/oxNoX { |
/Xm_noX 1 def |
/Xm_noX 1 def |
Line 348 ox.verbose { oxhelp } { } ifelse |
|
Line 349 ox.verbose { oxhelp } { } ifelse |
|
|
|
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% |
/ox_launch_nox { |
/ox_launch_nox { |
/@@@.ox_launch_nox 1 def |
Xm_noX /ox_launch_nox.save set |
|
oxNoX |
ox_launch_aux |
ox_launch_aux |
|
/Xm_noX ox_launch_nox.save def |
} def |
} def |
/ox_launch { |
/ox_launch { |
/@@@.ox_launch_nox 0 def |
|
ox_launch_aux |
ox_launch_aux |
} def |
} def |
|
|
Line 360 ox.verbose { oxhelp } { } ifelse |
|
Line 362 ox.verbose { oxhelp } { } ifelse |
|
/arg1 set |
/arg1 set |
[/in-launch_nox /pass /peer /data /control /name /machine |
[/in-launch_nox /pass /peer /data /control /name /machine |
/your-peer /comm /remoteOpenXMbin /remoteServer /myhost |
/your-peer /comm /remoteOpenXMbin /remoteServer /myhost |
/argNumber /aaa |
/argNumber /aaa /myssh |
] pushVariables |
] pushVariables |
[ |
[ |
/aaa arg1 def |
/aaa arg1 def |
Line 370 ox.verbose { oxhelp } { } ifelse |
|
Line 372 ox.verbose { oxhelp } { } ifelse |
|
aaa 1 get ox_launch_localhost /your-peer set |
aaa 1 get ox_launch_localhost /your-peer set |
/LLL.end goto |
/LLL.end goto |
} { |
} { |
/remoteOpenXMbin aaa 1 get def |
/remoteServer aaa 1 get def |
/remoteServer aaa 2 get def |
/name aaa 2 get def |
/name aaa 3 get def |
|
/myhost aaa 4 get def |
|
} ifelse |
} ifelse |
|
|
/pass [(oxGenPass)] extension def |
/myssh [(which) (ssh)] oxshell def |
|
myssh tag 0 eq { |
|
(ssh is not found.) error |
|
} { } ifelse |
|
|
|
[(gethostname)] extension /myhost set |
|
|
|
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort) myhost] extension def |
/peer [(oxGetPort) myhost] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
/control peer 3 get toString def |
/control peer 3 get toString def |
peer message |
peer message |
[(ssh -f ) machine ( -l ) name ( ") |
peer 0 get -1 eq { |
|
(Error in oxGetPort) error |
@@@.ox_launch_nox { |
} { } ifelse |
} { |
[myssh ( -X -f ) machine ( -l ) name ( ) |
remoteOpenXMbin(/oxlog ) |
[ |
( /usr/X11R6/bin/xterm -icon -e ) |
(ox100start ) % it must be on a path of the remote host |
} ifelse |
@@@.quiet { ( -quiet ) } { } ifelse |
|
Xm_noX { ( -nox ) } { } ifelse |
( ) remoteOpenXMbin (/ox ) |
( -oxserver ) remoteServer ( -e ) |
( -reverse -ox ) remoteServer |
( -reverse ) |
( -host ) myhost |
( -host ) myhost |
( -data ) data ( -control ) control ( -pass ) pass |
( -data ) data ( -control ) control pass [1 2] get |
oxpath.null |
] cat |
( ") |
|
] cat /comm set |
] cat /comm set |
(Executing the command : ) messagen comm message message |
(Executing the command : ) messagen comm message |
comm system |
comm execve 0 lt { |
(sleep 5) system-csh |
(Fork exec failed) error |
[(oxCreateClient2) peer 1 pass] extension /your-peer set |
} { } ifelse |
|
% ipmask must be 1 to accept from a global address. |
|
[(oxCreateClient2) peer 1 , pass 0 get] extension /your-peer set |
/LLL.end |
/LLL.end |
/arg1 your-peer def |
/arg1 your-peer def |
] pop |
] pop |
Line 408 ox.verbose { oxhelp } { } ifelse |
|
Line 416 ox.verbose { oxhelp } { } ifelse |
|
} def |
} def |
|
|
[(ox_launch) |
[(ox_launch) |
[( [remote remote-OpenXM-bin remote-ox-server remote-login-name myhostname] ) |
[( [remote-machine remote-ox-server-name remote-login-name] ) |
( ox_launch client ) |
( ox_launch client ) |
$or $ |
$or $ |
$ [(localhost) ox-server-name] ox_launch client$ |
$ [(localhost) ox-server-name] ox_launch client$ |
|
(This command launches ox server via ssh.) |
|
(My hostname is set by the function gethostname.) |
(Example 1: ) |
(Example 1: ) |
$ [(tau.math.kobe-u.ac.jp) (/home/taka/OpenXM/bin) $ |
$ [(orange2-clone) $ |
$ (/home/taka/OpenXM/src/ox_math/ox_math) (taka) (dc4.math.kobe-u.ac.jp) $ |
$ (bin/ox_sm1) (taka)$ |
$ ] ox_launch /@@@.oxmath set $ |
$ ] ox_launch /@@@.oxsm1 set $ |
]] putUsages |
]] putUsages |
|
|
[(ox_launch_nox) |
[(ox_launch_nox) |
[( [remote remote-OpenXM-bin remote-ox-server remote-login-name myhostname] ) |
[( [remote-machine remote-ox-server-name remote-login-name] ) |
( ox_launch_nox client ) |
( ox_launch_nox client ) |
(Example 1: ) |
(Example 1: ) |
$ [(tau.math.kobe-u.ac.jp) (/home/taka/OpenXM/bin) $ |
$ [(tau.math.kobe-u.ac.jp) $ |
$ (/home/taka/OpenXM/src/ox_math/ox_math) (taka) (dc4.math.kobe-u.ac.jp) $ |
$ (bin/ox_math) (taka) $ |
$ ] ox_launch_nox /@@@.oxmath set $ |
$ ] ox_launch_nox /@@@.oxmath set $ |
]] putUsages |
]] putUsages |
|
|
Line 433 ox.verbose { oxhelp } { } ifelse |
|
Line 443 ox.verbose { oxhelp } { } ifelse |
|
/my-peer] pushVariables |
/my-peer] pushVariables |
[ |
[ |
/oxserver arg1 def |
/oxserver arg1 def |
/pass [(oxGenPass)] extension def |
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort) (localhost)] extension def |
/peer [(oxGetPort) (localhost)] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
/control peer 3 get toString def |
/control peer 3 get toString def |
peer message |
peer message |
[oxpath.oxlog.xterm oxpath.ox ( -reverse -ox ) oxserver |
[ |
( -data ) data ( -control ) control ( -pass ) pass |
oxstart100 |
oxpath.null |
@@@.quiet { ( -quiet ) } { } ifelse |
( &)] cat system-csh |
Xm_noX { ( -nox ) } { } ifelse |
[(oxCreateClient2) peer 0 pass] extension /my-peer set |
( -oxserver ) oxserver ( -e ) |
|
( -reverse ) |
|
( -data ) data ( -control ) control pass [1 2] get |
|
] cat execve |
|
[(oxCreateClient2) peer 0 pass 0 get] extension /my-peer set |
%% 0 means connect from only localhost. |
%% 0 means connect from only localhost. |
/arg1 my-peer def |
/arg1 my-peer def |
] pop |
] pop |
Line 502 ox.verbose { oxhelp } { } ifelse |
|
Line 516 ox.verbose { oxhelp } { } ifelse |
|
/sm1StartControl101 { |
/sm1StartControl101 { |
[/in-sm1connectr /pass /peer /data /control ] pushVariables |
[/in-sm1connectr /pass /peer /data /control ] pushVariables |
[ |
[ |
/pass [(oxGenPass)] extension def |
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort1) (localhost)] extension def |
/peer [(oxGetPort1) (localhost)] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
peer message |
peer message |
Line 662 ox.verbose { oxhelp } { } ifelse |
|
Line 676 ox.verbose { oxhelp } { } ifelse |
|
[(getServerEnv) (bin/ox_sm1)] extension tag 0 eq { |
[(getServerEnv) (bin/ox_sm1)] extension tag 0 eq { |
(Server bin/ox_sm1 is not found.) error |
(Server bin/ox_sm1 is not found.) error |
}{ } ifelse |
}{ } ifelse |
/pass [(oxGenPass)] extension def |
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort) (localhost)] extension def |
/peer [(oxGetPort) (localhost)] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
/control peer 3 get toString def |
/control peer 3 get toString def |
Line 671 ox.verbose { oxhelp } { } ifelse |
|
Line 685 ox.verbose { oxhelp } { } ifelse |
|
oxstart100 |
oxstart100 |
@@@.quiet { ( -quiet ) } { } ifelse |
@@@.quiet { ( -quiet ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
|
Xm_engineLogToStdout { ( -nox -engineLogToStdout ) } { } ifelse %bug.onlyForsm1 |
( -oxserver bin/ox_sm1 -e ) ( -reverse ) |
( -oxserver bin/ox_sm1 -e ) ( -reverse ) |
( -data ) data ( -control ) control ( -pass ) pass |
( -data ) data ( -control ) control pass [1 2] get |
( )] cat execve |
( )] cat execve |
[(oxCreateClient2) peer 0 pass] extension /oxsm1.ccc set |
[(oxCreateClient2) peer 0 pass 0 get] extension /oxsm1.ccc set |
%% 0 means connect from only localhost. |
%% 0 means connect from only localhost. |
(The server is binded to the variable oxsm1.ccc) message-quiet |
(The server is binded to the variable oxsm1.ccc) message-quiet |
/ox.ccc oxsm1.ccc def |
/ox.ccc oxsm1.ccc def |
Line 703 ox.verbose { oxhelp } { } ifelse |
|
Line 718 ox.verbose { oxhelp } { } ifelse |
|
/machine arg1 0 get def |
/machine arg1 0 get def |
/name arg1 1 get def |
/name arg1 1 get def |
|
|
/pass [(oxGenPass)] extension def |
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort) myhostname-ssh] extension def |
/peer [(oxGetPort) myhostname-ssh] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
/control peer 3 get toString def |
/control peer 3 get toString def |
Line 711 ox.verbose { oxhelp } { } ifelse |
|
Line 726 ox.verbose { oxhelp } { } ifelse |
|
[(ssh -f ) machine ( -l ) name ( ") |
[(ssh -f ) machine ( -l ) name ( ") |
oxpath.oxlog.xterm-ssh oxpath.ox-ssh ( -reverse -ox ) oxpath.oxsm1-ssh |
oxpath.oxlog.xterm-ssh oxpath.ox-ssh ( -reverse -ox ) oxpath.oxsm1-ssh |
( -host ) myhostname-ssh |
( -host ) myhostname-ssh |
( -data ) data ( -control ) control ( -pass ) pass |
( -data ) data ( -control ) control pass [1 2] get |
oxpath.null |
oxpath.null |
( ") |
( ") |
] cat /comm set |
] cat /comm set |
(Executing the command : ) messagen comm message message |
(Executing the command : ) messagen comm message message |
comm system |
comm system |
(sleep 5) system-csh |
(sleep 5) system-csh |
[(oxCreateClient2) peer 1 pass] extension /your-peer set |
[(oxCreateClient2) peer 1 pass 0 get] extension /your-peer set |
/arg1 your-peer def |
/arg1 your-peer def |
] pop |
] pop |
popVariables |
popVariables |
Line 757 ox.verbose { oxhelp } { } ifelse |
|
Line 772 ox.verbose { oxhelp } { } ifelse |
|
[(getServerEnv) (bin/ox_ntl)] extension tag 0 eq { |
[(getServerEnv) (bin/ox_ntl)] extension tag 0 eq { |
(Server bin/ox_ntl is not found.) error |
(Server bin/ox_ntl is not found.) error |
}{ } ifelse |
}{ } ifelse |
/pass [(oxGenPass)] extension def |
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort) (localhost)] extension def |
/peer [(oxGetPort) (localhost)] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
/control peer 3 get toString def |
/control peer 3 get toString def |
Line 766 ox.verbose { oxhelp } { } ifelse |
|
Line 781 ox.verbose { oxhelp } { } ifelse |
|
oxstart100 |
oxstart100 |
Xm_noX { ( -nox ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
( -oxserver bin/ox_ntl -e ) ( -reverse ) |
( -oxserver bin/ox_ntl -e ) ( -reverse ) |
( -data ) data ( -control ) control ( -pass ) pass |
( -data ) data ( -control ) control pass [1 2] get |
( )] cat execve |
( )] cat execve |
[(oxCreateClient2) peer 0 pass] extension /oxntl.ccc set |
[(oxCreateClient2) peer 0 pass 0 get] extension /oxntl.ccc set |
%% 0 means connect from only localhost. |
%% 0 means connect from only localhost. |
(The server is binded to the variable oxntl.ccc) message-quiet |
(The server is binded to the variable oxntl.ccc) message-quiet |
% oxntl.ccc.init |
% oxntl.ccc.init |
Line 1706 oxasir.verbose { |
|
Line 1721 oxasir.verbose { |
|
(Server bin/ox_sm1 is not found.) error |
(Server bin/ox_sm1 is not found.) error |
}{ } ifelse |
}{ } ifelse |
|
|
/pass [(oxGenPass)] extension def |
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort) (localhost)] extension def |
/peer [(oxGetPort) (localhost)] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
/control peer 3 get toString def |
/control peer 3 get toString def |
Line 1715 oxasir.verbose { |
|
Line 1730 oxasir.verbose { |
|
oxstart100 |
oxstart100 |
@@@.quiet { ( -quiet ) } { } ifelse |
@@@.quiet { ( -quiet ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
|
Xm_engineLogToStdout { ( -nox -engineLogToStdout ) } { } ifelse %bug.onlyForasir |
( -oxserver bin/ox_asir -e ) ( -reverse ) |
( -oxserver bin/ox_asir -e ) ( -reverse ) |
( -data ) data ( -control ) control ( -pass ) pass |
( -data ) data ( -control ) control pass [1 2] get |
( )] cat execve |
( )] cat execve |
[(oxCreateClient2) peer 0 pass] extension /oxasir.ccc set |
[(oxCreateClient2) peer 0 pass 0 get] extension /oxasir.ccc set |
%% 0 means connect from only localhost. |
%% 0 means connect from only localhost. |
oxasir.ccc asir.init |
oxasir.ccc asir.init |
/arg1 oxasir.ccc def |
/arg1 oxasir.ccc def |
Line 1753 oxasir.verbose { |
|
Line 1769 oxasir.verbose { |
|
(Server bin/ox_sm1 is not found.) error |
(Server bin/ox_sm1 is not found.) error |
}{ } ifelse |
}{ } ifelse |
|
|
/pass [(oxGenPass)] extension def |
/pass ox_encrypt_104_genPass def |
/peer [(oxGetPort) (localhost)] extension def |
/peer [(oxGetPort) (localhost)] extension def |
/data peer 1 get toString def |
/data peer 1 get toString def |
/control peer 3 get toString def |
/control peer 3 get toString def |
Line 1762 oxasir.verbose { |
|
Line 1778 oxasir.verbose { |
|
oxstart100 |
oxstart100 |
Xm_noX { ( -nox ) } { } ifelse |
Xm_noX { ( -nox ) } { } ifelse |
( -oxserver bin/ox_k0 -e ) ( -reverse ) |
( -oxserver bin/ox_k0 -e ) ( -reverse ) |
( -data ) data ( -control ) control ( -pass ) pass |
( -data ) data ( -control ) control pass [1 2] get |
( )] cat execve |
( )] cat execve |
[(oxCreateClient2) peer 0 pass] extension /oxk0.ccc set |
[(oxCreateClient2) peer 0 pass 0 get] extension /oxk0.ccc set |
%% 0 means connect from only localhost. |
%% 0 means connect from only localhost. |
(The server is binded to the variable oxk0.ccc) message-quiet |
(The server is binded to the variable oxk0.ccc) message-quiet |
ox.k0.init |
ox.k0.init |
Line 1777 oxasir.verbose { |
|
Line 1793 oxasir.verbose { |
|
|
|
/ox_server_mode { |
/ox_server_mode { |
/:: { } def % do nothing |
/:: { } def % do nothing |
|
} def |
|
|
|
%% Encryption methods |
|
/ox_encrypt_104.NONE 0 def |
|
/ox_encrypt_104.FILE 1 def |
|
/ox_encrypt_104.RSA 2 def |
|
/@@@.ox_encrypt_104.method ox_encrypt_104.NONE def |
|
/ox_encrypt_104.1 { |
|
/arg1 set |
|
[/sss /rrr] pushVariables |
|
[ |
|
/sss arg1 def |
|
sss toString /sss set |
|
{ |
|
@@@.ox_encrypt_104.method ox_encrypt_104.NONE eq { |
|
/rrr [sss] def |
|
exit |
|
} { } ifelse |
|
(The encryption method has not yet been implemented.) error |
|
} loop |
|
/arg1 rrr def |
|
] pop |
|
popVariables |
|
arg1 |
|
} def |
|
|
|
%< |
|
% Usages: ox_encrypt_104_genPass |
|
% [[ c-pass d-pass ] [c-pass-encrypted d-pass-encrypted ox-command-str ] ...] |
|
%> |
|
/ox_encrypt_104_genPass { |
|
[/sss /p1 /p2 /e1 /e2 /rrr] pushVariables |
|
[ |
|
/r1 [(oxGenPass)] extension def |
|
/r2 [(oxGenPass)] extension def |
|
r1 ox_encrypt_104.1 /e1 set |
|
r2 ox_encrypt_104.1 /e2 set |
|
{ |
|
@@@.ox_encrypt_104.method ox_encrypt_104.NONE eq { |
|
[( -passControl ) e1 0 get ( -passData ) e2 0 get ( )] cat /sss set |
|
[[r1 r2] [e1 0 get , e2 0 get , sss]] /rrr set |
|
exit |
|
} { } ifelse |
|
(The encryption method has not been implemented.) error |
|
} loop |
|
rrr /arg1 set |
|
] pop |
|
popVariables |
|
arg1 |
} def |
} def |
|
|