         input = @state.input.trim()
         if not input
             return
+        error = BAD_COMMANDS[input.split(' ')[0]]
+        if error
+            @setState
+                state : 'edit'
+                error : error
+            return
+
         input0 = input + '\necho $HOME "`pwd`"'
         @setState(state:'run')
 
         @_id = (@_id ? 0) + 1
         id = @_id
+        start_time = new Date()
         salvus_client.exec
             project_id : @props.project_id
             command    : input0
-            timeout    : 10
+            timeout    : EXEC_TIMEOUT
             max_output : 100000
             bash       : true
             path       : @props.current_path

    maxHeight : '450px'
    overflow  : 'auto'

exports.MiniTerminal = MiniTerminal = rclass
    displayName : 'MiniTerminal'


                    return
                if err
                    @setState(error:err, state:'edit')
                else if output.exit_code != 0 and new Date() - start_time >= .98*EXEC_TIMEOUT
                    # we get no other error except it takes a long time and the exit_code isn't 0.
                    @setState
                        state : 'edit'
                        error : "Miniterminal commands are limited to #{EXEC_TIMEOUT} seconds.\nFor longer or interactive commands,\nuse a full terminal."
                else
                    if output.stdout
                        # Find the current path
