   createShortcutsView: ->
     @createPane_ new IDE.ShortcutsView, { name: 'Shortcuts' }
 
-  createTerminal: (machine, path) ->
-    ideApp = KD.getSingleton('appManager').getFrontApp()
-
-    unless machine
-      {machines} = KD.getSingleton 'computeController'
-      machineId  = ideApp.mountedMachineUId
-
-      machine = m for m in machines when m.uid is machineId
-
-    unless path
-      if ideApp.workspaceData?.rootPath
-        path = ideApp.workspaceData.rootPath
-
-    terminalPane = new IDE.TerminalPane { machine, path }
+  createTerminal: (machine, path, session) ->
+
+    machine ?= @getCurrentMachine()
+    path    ?= @getCurrentWorkspacePath()
+
+    terminalPane = new IDE.TerminalPane { machine, path, session }
     @createPane_ terminalPane, { name: 'Terminal' }
 
     terminalPane.once 'WebtermCreated', =>

    contextMenu = new KDContextMenu options, @getPlusMenuItems()

    contextMenu.once 'ContextMenuItemReceivedClick', -> contextMenu.destroy()

        delete @menu

  createPlusContextMenu: ->

    offset      = @holderView.plusHandle.$().offset()
    offsetLeft  = offset.left - 133
    margin      = if offsetLeft >= -1 then -20 else 12
