Terminus: Terminal keeps starting with `sh` instead of `bash`

Created on 24 Oct 2017  路  5Comments  路  Source: Eugeny/terminus

Hi,

Every time I open a new terminal, it uses the sh instead of bash (which is what I have selected as shell. I am using Ubuntu 17.04

The following error is shown in the developer tools, though it does not seem to be directly related:

errors.ts:42 ERROR Error: Uncaught (in promise): TypeError: Cannot read property 'recoveryId' of null
TypeError: Cannot read property 'recoveryId' of null
    at TerminalTabComponent.getRecoveryToken (/opt/Terminus/resources/builtin-plugins/terminus-terminal/dist/index.js:271:44)
    at window.localStorage.tabsRecovery.JSON.stringify.tabs.map (/opt/Terminus/resources/builtin-plugins/terminus-core/dist/index.js:2975:31)
    at Array.map (native)
    at TabRecoveryService.saveTabs (/opt/Terminus/resources/builtin-plugins/terminus-core/dist/index.js:2975:14)
    at SafeSubscriber.TabRecoveryService.app.tabsChanged$.subscribe [as _next] (/opt/Terminus/resources/builtin-plugins/terminus-core/dist/index.js:2970:18)
    at SafeSubscriber.__tryOrUnsub (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:236:16)
    at SafeSubscriber.next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:185:22)
    at Subscriber._next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:125:26)
    at Subscriber.next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:89:18)
    at Subject.next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subject.js:55:25)
    at TerminalTabComponent.getRecoveryToken (/opt/Terminus/resources/builtin-plugins/terminus-terminal/dist/index.js:271:44)
    at window.localStorage.tabsRecovery.JSON.stringify.tabs.map (/opt/Terminus/resources/builtin-plugins/terminus-core/dist/index.js:2975:31)
    at Array.map (native)
    at TabRecoveryService.saveTabs (/opt/Terminus/resources/builtin-plugins/terminus-core/dist/index.js:2975:14)
    at SafeSubscriber.TabRecoveryService.app.tabsChanged$.subscribe [as _next] (/opt/Terminus/resources/builtin-plugins/terminus-core/dist/index.js:2970:18)
    at SafeSubscriber.__tryOrUnsub (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:236:16)
    at SafeSubscriber.next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:185:22)
    at Subscriber._next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:125:26)
    at Subscriber.next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subscriber.js:89:18)
    at Subject.next (/opt/Terminus/resources/app.asar/node_modules/rxjs/Subject.js:55:25)
    at resolvePromise (/opt/Terminus/resources/app.asar/node_modules/zone.js/dist/zone.js:770:31)
    at /opt/Terminus/resources/app.asar/node_modules/zone.js/dist/zone.js:696:17
    at fulfilled (/opt/Terminus/resources/builtin-plugins/terminus-terminal/dist/index.js:997:86)
    at ZoneDelegate.invoke (/opt/Terminus/resources/app.asar/node_modules/zone.js/dist/zone.js:391:26)
    at Object.onInvoke (/opt/Terminus/resources/app.asar/node_modules/@angular/core/bundles/core.umd.js:3922:33)
    at ZoneDelegate.invoke (/opt/Terminus/resources/app.asar/node_modules/zone.js/dist/zone.js:390:32)
    at Zone.run (/opt/Terminus/resources/app.asar/node_modules/zone.js/dist/zone.js:141:43)
    at /opt/Terminus/resources/app.asar/node_modules/zone.js/dist/zone.js:818:57
    at ZoneDelegate.invokeTask (/opt/Terminus/resources/app.asar/node_modules/zone.js/dist/zone.js:424:31)
    at Object.onInvokeTask (/opt/Terminus/resources/app.asar/node_modules/@angular/core/bundles/core.umd.js:3913:33)
defaultErrorLogger @ errors.ts:42

Linux Bug

Most helpful comment

Same on ubuntu 16.04
The error wasn't there in alpha 34

All 5 comments

Same on ubuntu 16.04
The error wasn't there in alpha 34

I can confirm this as well. Seems to only happen when using Tmux for session persistence. Works with GNU Screen.

I can confirm that this is not fixed in alpha 36. In order to get around this, you need to either turn off session persistence or use GNU Screen.

@Eugeny, if you could provide me with any pointers for where to look, I'd happily try to find a solution

Hi, I could reproduce the issue in Ubuntu 16.04.

Another workaround for it is to go to Settings > Terminal > Shell > Custom and then write /bin/bash in the "Custom shell" textbox.

I have been browsing through the code, the error that @Vinno97 mentioned seems related though, but not the main cause. In the end that error caused because sessionOptions is null in this line: https://github.com/Eugeny/terminus/blob/0420b2dbb91f9729dec5250d148a83de12b5e14f/terminus-terminal/src/components/terminalTab.component.ts#L114

However, if I change the Custom shell to /bin/bash --login (which would be the same as if you select /bin/bash in the dropdown), then the error is gone and still the shell doesn't work.

I hope this helps :)

Was this page helpful?
0 / 5 - 0 ratings