2

I'm using Ubuntu 18.04 desktop at the office.

In order to work with server, we're required to connect to a remote Windows 8 machine, and then open SSH connect to an Ubuntu 16.04 server from here.

So, Local (ubuntu18.04) ---> Remote (windows8server) ---> Server (ubuntu16.04)

On the Remote Windows Machine, I use Git Bash (MINGW64) this command to open connection to the Server:

export DISPLAY=localhost:0
ssh -Y -C -i "C:/path/to/key" user@serverIP

I was able to run most apps like Nautilus, Geany, VSCode, Git... in GUI Mode.


However, there's a huge issue: Most keys on the keyboards doesn't work, except Ctrl + S, Ctrl + V, Ctrl + Z ... (most hotkeys) and keys 1,2,3..9 on the numeric keypad.

Also, I notice a strange behavior: Sometimes dozens of the same characters "got typed" at the same time, like: "zzzzzzzzzz" "aaaaaaaaaaaa"


What I've tried:

  • Verified that the keyboard layout is correct on the Server
user@serverIP~$: localectl status
System Locale: LANG=en_US.UTF-8
LANGUAGE=en_US:en
VC Keymap: us
X11 Layout: us
X11 Model: pc105+inet
X11 Options: terminate:ctrl_alt_bksp

I've added this to settings.json but it didn't work:

"keyboard.dispatch": "keyCode"
-1

I ended up with an alternative solution - using code-server: https://github.com/codercom/code-server

First off, download the binary and paste it into /usr/local/bin on your server, then run it from anywhere.

nohup code-server --password=123456 &

On my remote machine, I tunneled server's localhost via SSH by enter the following command in git-bash:

ssh -i "/path/to/yourkey" -L 8080:127.0.0.1:8443 user@ipaddress -N

(make sure that you keep this windows of git-bash opened)

Finally, I opened Chrome and opened http://localhost:8080 to start using code-server!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.