   set app space
   send -s "6"
   exp_continue
+} "1-7,QR" {
+  set app space
+  send -s "7"
+  exp_continue
 } "*$ " {
   send -s "sudo su -\r"
   exp_continue

      if { $app == "space" } {
        expect timeout {
          set timeout 60
        } "1-6,QR" {
          send "q"
          sleep 1
          return

  }
} else {
  set ourip 127.0.0.1
  send "\r"
}

if { $app == "nsm" } {
