Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

第16章 ハードウェアの設定

16.1. タブレット

16.1.1. 新規タブレット向けサポートの追加

libwacom は、Wacom モデルに関するデータを保存するタブレット情報クライアントライブラリーです。このライブラリーは、GNOME の gnome-settings-daemon コンポーネントと Wacom Tablet 設定パネルの両方で使用されます。
新規タブレットのサポートを libwacom に追加するには、新しいタブレット定義ファイルを作成する必要があります。タブレット定義ファイルは libwacom-data パッケージに含まれています。このパッケージがインストールされた場合には、タブレット定義ファイルが /usr/share/libwacom/ ディレクトリーでローカルで利用できます。
画面のマッピングを正しく使用するには、タブレットのサポートを libwacom データベースおよび udev ルールファイルに含める必要があります。
重要
デバイスが libwacom でサポートされていない一般的なインジケーターは、GNOME セッションでは正常に機能しても、デバイスは画面に正しくマッピングされていないことを示しています。

手順16.1 タブレット記述の追加

  1. libwacom-list-local-devices ツールを使用して、libwacom が認識するすべてのローカルデバイスを一覧表示します。
    デバイスが一覧にないが、カーネルのイベントデバイス( /proc/bus/input/devicesを参照)および X セッション(xinput 一覧を参照)として利用可能な場合、デバイスは libwacom のデータベースにありません。
  2. 新規のタブレット定義ファイルを作成します。以下の data/wacom.example を使用して必要な行を編集します。
    注記
    新規の .tablet ファイルはすでに利用可能な場合があるので、まずアップストリームのリポジトリー https://sourceforge.net/p/linuxwacom/libwacom/ci/master/tree/ を確認してください。お使いのタブレットモデルがリストにある場合は、そのファイルをローカルマシンにコピーすれば十分です。
    # Example model file description for a tablet
    [Device]
    
    # The product is the product name announced by the kernel
    Product=Intuos 4 WL 6x9
    
    # Vendor name of this tablet
    Vendor=Wacom
    
    # DeviceMatch includes the bus (usb, serial), the vendor ID and the actual
    # product ID 
    DeviceMatch=usb:056a:00bc
    
    # Class of the tablet. Valid classes include Intuos3, Intuos4, Graphire, Bamboo, Cintiq
    Class=Intuos4
    
    # Exact model of the tablet, not including the size.
    Model=Intuos 4 Wireless
    
    # Width in inches, as advertised by the manufacturer
    Width=9
    
    # Height in inches, as advertised by the manufacturer
    Height=6
    
    # Optional features that this tablet supports
    # Some features are dependent on the actual tool used, e.g. not all styli
    # have an eraser and some styli have additional custom axes (e.g. the
    # airbrush pen). These features describe those available on the tablet.
    #
    # Features not set in a file default to false/0
    
    [Features]
    # This tablet supports styli (and erasers, if present on the actual stylus)
    Stylus=true
    
    # This tablet supports touch.
    Touch=false
    
    # This tablet has a touch ring (Intuos4 and Cintiq 24HD)
    Ring=true
    # This tablet has a second touch ring (Cintiq 24HD)
    Ring2=false
    
    # This tablet has a vertical/horizontal scroll strip
    VStrip=false
    HStrip=false
    
    # Number of buttons on the tablet
    Buttons=9
    
    # This tablet is built-in (most serial tablets, Cintiqs) 
    BuiltIn=false
  3. .tablet の接尾辞を付けて新規ファイルを追加、インストールします。
    cp the-new-file.tablet /usr/share/libwacom/
    インストールが完了すると、タブレットは libwacom のデータベースの一部になります。このタブレットは libwacom-list-local-devices で利用可能になります。
  4. 新規ファイル /etc/udev/rules/99-libwacom-override.rules を以下の内容で作成し、設定が上書きされないようにします。
    ACTION!="add|change", GOTO="libwacom_end"
    KERNEL!="event[0-9]*", GOTO="libwacom_end"
    
    [new tablet match entries go here]
    
    LABEL="libwacom_end"
    
  5. システムを再起動します。

16.1.2. ワコムタブレット設定の保存場所

Wacom タブレットの設定は、/org/gnome/settings-daemon/peripherals/wacom/machine-id-device-id キーの GSettings に保存されます。machine-id は D-Bus マシン ID で、device-id はタブレットデバイス ID です。タブレットの設定スキーマは org.gnome.settings-daemon.peripherals.wacom です。
同様に、スタイラス設定は /org/gnome/settings-daemon/peripherals/wacom/device-id/tool-id キーに保存されます。tool-id は、プロフェッショナルで使用されるスタイラスの識別子です。tool-id に対応しないコンシューマーでは、代わりに汎用識別子が使用されます。スタイラスの設定スキーマは org.gnome.settings-daemon.peripherals.wacom.stylus で、イレーサー org.gnome.settings-daemon.peripherals.wacom.eraser 用です。
特定のマシンで使用されるタブレット設定パスの詳細一覧を取得するには、gnome-settings-daemon-devel パッケージが提供する gsd-list-wacom ツールを使用できます。
gnome-settings-daemon-devel パッケージがシステムにインストールされていることを確認するには、システムが Optional チャンネルにサブスクライブしていることを確認してから以下のコマンドを実行します。
# yum install gnome-settings-daemon-devel
システムを Optional チャネルにサブスクライブする方法については、以下のリソースを参照してください。
パッケージがインストールされていることを確認した後に、以下のコマンドを実行します。
$ /usr/libexec/gsd-list-wacom
設定パスで machine-iddevice-id、および tool-id を使用すると、マシンごとに別個のタブレット設定を持つ共有ホームディレクトリーの使用が可能になります。

16.1.3. マシン間でホームディレクトリーを共有する際にワコムの設定は 1 台のマシンのみに適用される

この理由は、ワコムタブレットの D-Bus マシン ID (machine-id) がタブレット設定を保存する /org/gnome/settings-daemon/peripherals/wacom/machine-id-device-id GSettings キーの設定パスに組み込まれているためです。