 
   return no if not machine or not workspace
 
-  kd.singletons.mainView.activitySidebar.selectWorkspace data
+  if isKoding()
+    kd.getSingleton('mainView').activitySidebar.selectWorkspace data
+  else
+    actions.setSelectedWorkspaceId workspace._id
+
   storage = kd.singletons.localStorageController.storage 'IDE'
 
   workspaceData    =

  else if machineLabel and workspaceSlug
    dataProvider.fetchMachineByLabel machineLabel, (machine, workspace) =>
      if machine and workspace
        actions.setSelectedWorkspaceId worksace._id
        router.handleRoute "/IDE/#{machineLabel}/#{workspaceSlug}"
      else if machine
        routeToMachineWorkspace machine


        dataProvider.ensureDefaultWorkspace ->

          dataProvider.fetchWorkspaceByMachineUId data, (workspace) =>
            if workspace
              loadIDE { machine, workspace, username }
            else
              routeToMachineWorkspace machine

            dataProvider.fetchWorkspaceByMachineUId data, (workspace) =>
              if workspace then loadIDE { machine, workspace, username }
