View Single Post
Posts: 2 | Thanked: 11 times | Joined on Nov 2017
#1
Not wishing to necrobump and old post; https://talk.maemo.org/showthread.php?t=41848 I found a clunky workaround to capturing keyboard input for X forwarding.

I did this with Chromium, which may appeal to those that don't wish to use the native web-browser due to security issues.

Initially I found that the hardware N900 keyboard did not capture the X forwarded Chromium instance and instead sent keyboard input to the terminal, so tried to use xvkbd as an alternative input method, but accidentally discovered that typing with xvkbd it gave the N900 hardware keyboard focus of the X forwarded application and continued to work even if I killed xvkbd.

This is a clunky fix though so there's probably a more elegant solution, this could be written into a shell script or other. Regardless, here are the steps I go through to run Chromium on the N900;

First up is the SSH session to the server with Chromium and xvkbd installed on it;

Code:
ssh -YC user@192.x.x.x
C for compression, Y as this is a trusted client.
Then with the remote shell;
Code:
chromium > /dev/null 2>&1 &
xvkbd -window *Chrom* > /dev/null 2>&1 &
It's important to wait for Chromium to open, such that xvkbd's explicit window capture works, so if you write this into a shell script you may wish to add a sleep command before invoking xvkbd, this is because you cannot select the Chromium window normally from xvkbd's GUI on the N900, you must specify it from the shell. This should work for any other X forwarded program you need input with, though I've not tested it.

Once both are open, go into the xvkbd GUI and type anything and press xvkbd's return, Chromium should accept this input, plus at this stage it will give the N900's own hardware keyboard focus of Chromium, so you can close xvkbd.

As I say, it's far from elegant, but it's a workaround some of you may appreciate.

 

The Following 11 Users Say Thank You to opt1mus For This Useful Post: