main/ttyescape: new aports (MR 2309)
Add ttyescape, a script and triggerhappy configuration to allow mobile device
users to access and use a shell without having to plug in to a computer.
One of the largest limitations with a mobile device is the lack of keyboard, for
mainstream OSs like Android and iOS, this is a non-issue as the whole OS stack
is built to automatically recover in case of a crash / hang, hiding the internal
state of affairs from users and making use of careful design to minimise the
impact. When bringing Linux to mobile, we carry not only the benefits of the
Linux desktop but also it's limitations. In the event that your desktop manager
goes haywire or hangs completely, or your graphics drivers get unhappy, the
ability to quickly jump to a tty and start killing bad behaving programs or
reset your display manager is one that most of us take for granted. But when
hit by similar errors on a mobile device there is no such recourse available,
users either have to reboot and hope that the issue doesn't occur again, or pull
out a laptop and pull up a shell (assuming ssh is enabled and the rndis
interface comes up).
ttyescape proposes to solve this issues by pieceing together several already
available tools, notably:
- triggerhappy, a tool used to perform actions when
certain buttons or key combinations are pressed with no dependencies on the
display manager in use.
- fbkeyboard, a framebuffer keyboard for tty's, it
renders on top of the current tty and uses the device touchscreen as input.
2021-07-04 19:14:58 +00:00
|
|
|
|
|
|
|
# tty font to use
|
|
|
|
FONT="/usr/share/consolefonts/ter-128n.psf.gz"
|
|
|
|
# Number of times the power button must be pressed whilst volume down
|
|
|
|
# is being held to trigger the tty switch
|
|
|
|
PRESSCOUNT=3
|
|
|
|
# tmpfile to use for counting state
|
|
|
|
TMPFILE="/tmp/ttyescape.tmp"
|
2021-11-27 21:21:16 +00:00
|
|
|
KEYBOARD="buffyboard"
|