Workarounds for Ubuntu 16.04 + Chromebook VNC


#1

Hi,
I ran into a couple issues and wanted to capture the workarounds in case someone else has the same issues. I’m running Ubuntu 16.04 in a google cloud vm. I then run VNC over SSH from a chromebook to access the vm and wanted to use Atom to modify some python code.

Initially, atom wouldn’t run and complained that XInputExtension was missing (sorry, didn’t capture the output). Here’s the workaround I found elsewhere:

sudo sed -i ‘s/BIG-REQUESTS/_IG-REQUESTS/’ /usr/lib/x86_64-linux-gnu/libxcb.so.1

Alternatively, you could copy the library to /opt/atom and modify it there. That would make the changes apply only to atom.

After that, atom would run but there were issues with a couple keybindings. When in the editor, the enter key didn’t do anything. Also, the ‘5’ and ‘%’ keys were mapping to backspace. To work around this, I created the ~/.atom/init.coffee file and added the following:

atom.keymaps.addKeystrokeResolver ({keystroke, event}) ->
if event.code is ‘Backspace’ and (event.key is ‘5’ or event.key is ‘%’)
keystroke.replace(‘backspace’, ‘5’)
atom.keymaps.addKeystrokeResolver ({keystroke, event}) ->
if event.code is 'Space’
keystroke.replace(‘space’, ‘enter’)


#2

sorry, hit reply accidentally. Here’s the code formatted for readability:

atom.keymaps.addKeystrokeResolver ({keystroke, event}) ->
  if event.code is 'Backspace' and (event.key is '5' or event.key is '%')
    keystroke.replace('backspace', '5')
atom.keymaps.addKeystrokeResolver ({keystroke, event}) ->
  if event.code is 'Space'
    keystroke.replace('space', 'enter')

After these two modifications, it appears to be functioning as expected.

Happy coding!