模拟console linux,linuxconsole: LinuxConsole 是一份 GNU/Linux 操作系统,用户只需要进行最少的配置就能让它工作...

linuxconsole tools

Release 1.4.8

http://sf.net/projects/linuxconsole/

This package contains the following utilities and associated

documentation:

* inputattach - connects legacy serial devices to the input layer

* joystick utilities - calibrate and test joysticks and joypads

The evtest tool, which used to be part of this package, is now

maintained separately at http://cgit.freedesktop.org/evtest/ and

https://bugzilla.freedesktop.org/enter_bug.cgi?product=evtest

Joystick utilities

------------------

The following utilities are provided to calibrate and test joysticks:

* ffcfstress, ffmvforce, fftest - test force-feedback devices

* ffset - set force-feedback device parameters

* jscal - calibrate joystick devices, reconfigure the axes and buttons

* jscal-store, jscal-restore - store and retrieve joystick device

settings as configured using jscal

* jstest - test joystick devices

The typical scenario when configuring a new device is as follows:

1. Check the basic functions using jstest (number of buttons, axes,

etc.).

2. Calibrate the joystick using jscal (this can be useful even if the

device functions correctly, if only to configure the dead-zone at

the centre).

3. Repeat steps 1 and 2 until the joystick is configured to the user's

satisfaction.

4. Store the device's setup using jscal-store.

Installation

------------

Most of the utilities have no particular requirement beyond a libc and

the Linux input layer headers (normally part of your libc

installation). ffmvforce requires SDL (libsdl1.2-dev on Debian

derivatives).

To install the utilities and their manpages, run

make

and then as root

make install

from the distribution's top directory. This will install everything

into /usr/local. Should you wish to install the tools elsewhere, you

can use the PREFIX variable:

PREFIX=/usr make install

The Makefiles also recognise the DESTDIR variable which can be used to

install into a temporary directory (this is useful mainly for

distribution packagers).

Auto-loading inputattach and jscal-restore

------------------------------------------

udev can be used to start inputattach and jscal-restore when the

appropriate device is connected to the system (or detected when the

system is booting up).

The following rule restores the stored calibration and axis/button

mappings whenever a joystick device is connected:

KERNEL=="js*", ACTION=="add", RUN+="/usr/bin/jscal-restore %E{DEVNAME}"

(change the path as appropriate). This rule needs /usr to be

available, which can cause issues on systems where udev is run from

the initramfs or where /usr is a separate partition. To work around

this, the Debian package uses a script provided by Debian's udev

package to wait for jscal-restore to become available. Should you wish

to reproduce this, you need to create a udev agent

(/lib/udev/jscal-restore) containing the following:

#!/bin/sh -e

# udev agent for jscal-restore

wait_for_file() {

local file=$1

local count=120

while [ $count != 0 ]; do

[ -e "$file" ] && return 0

sleep 1

count=$(($count - 1))

done

exit 1

}

(

wait_for_file /usr/bin/jscal-restore

exec /usr/bin/jscal-restore $1

) &

and change the udev rule to

KERNEL=="js*", ACTION=="add", RUN+="/lib/udev/jscal-restore %E{DEVNAME}"

The following rule forces flaky Acrux gamepads to stay awake:

KERNEL=="js*", ACTION=="add", ATTRS{name}=="ACRUX USB GAMEPAD 8116", RUN+="/bin/sleep 5000 < /dev/%k"

(This should only be necessary on kernels older than 2.6.39-rc1.)

The following rule configures a Mouse Systems mouse on the first

serial port:

KERNEL=="ttyS0", ACTION=="add", RUN+="/usr/bin/inputattach --daemon -msc /dev/%k"

If you need to wait for /usr you can adapt the recipe above.

The following rules configures a Wacom W8001 devices on a Fujitsu

T2010[2] or on Lenovo X200-series laptops and tablets:

SUBSYSTEM=="tty", KERNEL=="ttyS[0-9]*", ATTRS{id}=="FUJ02e5", ACTION=="add|change", RUN+="/usr/bin/inputattach --daemon --baud 19200 --w8001 /dev/%k"

SUBSYSTEM=="tty", KERNEL=="ttyS[0-9]*", ATTRS{id}=="WACf00c", ACTION=="add|change", RUN+="/usr/bin/inputattach --daemon --baud 38400 --w8001 /dev/%k"

These rules are liable to cause conflicts with the X.org wacom

driver. For example, on some Debian-based systems the

/usr/share/X11/xorg.conf.d/50-wacom.conf configuration file needs to

be amended so that the "MatchProduct" line matching one of the

identifiers used above ("FUJ02e5" or "WACf00c", the latter being

matched by "WACf") no longer contains the matching identifier. The

appropriate X.org driver when using inputattach in this way is evdev.

Configuring PS3 controller LEDs

-------------------------------

The js-set-enum-leds can be used with udev to ensure that the

controller LEDs on PS3 controllers match their identifiers as set by

Bluetooth host software. This ensures that if the controllers are

plugged in before the Bluetooth daemon starts, the LEDs still match

the identifier assigned once the daemon has initialised.

The following udev rule achieves this:

# Set PS3 controller leds to the same value bluez will choose for it.

# IMPORT{parent} used because $parent did not appear to be working; we

# don't need the devpath of the js device for this so it is OK to overwrite.

ACTION=="add", KERNEL=="js*", IMPORT{parent}="DEVPATH", ATTRS{name}=="Sony PLAYSTATION(R)3 Controller", RUN+="/lib/udev/js-set-enum-leds /sys/%E{DEVPATH}/device/leds/ $number"

Contributors

------------

The following people have contributed to this release:

* Johann Walles: jscal jitter tolerance.

* Dr. László Kaján: button and axis remapping.

* Sebastian Siewior: EVIOCGBIT correction.

* Krzysztof A. Sobiecki: improvements to the button and axis remapping

functions.

* Claudio Nieder: Sahara Touch-iT213 support.

* Florian Fainelli: evtest fixes.

* Alexander Clouter: W8001 support and error-handling fixes.

* Roberto Neri: much discussion, and fixes and improvements to

jscal-store/jscal-restore and the udev rules given above.

* Jean Delvare: inputattach improvements, TAOS support.

* Brian Murray and Kees Cook: Lenovo W8001 support.

* Raoul Bönish: fixes for the udev rules.

* John Sung: PenMount 3000, 6000 and 6250 support.

* Christian Gmeiner: TSC-40 support.

* Kyle Manna: various build fixes.

* Denis Gonsiorovsky: Genius EasyPen 3x4 tablet support.

* Jaromir Capik: 64-bit fixes and changes from ff-utils (based on a

patch originally by Jean-Philippe Meure).

* Ralf Jung: fixes for long device names.

* Andrew Basterfield: fix for Spaceball 4000FLX support.

* bri: PS3 controller LED configuration

* Julian Squires: Wacom IV support.

License

-------

The linuxconsole tools are

Copyright © 1996-2005 Vojtech Pavlik

Copyright © 2001 Oliver Hamann

Copyright © 2001-2002 Johann Deneux

Copyright © 2001 Arndt Schoenewald

Copyright © 2008-2015 Stephen Kitt

This program is free software; you can redistribute it and/or modify

it under the terms of the GNU General Public License as published by

the Free Software Foundation; either version 2 of the License, or (at

your option) any later version.

This program is distributed in the hope that it will be useful, but

WITHOUT ANY WARRANTY; without even the implied warranty of

MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU

General Public License for more details.

You should have received a copy of the GNU General Public License

along with this program; if not, write to the Free Software

Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301,

USA.

The GNU General Public License version 2 is provided in the COPYING

file.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值