AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 3763
In Process
WalterJ89
WalterJ89
Asked: 2010-09-07 11:57:51 +0800 CST2010-09-07 11:57:51 +0800 CST 2010-09-07 11:57:51 +0800 CST

设置 3M 串行触摸屏

  • 772

很长一段时间以来,我一直在尝试让串行 3M 触摸屏在 Ubuntu 10.04 上工作。

我能找到的最接近我需要的帖子是这个: http ://ubuntuforums.org/showthread.php?t=1508944&highlight=3m+touchscreen

不幸的是,我到达了我触摸屏幕的地方,鼠标跳到了右上角,就是这样。校准软件并没有真正起作用(直接来自 3M)。有时它不会启动,或者它有问题。

现在看来问题与校准软件无法识别连接的触摸屏有关。通过对安装脚本进行一些更改,我能够正确安装校准软件。

#!/bin/bash
#
# Copyright 2007-2009 3M. All rights reserved.
#
# This script installs the MT7 touch screen driver
# During installation, all directories must be writeable.
#

# These symbols point to where the MT7 software binaries and data reside.
# The script attempts to detect where the installation kit is. If this
# fails, you need to set BinDir.
# The data directory must be on writeable media. The script normally uses
# the directory where the installation kit resides as the data directory.
# If you need the data directory to be elsewhere, set DataDir.
BinDir=""
DataDir=""

# If desired, define a file to contain driver startup options and set
# the TwDrv_Cfg symbol to the full path of the file. Normally this is
# not needed.
TwDrv_Cfg=""

# This symbol points to where the Java VM binaries reside.
JavaBinDir=""

# These symobls point to system and applictaion directories other than
# those specific to the MT7 software
UdevDir="/etc/udev"
HotplugDir="/etc/hotplug"
XorgDir="/usr/lib/xorg/modules/input"
XFree86Dir="/usr/X11R6/lib/modules/input"
LibDir="/usr/lib"
SEDir1="/usr/selinux/booleans"
SEDir2="/selinux/booleans"
LSBDir="/lib/lsb"

# The InitDir symbol points to where this script places an 'init' script.
# If left blank, this script first looks for /etc/init.d and then /etc/rc.d.
# If this is not appropriate or this script otherwise fails, set this value.
InitDir=""

# This symbol enables permission for some MT7 shared objects on
# SELinux systems. On most systems SEGivePermission is texrel_shlib_t.
# Change this variable if another security type is appropriate.
SEGivePermission="texrel_shlib_t"

# This symbol affects when the X input driver converts raw touch screen
# coordinates into screen coordiates. Normally, the X input driver reports
# the raw coordinates to the X server which then calls an conversion
# routine. Some versions of the X server expect the initial report to
# contain converted coordinates. If your touch behavior is off and
# calibration does not address the problem, set ConvertAtRead to true.
ConvertAtRead="false"

# This symbol defines the name of the xorg.conf file to generate if one is
# not found. Starting with X server version 1.5, this file is not
# automatically generated. This file is needed for MT 7 for Linux to work.
# If you want the file to reside elsewhere, set this symbol.
XorgConf="/etc/X11/xorg.conf"

# These symbols define where the 50MT7-xinit script needs to go and what
# suffix it requires. The script places this file automatically in
# /etc/X11/xinit/xinitrc.d and /etc/X11/Xsession.d without a suffix. If
# your distribution requires another location or requires a suffix on the
# file, set these symbols.
XinitDir=""
XinitSuffix=""

