Skip to content

Can't use arrow keys when lauching code-server at rc.local script #924

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xiangnanscu opened this issue Aug 21, 2019 · 10 comments
Closed

Can't use arrow keys when lauching code-server at rc.local script #924

xiangnanscu opened this issue Aug 21, 2019 · 10 comments
Labels
bug Something isn't working

Comments

@xiangnanscu
Copy link

  • code-server version: 2.preview.7-vsc1.37.0
  • OS Version: ubuntu server 18.04 lts

Description

Steps to Reproduce

  1. in /etc/rc.local write as:
#!/bin/bash 
code-server ~
exit 0
  1. reboot the server, open browser and press arrow up key in terminal, you will get:
# ^[[A

And you can't use git commit even if you already set the git user :

# git add . && git commit -am "x"
*** Please tell me who you are.

If you manually start code-server at a regular shell, these problem don't exist.
I doubt some environment varibles is not loaded when using rc.local. So what is the right way to auto start code-server?

@xiangnanscu xiangnanscu added the bug Something isn't working label Aug 21, 2019
@BeckettOBrien
Copy link

If you want to create a service to auto-start code-server, look here:
#906

@xiangnanscu
Copy link
Author

@BeckettOBrien Git problem solved but still can't use arrow keys in terminals

@xiangnanscu
Copy link
Author

Client environment is chrome 75 and mac os high sierra

@BeckettOBrien
Copy link

@xiangnanscu Do you still get this issue when you create a new terminal inside of vscode? I remember having trouble with the first terminal window opened, and I just had to create a new one.

@xiangnanscu
Copy link
Author

@BeckettOBrien Still exits. But I find that it uses sh if autostart. bash if manually starting. Also, if you using bash in the sh, the problem disappears.
So the problem seems to be the use of sh(why not bash?)

@BeckettOBrien
Copy link

@xiangnanscu For now, I recommend trying to set the default shell to bash inside of vscode (if that doesn't work properly then just switch to bash every time you start it) And hopefully someone on the team will get to this and fix it.

@xiangnanscu
Copy link
Author

@BeckettOBrien It works. Thank you.

@BeckettOBrien
Copy link

@xiangnanscu Great! But leave the thread open so that I team member can find a more permanent fix.

@coadler coadler added the v2 label Aug 30, 2019
@sr229
Copy link
Contributor

sr229 commented Sep 18, 2019

I'll be closing this issue and pin it for everyone so they have a reference for the workaround.

@sr229 sr229 closed this as completed Sep 18, 2019
@sr229 sr229 pinned this issue Sep 18, 2019
@code-asher
Copy link
Member

Also see #918 (comment) for why this happens.

@code-asher code-asher unpinned this issue Nov 5, 2019
@code-asher code-asher pinned this issue Nov 5, 2019
@sr229 sr229 unpinned this issue Jan 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants