问题
I have an embedded Qt application crosscompiled that runs on BeagleBone Black. It works Ok, but one thing- It doesnt accept keyboard input if i wont run in directly on BeagleBone Black preceeding with sudo
. This is a problem because:
- I cannot remote debug application and use connected keyboard, as it doesnt work,
- I cannot use keyboard when the app is in
rc.local
file to boot at startup (even thoughsudo
is used there).
This is critical for me at the moment and I cannot find solution to the problem for very long. I would really apreciate all help regarding this.
My /etc/enviroment
content is here:
QWS_MOUSE_PROTO=IntelliMouse:/dev/input/mouse0
QWS_KEYBOARD=LinuxInput:/dev/tty
TSLIB_CONFFILE=/etc/ts.conf
TSLIB_PLUGINDIR=/usr/lib/ts
Although I have tried many different configurations for QWS_KEYBOARD
. The keyboard I would like to use is /dev/input/event1
.
回答1:
I also facing this issue. But in my situation, I use remote desktop from Windows OS to raspberry / beaglebone.
My solution (make sure at least you know how to configure ssh in raspberry) :
- install xrdp (sudo apt-get install xrdp) on raspberry / beaglebone / other embedded linux
- in PC instal xming (search sourceforge)
- open XLaunch, select multiple windows > start no client > clipboard > finish
- open putty >> session, enter host name / IP address, putty >> SSH >> X11 >> check 'Enable X11 forwarding' putty >> click Open button
- login ssh and then type qcreator
now the keyboard should be fine
来源:https://stackoverflow.com/questions/31161989/cannot-use-keyboard-within-qt-app-without-sudo