/usr/share/tkrat2.2/client.tcl is in tkrat 1:2.2cvs20100105-true-dfsg-6ubuntu1.
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 | #
# TkRat software and its included text is Copyright 1996-2004 by
# Martin Forssén
#
# The full text of the legal notices is contained in the file called
# COPYRIGHT, included with this distribution.
# TkRatClientUsage --
#
# Shows the usage message
#
# Arguments:
proc TkRatClientUsage {} {
global argv0
puts "Usage: $argv0 \[-confdir dir\] \[-appname name\] \[-open ?name?\] \\"
puts "\t\[-opennew ?name?\] \[-compose ?args?\] \[-netsync ?set?\] \\"
puts "\t\[mailto-link\] \[-blank\]"
exit 0
}
# TkRatClientStart --
#
# Parses command line arguments and sees if there is an existing tkrat
# invocation to use
#
# Arguments:
proc TkRatClientStart {} {
global argv option
catch {wm withdraw .}
set started 0
# Parse arguments
set appname tkrat
for {set i 0} {$i < [llength $argv]} {incr i} {
set in [expr {$i+1}]
switch -regexp -- [lindex $argv $i] {
-confdir {
if {$in == [llength $argv]} {
TkRatClientUsage
}
set option(ratatosk_dir) [lindex $argv $in]
incr i
}
-appname {
if {$in == [llength $argv]} {
TkRatClientUsage
}
set appname [lindex $argv $in]
incr i
}
-(open|opennew|compose|netsync|blank) {
regexp -- -(open|opennew|compose|netsync|blank) \
[lindex $argv $i] unused c
if {$in == [llength $argv]
|| [regexp ^- [lindex $argv $in]]} {
lappend cmds $c
} else {
lappend cmds [list $c [lindex $argv $in]]
incr i
}
}
mailto:.* {
lappend cmds [list mailto [lindex $argv $i]]
}
default {
TkRatClientUsage
}
}
}
if {![info exists cmds]} {
set cmds open
}
# Check if we have a tkrat running, start it if not
set appname $appname-[info host]
if {[catch {send -- $appname RatPing}]} {
set started 1
tk appname $appname
TkRatStart
RatExec $cmds
} else {
# Send commands
if {[catch {send -- $appname [list RatExec $cmds]} result]} {
puts "Failed to send commands"
global errorInfo
puts $errorInfo
exit
puts $result
exit
}
}
if {!$started} {
destroy .
}
}
|