[GH-ISSUE #1052] shell color error #611

Closed
opened 2026-02-27 00:00:14 +03:00 by kerem · 17 comments
Owner

Originally created by @blue-bird1 on GitHub (Dec 29, 2018).
Original GitHub issue: https://github.com/electerm/electerm/issues/1052

Electerm version:

26.2

Operating system(linux, macos, or windows7/8/10?):

windows10

Expected Behavior

shell have color
Screenshot_1.png

Current Behavior

error color show
Screenshot_2.png

Possible Solution

Steps to Reproduce

1.use new ui..
2.use have color shell. like fish
3.
4.

Context (Environment)

Detailed Description

Suggestions?

Originally created by @blue-bird1 on GitHub (Dec 29, 2018). Original GitHub issue: https://github.com/electerm/electerm/issues/1052 <!--- Provide some basic info --> ## Electerm version: 26.2 ## Operating system(linux, macos, or windows7/8/10?): windows10 ## Expected Behavior <!--- Tell me what should happen --> shell have color ![Screenshot_1.png](https://i.loli.net/2018/12/29/5c2788d847846.png) ## Current Behavior <!--- Tell me what happens instead of the expected behavior --> error color show ![Screenshot_2.png](https://i.loli.net/2018/12/29/5c278903c75d7.png) ## Possible Solution <!--- Not obligatory, but suggest a fix/reason for the bug, --> ## Steps to Reproduce <!--- Provide a link to a live example, or an unambiguous set of steps to --> <!--- reproduce this bug. Include code to reproduce, if relevant --> 1.use new ui.. 2.use have color shell. like fish 3. 4. ## Context (Environment) <!--- How has this issue affected you? What are you trying to accomplish? --> <!--- Providing context helps us come up with a solution that is most useful in the real world --> ## Detailed Description <!--- Provide a detailed description of the change or addition you are proposing --> ## Suggestions? <!--- Not a bug report, just some thoughts or suggestions? It is totally OK and welcome too -->
kerem closed this issue 2026-02-27 00:00:14 +03:00
Author
Owner

@zxdong262 commented on GitHub (Dec 30, 2018):

Hi @blue-bird1 Can you share more detail about how to reproduce this?

<!-- gh-comment-id:450539281 --> @zxdong262 commented on GitHub (Dec 30, 2018): Hi @blue-bird1 Can you share more detail about how to reproduce this?
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

Investigating. But I can't find any error message. Didn't find the full recurrence condition, but the fish is working fine in the new docker debian .. My vim is also not available in this version...
Screenshot_3.png
I am trying a different version to find out which version this error occurred
25.66 error occurred

<!-- gh-comment-id:450546232 --> @blue-bird1 commented on GitHub (Dec 30, 2018): Investigating. But I can't find any error message. Didn't find the full recurrence condition, but the fish is working fine in the new docker debian .. My vim is also not available in this version... ![Screenshot_3.png](https://i.loli.net/2018/12/30/5c28818fc7951.png) I am trying a different version to find out which version this error occurred 25.66 error occurred
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

github.com/electerm/electerm@68c2168d2e start error occurred

test platform : linux

<!-- gh-comment-id:450554970 --> @blue-bird1 commented on GitHub (Dec 30, 2018): https://github.com/electerm/electerm/commit/68c2168d2e7593328a2a6ea82f8defdc4357b759 start error occurred test platform : linux
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

/app/lib/terminal.js
@@ -62,6 +63,7 @@ class Terminal {
           'host',
           'port',
           'username',
+            // 'x11',
           'password',
           'privateKey',
           'passphrase'

             conn.shell(
-              _.pick(initOptions, ['rows', 'cols', 'term']),
+              _.pick(initOptions, [
+                  'rows', 'cols', 'term',// 'x11'
+              ]),

will work

<!-- gh-comment-id:450555388 --> @blue-bird1 commented on GitHub (Dec 30, 2018): ``` /app/lib/terminal.js @@ -62,6 +63,7 @@ class Terminal { 'host', 'port', 'username', + // 'x11', 'password', 'privateKey', 'passphrase' conn.shell( - _.pick(initOptions, ['rows', 'cols', 'term']), + _.pick(initOptions, [ + 'rows', 'cols', 'term',// 'x11' + ]), ``` will work
Author
Owner

@zxdong262 commented on GitHub (Dec 30, 2018):

You can turn x11 off from bookmark edit->x11, can you try this?

<!-- gh-comment-id:450557869 --> @zxdong262 commented on GitHub (Dec 30, 2018): You can turn x11 off from bookmark edit->x11, can you try this?
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

You can turn x11 off from bookmark edit->x11, can you try this?

in 26.2 try open and close x11, but no effect. What happened in this commit?

<!-- gh-comment-id:450558423 --> @blue-bird1 commented on GitHub (Dec 30, 2018): > You can turn x11 off from bookmark edit->x11, can you try this? in 26.2 try open and close x11, but no effect. What happened in this commit?
Author
Owner

@zxdong262 commented on GitHub (Dec 30, 2018):

@blue-bird1 Tested x11 on/off, works fine for 26.2

/app/lib/terminal.js
@@ -62,6 +63,7 @@ class Terminal {
           'host',
           'port',
           'username',
+            // 'x11',
           'password',
           'privateKey',
           'passphrase'

             conn.shell(
-              _.pick(initOptions, ['rows', 'cols', 'term']),
+              _.pick(initOptions, [
+                  'rows', 'cols', 'term',// 'x11'
+              ]),

will work

This is old code, in 0.26.2, x11 disabled by default, but for old bookmarks, it might be opened, by previous electerm. Can you confirm x11 switch not working? like try run xeyes to check.

<!-- gh-comment-id:450564023 --> @zxdong262 commented on GitHub (Dec 30, 2018): @blue-bird1 Tested x11 on/off, works fine for 26.2 > ``` > /app/lib/terminal.js > @@ -62,6 +63,7 @@ class Terminal { > 'host', > 'port', > 'username', > + // 'x11', > 'password', > 'privateKey', > 'passphrase' > > conn.shell( > - _.pick(initOptions, ['rows', 'cols', 'term']), > + _.pick(initOptions, [ > + 'rows', 'cols', 'term',// 'x11' > + ]), > ``` > will work This is old code, in 0.26.2, x11 disabled by default, but for old bookmarks, it might be opened, by previous electerm. Can you confirm x11 switch not working? like try run `xeyes` to check.
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

I not have env debug electerm.. @zxdong262 typeof d.x11 == 'boolean'?. if is true. (ssh2 code)[github.com/electerm/ssh2@fdd1a18b70/lib/client.js (L793)]

 if (wndopts && (wndopts.x11 !== undefined || wndopts.env !== undefined)) {
    opts = wndopts;
    wndopts = undefined;
  }

undefined !== false

 if (wndopts !== false)
      todo.push(function() { reqPty(chan, wndopts, reqCb); });

will get undefined

if I change todo.push(function() { reqPty(chan, wndopts, reqCb); }); to todo.push(function() { reqPty(chan, opts, reqCb); }); , will fix bug

<!-- gh-comment-id:450564241 --> @blue-bird1 commented on GitHub (Dec 30, 2018): I not have env debug electerm.. @zxdong262 `typeof d.x11 == 'boolean'`?. if is true. (ssh2 code)[https://github.com/electerm/ssh2/blob/fdd1a18b70cc5c3f62aa9abf2fc048a87ca0a37b/lib/client.js#L793] ``` if (wndopts && (wndopts.x11 !== undefined || wndopts.env !== undefined)) { opts = wndopts; wndopts = undefined; } ``` `undefined !== false` ``` if (wndopts !== false) todo.push(function() { reqPty(chan, wndopts, reqCb); }); ``` will get `undefined ` if I change ` todo.push(function() { reqPty(chan, wndopts, reqCb); });` to ` todo.push(function() { reqPty(chan, opts, reqCb); });` , will fix bug
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

@blue-bird1 Tested x11 on/off, works fine for 26.2

/app/lib/terminal.js
@@ -62,6 +63,7 @@ class Terminal {
           'host',
           'port',
           'username',
+            // 'x11',
           'password',
           'privateKey',
           'passphrase'

             conn.shell(
-              _.pick(initOptions, ['rows', 'cols', 'term']),
+              _.pick(initOptions, [
+                  'rows', 'cols', 'term',// 'x11'
+              ]),

will work

This is old code, in 0.26.2, x11 disabled by default, but for old bookmarks, it might be opened, by previous electerm. Can you confirm x11 switch not working? like try run xeyes to check.

oh.. I will try , Is the new version the problem? ..

<!-- gh-comment-id:450564701 --> @blue-bird1 commented on GitHub (Dec 30, 2018): > @blue-bird1 Tested x11 on/off, works fine for 26.2 > > > ``` > > /app/lib/terminal.js > > @@ -62,6 +63,7 @@ class Terminal { > > 'host', > > 'port', > > 'username', > > + // 'x11', > > 'password', > > 'privateKey', > > 'passphrase' > > > > conn.shell( > > - _.pick(initOptions, ['rows', 'cols', 'term']), > > + _.pick(initOptions, [ > > + 'rows', 'cols', 'term',// 'x11' > > + ]), > > ``` > > will work > > This is old code, in 0.26.2, x11 disabled by default, but for old bookmarks, it might be opened, by previous electerm. Can you confirm x11 switch not working? like try run `xeyes` to check. oh.. I will try , Is the new version the problem? ..
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

I not have env debug electerm.. @zxdong262 typeof d.x11 == 'boolean'?. if is true. (ssh2 code)[github.com/electerm/ssh2@fdd1a18b70/lib/client.js (L793)]

 if (wndopts && (wndopts.x11 !== undefined || wndopts.env !== undefined)) {
    opts = wndopts;
    wndopts = undefined;
  }

undefined !== false

 if (wndopts !== false)
      todo.push(function() { reqPty(chan, wndopts, reqCb); });

will get undefined

if I change todo.push(function() { reqPty(chan, wndopts, reqCb); }); to todo.push(function() { reqPty(chan, opts, reqCb); }); , will fix bug

The new version should also be the problem. it will causing the term parameter to be lost

<!-- gh-comment-id:450565152 --> @blue-bird1 commented on GitHub (Dec 30, 2018): > I not have env debug electerm.. @zxdong262 `typeof d.x11 == 'boolean'`?. if is true. (ssh2 code)[https://github.com/electerm/ssh2/blob/fdd1a18b70cc5c3f62aa9abf2fc048a87ca0a37b/lib/client.js#L793] > > ``` > if (wndopts && (wndopts.x11 !== undefined || wndopts.env !== undefined)) { > opts = wndopts; > wndopts = undefined; > } > ``` > `undefined !== false` > > ``` > if (wndopts !== false) > todo.push(function() { reqPty(chan, wndopts, reqCb); }); > ``` > will get `undefined ` > > if I change ` todo.push(function() { reqPty(chan, wndopts, reqCb); });` to ` todo.push(function() { reqPty(chan, opts, reqCb); });` , will fix bug The new version should also be the problem. it will causing the term parameter to be lost
Author
Owner

@blue-bird1 commented on GitHub (Dec 30, 2018):

If your ssh2 library is only used by this client, just change this parameter like me or add extra x11 === true

<!-- gh-comment-id:450566235 --> @blue-bird1 commented on GitHub (Dec 30, 2018): If your ssh2 library is only used by this client, just change this parameter like me or add extra `x11 === true`
Author
Owner

@zxdong262 commented on GitHub (Dec 31, 2018):

@blue-bird1 Thank you! I will fix this.

<!-- gh-comment-id:450608381 --> @zxdong262 commented on GitHub (Dec 31, 2018): @blue-bird1 Thank you! I will fix this.
Author
Owner

@zxdong262 commented on GitHub (Dec 31, 2018):

@blue-bird1 Released new version, I think it would fix. Let me how it works.

<!-- gh-comment-id:450613140 --> @zxdong262 commented on GitHub (Dec 31, 2018): @blue-bird1 Released new version, I think it would fix. Let me how it works.
Author
Owner

@blue-bird1 commented on GitHub (Dec 31, 2018):

Didn't get fixed.

<!-- gh-comment-id:450613778 --> @blue-bird1 commented on GitHub (Dec 31, 2018): Didn't get fixed.
Author
Owner

@blue-bird1 commented on GitHub (Dec 31, 2018):

if (initOptions.x11 !== false) {
        x11 = {
          cookie: x11Cookie
        }
      }

is initOptions.x11 undefined?

<!-- gh-comment-id:450614280 --> @blue-bird1 commented on GitHub (Dec 31, 2018): ``` if (initOptions.x11 !== false) { x11 = { cookie: x11Cookie } } ``` is `initOptions.x11` `undefined`?
Author
Owner

@zxdong262 commented on GitHub (Dec 31, 2018):

By default initOptions.x11 is false, unless, switch to true in editting form.

<!-- gh-comment-id:450615558 --> @zxdong262 commented on GitHub (Dec 31, 2018): By default initOptions.x11 is false, unless, switch to true in editting form.
Author
Owner

@zxdong262 commented on GitHub (Dec 31, 2018):

Oh, should be === true

<!-- gh-comment-id:450615587 --> @zxdong262 commented on GitHub (Dec 31, 2018): Oh, should be === true
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/electerm#611
No description provided.