tell application "iTerm"

activate

tell current session of current window

tell application "System Events" to keystroke "f" using {command down, control down}

delay 1

write text "login_lab_tmux.sh s4"

end tell

end tell

#!/usr/bin/expect


set host "dhcp185-64.ece.ucsb.edu"

set user "metehan"

set tmux_name [lindex $argv 0]


puts "Connecting..."


# spawn mosh $user@$host

spawn ssh -Y -L 1234:127.0.0.1:8888 -L 16006:127.0.0.1:6006 $user@$host


#expect "assword:"

#send "$pass\r"


expect "metehan"

#expect -re {metehan.*$}

#send "echo \$DISPLAY\r"


#expect -re {localhost:[0-9][0-9]\.0}


#set dis $expect_out(0,string)

send "tmux a -t $tmux_name\r"


#send "export DISPLAY=$dis\r"


interact