# Determine the installation directory
if [ -z $BinDir ]
then
   if [ $(echo $0 | grep ^/) ]
   then
      BinDir=$0
   else
      BinDir=$(echo $PWD"/"$0 | sed s#[.]/##)
   fi
   BinDir=$(echo $BinDir | sed s%/[^/]*$%%)
fi

# Determine if the system is compatible
$BinDir/TwCompat
if [ $? != 0 ]
then
   echo "ERROR: MT7 for Linux not installed - shared memory support not detected"
   exit
fi

# Determine the data directory
[ -z $DataDir ] && DataDir=$BinDir

# Create the data and fifo directories
if [ $DataDir != $BinDir ]
then
   [ -e $DataDir ] || mkdir $DataDir
   chmod a+w $DataDir
   ln -s $DataDir $BinDir/data
else
   [ -e $BinDir/data ] || mkdir $BinDir/data
fi
chmod a+w $BinDir/data
[ -e $BinDir/data/fifo ] || mkdir $BinDir/data/fifo
chmod a+w $BinDir/data/fifo

# Determine the init script directories
if [ -z $InitDir ] && [ -d /etc/init.d ]
then
   if [ $(ls -l /etc/init.d/ | sed -e /functions/d -e /^total\ [0-9]*$/d | wc -l) != 0 ]
   then
      InitDir="/etc/init.d"
   fi
fi
if [ -z $InitDir ]
then
   if [ -e /etc/rc.d/rc.local ]
   then
      InitDir=/etc/rc.d
   else
      InitDir=$BinDir
   fi
fi

# Install the init script
[ -e $InitDir/TWDrvStartup ] && rm -f $InitDir/TWDrvStartup
sed -e s#%BINDIR%#$BinDir#g \
    -e s#%INITDIR%#$InitDir#g \
    -e s#%LSBDIR%#$LSBDir#g \
    -e s#%TWDRV_CFG%#$TwDrv_Cfg#g $BinDir/TWDrvStartup.ORIG \
    >$InitDir/TWDrvStartup
chmod a+x $InitDir/TWDrvStartup
if perl $BinDir/TwIsThere.perl chkconfig
then
   chkconfig --add TWDrvStartup >/dev/null
elif perl $BinDir/TwIsThere.perl update-rc.d
then
   update-rc.d TWDrvStartup defaults >/dev/null
elif [ -e $InitDir/rc.local ]
then
   sed -e '$ a\
%INITDIR%/TWDrvStartup start
' $InitDir/rc.local >$InitDir/rc.local.TEMP
   rm -f $InitDir/rc.local
   sed -e s#%INITDIR%#$InitDir# $InitDir/rc.local.TEMP >$InitDir/rc.local
   rm -f $InitDir/rc.local.TEMP
   chmod +x $InitDir/rc.local
else
   echo "Cannot install the init script"
fi

# Test for USB support
if [ -z $(uname -r | grep ^2\.4\.) ]
then
   # Copy the udev rules script
   Hotplug=0
   if [ -d $UdevDir/rules.d ]
   then
      if [ -e $UdevDir/rules.d/99-TwDriver.rules ]
      then
         rm -f $UdevDir/rules.d/99-TwDriver.rules
      fi
      sed s#%BINDIR%#$BinDir#g $BinDir/99-TwDriver.rules.ORIG \
         >$UdevDir/rules.d/99-TwDriver.rules
      Hotplug=1
   fi
   if [ -d $HotplugDir/usb ] && [ -e $HotplugDir/usb.agent ]d
   then
      [ -e $HotplugDir/usb/TwHotplug ] && rm -f $HotplugDir/usb/TwHotplug
      sed s#%BINDIR%#$BinDir#g $BinDir/TwHotplug.ORIG > $HotplugDir/usb/TwHotplug
      chmod a+x $HotplugDir/usb/TwHotplug
      [ -e $HotplugDir/usb.usermap ] || echo "# Created by MT7" >$HotplugDir/usb.usermap
      sed <$HotplugDir/usb.usermap >$HotplugDir/usb.usermap.TEMP '$ a\
# TwHotplug is for the MT7 for Linux software\
TwHotplug            0x0001      0x0596   0x0000    0x0000       0x0000      0x00         0x00            0x00            0x06            0x00               0x00               0x00000000
'
      rm -f $HotplugDir/usb.usermap
      mv $HotplugDir/usb.usermap.TEMP $HotplugDir/usb.usermap
      Hotplug=1
   fi
   if [ $Hotplug == 0 ]
   then
      echo "Hotplugging of USB touch screen controllers is not supported"
   fi
else
   echo "USB touch screen controllers are not supported under kernel 2.4"
fi

# Test for the version of C++ standard libraries
if [ -e $LibDir/libstdc++.so.6 ]
then
   CppExt="6"
elif [ -e $LibDir/libstdc++.so.5 ]
then
   CppExt="5"
else
   echo "Cannot find needed libstdc++.so in $LibDir"
   CppExt=""
fi

# Link the libraries into /usr/lib
perl $BinDir/TwLibInstall.perl install $LibDir $BinDir/lib*.so
if [ x$CppExt != x ]
then
   perl $BinDir/TwLibInstall.perl install $LibDir $BinDir/so$CppExt/lib*.so
fi

# Link RnR sensitive files
if [ x$CppExt != x ]
then
   $BinDir/TwLibTest $LibDir/libTwSystemRnR12.so
   if [ x$? != x0 ]
   then
      rm -f $LibDir/libTwSystem.so
      ln -s $LibDir/libTwSystemRnR12.so $LibDir/libTwSystem.so
      ln -s $BinDir/TwMonitorRnR.bin$CppExt $BinDir/TwMonitor
   else
      $BinDir/TwLibTest $LibDir/libTwSystemRnR.so
      if [ x$? != x0 ]
      then
         rm -f $LibDir/libTwSystem.so
         ln -s $LibDir/libTwSystemRnR.so $LibDir/libTwSystem.so
         ln -s $BinDir/TwMonitorRnR.bin$CppExt $BinDir/TwMonitor
      else
         ln -s $BinDir/TwMonitor.bin$CppExt $BinDir/TwMonitor
      fi
   fi
fi

# Copy the X input driver
XCopyDefault=0
if [ -d $XorgDir ]
then
   XDir=$XorgDir
   if [ -z "$(X -version 2>&1 | grep X\.Org[^1]*1\.[4-9]\.)" ]
   then
      XSrc=$BinDir/twxinput_drv.so
   elif [ -z "$(X -version 2>&1 | grep X\.Org[^1]*1\.[5-9]\.)" ]
   then
      XSrc=$BinDir/twxinput_drv.so.1.4
   else
      XSrc=$BinDir/twxinput_drv.so.1.5.1
      XCopyDefault=1
   fi
elif [ -d $XFree86Dir ]
then
   XDir=$XFree86Dir
   XSrc=$BinDir/twxinput_drv.so
else
   XDir=""
   echo "Cannot install the X input module"
fi
if [ -d $XDir ]
then
   [ -e $XDir/twxinput_drv.o ] && rm -f $XDir/twxinput_drv.o
   [ -e $XDir/twxinput_drv.so ] && rm -f $XDir/twxinput_drv.so
   ln -s $XSrc $XDir/twxinput_drv.so
fi

# Install the xinit scripts
if [ -d /etc/X11/xinit/xinitrc.d ]
then
   sed s#%BINDIR%#$BinDir#g $BinDir/50MT7-xinit.ORIG \
      >/etc/X11/xinit/xinitrc.d/50MT7-xinit$XinitSuffix
   chmod a+x /etc/X11/xinit/xinitrc.d/50MT7-xinit$XinitSuffix
fi
if [ -d /etc/X11/Xsession.d ]
then
   sed s#%BINDIR%#$BinDir#g $BinDir/50MT7-xinit.ORIG \
      >/etc/X11/Xsession.d/50MT7-xinit$XinitSuffix
   chmod a+x /etc/X11/Xsession.d/50MT7-xinit$XinitSuffix
fi
if [ x$XinitDir != x ]
then
   sed s#%BINDIR%#$BinDir#g $BinDir/50MT7-xinit.ORIG \
      >$XinitDir/50MT7-xinit$XinitSuffix
   chmod a+x $XinitDir/50MT7-xinit$XinitSuffix
fi

# Set up the SELinux security types
if [ -d $SEDir1 ]
then
   SEDir=$SEDir1
elif [ -d $SEDir2 ]
then
   SEDir=$SEDir2
else
   SEDir=""
fi
if [ x$SEDir != x ]
then
   chcon -t $SEGivePermission $LibDir/libTwSystem.so
   chcon -t $SEGivePermission $LibDir/libTwConfig.so
   chcon -t $SEGivePermission $LibDir/libTwIO_Utilities.so
   chcon -t $SEGivePermission $LibDir/libTwAppIO_JNI.so
   chcon -t $SEGivePermission $LibDir/libTwCommon_JNI.so
   chcon -t $SEGivePermission $LibDir/libTwConfig_JNI.so
   chcon -t $SEGivePermission $LibDir/libTwUI_JNI.so
   chcon -t $SEGivePermission $LibDir/libTwUICP.so
   [ -e $XDir/twxinput_drv.so ] && chcon -t $SEGivePermission $XDir/twxinput_drv.so
fi

# Set up the configuration
[ -d /dev/shm ] && rm -f /dev/shm/*TwConfig*
sed s#%BINDIR%#$BinDir#g $BinDir/TwFramework.cfg.ORIG >$BinDir/TwFramework.cfg
$BinDir/TwCfgUtil /u $BinDir/TwFramework.cfg
$BinDir/TwCfgUtil /u $BinDir/TwFactory.cfg

# Produce the Remove script
sed -e s#%BINDIR%#$BinDir#g \
    -e s#%UDEVDIR%#$UdevDir#g \
    -e s#%XDIR%#$XDir#g \
    -e s#%LIBDIR%#$LibDir#g \
    -e s#%SEDIR%#$SEDir#g \
    -e s#%HOTPLUGDIR%#$HotplugDir#g \
    -e s#%INITDIR%#$InitDir#g \
    -e s#%XINITDIR%#$XinitDir#g \
    -e s#%XINITSUFFIX%#$XinitSuffix#g \
    $BinDir/Remove.ORIG >$BinDir/Remove

# Produce the X input script
sed -e s#%CONVERT%#$ConvertAtRead#g \
    $BinDir/TWXinputInstall.perl.ORIG >$BinDir/TWXinputInstall.perl

# Produce the CP start script
sed -e s#%JAVABINDIR%#$JavaBinDir#g \
    -e s#%BINDIR%#$BinDir# \
    $BinDir/StartCP.ORIG >$BinDir/StartCP

# Set any necessary permissions
chmod a+x $BinDir/TwCalib
chmod a+x $BinDir/TWXinputInstall.perl
chmod u+x $BinDir/Remove
chmod a+x $BinDir/StartCP

# Copy the default xorg.conf
if [ $XCopyDefault == 1 ]
then
   $BinDir/TWXinputInstall.perl -find
   if [ $? == 1 ]
   then
      cp -a xorg.conf.ORIG $XorgConf
   fi
fi

通常这会出现此错误,尽管我认为这些错误并不严重(警告?):

update-rc.d: warning: /etc/init.d/TWDrvStartup missing LSB keyword 'required-start'

update-rc.d: warning: /etc/init.d/TWDrvStartup missing LSB keyword 'required-stop'

update-rc.d: warning: TWDrvStartup start runlevel arguments (2 3 4 5) do not match LSB Default-Start values (2 5)
update-rc.d: warning: TWDrvStartup stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (0 1 3 4 6)
ln: creating symbolic link `/home/kioskadmin/Desktop/twscreen/TwMonitor': File exists
root@kiosk1:/home/kioskadmin/Desktop/twscreen# 

很久以前我也在超级用户上问过这个问题,尽管除了 Ubuntu 论坛的链接之外,什么都没有。如果我没记错的话,Ubuntu 论坛上的任何人都没有比将我指向同一篇文章的帮助很大。似乎“触摸屏”是一个很少有人知道的专业话题。

我的问题:

1 有什么技巧可以让它正常工作吗?我的主要问题似乎是 10.04 中较新的引导过程。

2 任何替代校准软件或触摸屏驱动程序可能有效或值得尝试?(串行,不是 USB)。

似乎驱动程序未正确启动。校准软件和控制面板由于某种原因没有检测到控制器。我目前的假设是 init 脚本不正确,很可能是由于 Ubuntu 的启动过程发生了变化。

编辑:

看来我现在可以正确运行控制面板脚本了,我遇到了 Java 问题,但我只需要以不同的方式执行它。现在我有控制面板和校准软件无法检测到触摸屏的问题。一切都在运行,但就是找不到它,即使它已连接并且如果我手动启用屏幕它也会响应。

错误是“触摸屏 1 不存在”。

10.04 drivers multi-touch touchscreen
  • 3 3 个回答
  • 3212 Views

3 个回答

  • Voted
  1. akshatj
    2010-09-12T19:56:01+08:002010-09-12T19:56:01+08:00

    在特立独行的情况下,添加此 PPA 并尝试

    ppa:utouch-team/utouch

    • 1
  2. MagicFab
    2010-10-23T12:47:10+08:002010-10-23T12:47:10+08:00

    请参阅此处以获取有关 Ubuntu 中 MultiTouch 的帮助: https ://wiki.ubuntu.com/Multitouch#Community%20Help

    当您在那里提出问题时,请确保包含 lsusb 的结果。谢谢!

    但是,这可能不足以正确配置您的设备驱动程序。我建议提交一个错误。

    • 1
  3. Malan
    2016-10-13T23:58:46+08:002016-10-13T23:58:46+08:00

    运行/opt/twscreen/Remove脚本。

    编辑/opt/twscreen/TWDrvStartup.ORIG文件并将其更新BEGIN INIT INFO为如下所示:

    ### BEGIN INIT INFO
    # Provides: TwDriver
    # Required-Start:
    # Required-Stop:
    # Default-Start: 2 5
    # Default-Stop: 0 1 3 4 6
    # Description: Start the MT 7 touch screen driver
    ### END INIT INFO
    

    跑过/opt/twscreen/Install

    • 0

相关问题

  • 与 Ubuntu 配合使用的多点触控上网本/平板电脑有哪些?[关闭]

  • 如何完全删除 Ruby + Rails + Gems?

  • 从 8.04 LTS 升级到 10.04 LTS 的体验?

  • 删除在线状态菜单,但保留注销菜单?

  • 什么可能会阻止 xrandr 屏幕之间的鼠标移动?[关闭]

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何安装 .run 文件?

    • 7 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    如何获得 CPU 温度?

    • 21 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Marko Smith

    如何使用命令行将用户添加为新的 sudoer?

    • 7 个回答
  • Marko Smith

    更改文件夹权限和所有权

    • 9 个回答
  • Marko Smith

    你如何重新启动Apache?

    • 13 个回答
  • Marko Smith

    如何卸载软件?

    • 11 个回答
  • Marko Smith

    如何删除 PPA?

    • 26 个回答
  • Martin Hope
    NES 如何启用或禁用服务? 2010-12-30 13:03:32 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    Olivier Lalonde 如何在结束 ssh 会话后保持进程运行? 2010-10-22 04:09:13 +0800 CST
  • Martin Hope
    David B 如何使用命令行将用户添加为新的 sudoer? 2010-10-16 04:02:45 +0800 CST
  • Martin Hope
    Hans 如何删除旧内核版本以清理启动菜单? 2010-08-21 19:37:01 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve