特殊:Badtitle/NS100:InstallLirc/Edgy:修订间差异
小 新页面: {{From|https://help.ubuntu.com/community/InstallLirc/Edgy}} {{Languages|UbuntuHelp:InstallLirc/Edgy}} Include(Install_Lirc_Header) == Lirc Installation & Maintenance == LIRC has impro... |
小无编辑摘要 |
||
(未显示同一用户的3个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/InstallLirc/Edgy}} | {{From|https://help.ubuntu.com/community/InstallLirc/Edgy}} | ||
{{Languages|UbuntuHelp:InstallLirc/Edgy}} | {{Languages|UbuntuHelp:InstallLirc/Edgy}} | ||
[[ | <<Include(Tag/Unsupported)>> | ||
<<Include(Tag/Deletion)>> | |||
<<Include([[UbuntuHelp:Install_Lirc_Header|Install_Lirc_Header]])>> | |||
== Lirc Installation & Maintenance == | == Lirc Installation & Maintenance == | ||
LIRC has improved in Ubuntu 6.10 over how it was in Ubuntu 6.06. | LIRC has improved in Ubuntu 6.10 over how it was in Ubuntu 6.06. | ||
第24行: | 第26行: | ||
| You will be provided a screen with a bunch of information. Choose the okay button to move on. || https://help.ubuntu.com/community/InstallLirc/Edgy?action=AttachFile&do=get&target=reconfigure1.png | | You will be provided a screen with a bunch of information. Choose the okay button to move on. || https://help.ubuntu.com/community/InstallLirc/Edgy?action=AttachFile&do=get&target=reconfigure1.png | ||
|- | |- | ||
| Choose your module(s) that you will need. Some modules will need additional information about the device, such as serial transmitters or sir port adapters. | | Choose your module(s) that you will need. Some modules will need additional information about the device, such as serial transmitters or sir port adapters. >>'''PVR-150 on-card blaster''': you will want to build the i2c and pvr150 modules || https://help.ubuntu.com/community/InstallLirc/Edgy?action=AttachFile&do=get&target=choose.png | ||
|- | |- | ||
| You will be given an option to build the modules. Be sure '''not''' to build the modules here. || https://help.ubuntu.com/community/InstallLirc/Edgy?action=AttachFile&do=get&target=build.png | | You will be given an option to build the modules. Be sure '''not''' to build the modules here. || https://help.ubuntu.com/community/InstallLirc/Edgy?action=AttachFile&do=get&target=build.png | ||
第37行: | 第39行: | ||
</nowiki></pre> | </nowiki></pre> | ||
{|border="1" cellspacing="0" | {|border="1" cellspacing="0" | ||
| Modify LOAD_MODULES=false to be LOAD_MODULES=true. Also, add your module to the line that is MODULES="". Your module is the name of the module you chose previously to build prefixed by '''lirc_'''. So for the ''mceusb'' driver, this would be '''lirc_mceusb'''. | | Modify LOAD_MODULES=false to be LOAD_MODULES=true. Also, add your module to the line that is MODULES="". Your module is the name of the module you chose previously to build prefixed by '''lirc_'''. So for the ''mceusb'' driver, this would be '''lirc_mceusb'''. >>'''PVR-150 on-card blaster''' settings are: LIRCD_ARGS="--device=/dev/lirc0" >LOAD_MODULES=true >MODULES="lirc_dev lirc_pvr150" || https://help.ubuntu.com/community/InstallLirc/Edgy?action=AttachFile&do=get&target=hardware.png | ||
|} | |} | ||
==== Build Lirc Modules ==== | ==== Build Lirc Modules ==== | ||
第64行: | 第66行: | ||
* A good place to start looking is the [http://lirc.sourceforge.net/remotes/ Lirc Website Remotes list]. | * A good place to start looking is the [http://lirc.sourceforge.net/remotes/ Lirc Website Remotes list]. | ||
* If you are using a MCEUSB or MCEUSB2 based remote, here is a lircd.conf for your remote: | * If you are using a MCEUSB or MCEUSB2 based remote, here is a lircd.conf for your remote: | ||
* | * [[UbuntuHelp:attachment:lircd.conf.mceusb|attachment:lircd.conf.mceusb]] | ||
* If you are using a hauppauge remote with the i2c driver ('''including PVR-150 blaster'''), here is a lircd.conf for your remote: | * If you are using a hauppauge remote with the i2c driver ('''including PVR-150 blaster'''), here is a lircd.conf for your remote: | ||
* | * [[UbuntuHelp:attachment:lircd.conf.hauppauge|attachment:lircd.conf.hauppauge]] | ||
Replace <code><nowiki>/etc/lirc/lircd.conf</nowiki></code> with this lircd.conf that you have found: | Replace <code><nowiki>/etc/lirc/lircd.conf</nowiki></code> with this lircd.conf that you have found: | ||
<pre><nowiki> | <pre><nowiki> | ||
第103行: | 第105行: | ||
Password: | Password: | ||
</nowiki></pre> | </nowiki></pre> | ||
You haven't created replaced the default lircd.conf read the above section on [[UbuntuHelp:Install_Lirc_Edgy#head-43c53755fd9d7351d834b8816ecb5d02e12324c7|creating lircd.conf ]] | You haven't created replaced the default lircd.conf read the above section on [[UbuntuHelp:Install_Lirc_Edgy#head-43c53755fd9d7351d834b8816ecb5d02e12324c7|creating|lircd.conf ]] | ||
==== Create a .lircrc file ==== | ==== Create a .lircrc file ==== | ||
===== Standard Method ===== | ===== Standard Method ===== | ||
第120行: | 第122行: | ||
''ACTION'' is the action that will be performed when this button is pressed. You can find a list of actions in the attached .lircrc example file. | ''ACTION'' is the action that will be performed when this button is pressed. You can find a list of actions in the attached .lircrc example file. | ||
* Here is the example lircrc taylored for several apps on a mceusb/mceusb2 remote: | * Here is the example lircrc taylored for several apps on a mceusb/mceusb2 remote: | ||
* | * [[UbuntuHelp:attachment:lircrc.mceusb|attachment:lircrc.mceusb]] | ||
For a mceusb2 remote, you might need to change the button names from "chan-", "chan+", "vol-", "vol+" to "chandown", "chanup", "voldown", "volup". | For a mceusb2 remote, you might need to change the button names from "chan-", "chan+", "vol-", "vol+" to "chandown", "chanup", "voldown", "volup". | ||
* Here is the example lircrc taylored for mythtv only on a hauppauge remote: | * Here is the example lircrc taylored for mythtv only on a hauppauge remote: | ||
* | * [[UbuntuHelp:attachment:lircrc.hauppauge|attachment:lircrc.hauppauge]] | ||
===== Alternate configuration method - IRKick ===== | ===== Alternate configuration method - IRKick ===== | ||
If you're a KDE user, you may find it more convenient to set up functionality using irkick. This requires you already have your lircd.conf and hardware.conf set up, but you won't need an lircrc file if you take this approach. | If you're a KDE user, you may find it more convenient to set up functionality using irkick. This requires you already have your lircd.conf and hardware.conf set up, but you won't need an lircrc file if you take this approach. | ||
第145行: | 第147行: | ||
* Creating a standalone file. [ All mythtv buttons will be placed in <code><nowiki>~/.mythtv/lircrc</nowiki></code> ] | * Creating a standalone file. [ All mythtv buttons will be placed in <code><nowiki>~/.mythtv/lircrc</nowiki></code> ] | ||
* Here is an example using a mceusb/mceusb2 remote: | * Here is an example using a mceusb/mceusb2 remote: | ||
* | * [[UbuntuHelp:attachment:lircrc.mythtv.mceusb|attachment:lircrc.mythtv.mceusb]] | ||
* Here is an example using a hauppauge remote: | * Here is an example using a hauppauge remote: | ||
*[http://wilsonet.com/mythtv/lircrc-haupgrey-g3.txt lircrc.mythtv.hauppauge] | *[http://wilsonet.com/mythtv/lircrc-haupgrey-g3.txt lircrc.mythtv.hauppauge] | ||
第224行: | 第226行: | ||
=== Managed I2C Devices === | === Managed I2C Devices === | ||
Ubuntu Edgy introduces support in the kernel to directly manage some remotes via the i2c bus. For remotes like this, the kernel is deprecating the use (and requirement) of lirc. You should be able to press keys on the remote and have them recognized as ordinary keyboard keys. If you don't like the way that the keypresses that are recognized for certain buttons on the remote, their behavior can be changed using Xmodmap. | Ubuntu Edgy introduces support in the kernel to directly manage some remotes via the i2c bus. For remotes like this, the kernel is deprecating the use (and requirement) of lirc. You should be able to press keys on the remote and have them recognized as ordinary keyboard keys. If you don't like the way that the keypresses that are recognized for certain buttons on the remote, their behavior can be changed using Xmodmap. | ||
Alternatively, if you would like to still use lirc to manage your i2c device, hexion has written a howto explaining how to install lirc from source and replace the ir_common module in the kernel causing this behavior. See his howto here: [http://www.ubuntuforums.org/showthread.php?t=288229 | Alternatively, if you would like to still use lirc to manage your i2c device, hexion has written a howto explaining how to install lirc from source and replace the ir_common module in the kernel causing this behavior. See his howto here: [http://www.ubuntuforums.org/showthread.php?t=288229 HOWTO: Lirc in Edgy]. | ||
=== PVR-150 IR Transmitter === | === PVR-150 IR Transmitter === | ||
==== Packages ==== | ==== Packages ==== | ||
第325行: | 第327行: | ||
* Credit to TechnoPenguin & TrubbleMaker from the forums, usring modprobe.conf | * Credit to TechnoPenguin & TrubbleMaker from the forums, usring modprobe.conf | ||
This can be achieved by editting <code><nowiki>/etc/modprobe.conf</nowiki></code> and adding the following: | This can be achieved by editting <code><nowiki>/etc/modprobe.conf</nowiki></code> and adding the following: | ||
<pre><nowiki>alias char-major-61 lirc_serial | <pre><nowiki> | ||
alias char-major-61 lirc_serial | |||
options lirc_serial irq=4 io=0x3f8 | options lirc_serial irq=4 io=0x3f8 | ||
install lirc_serial /bin/setserial /dev/ttyS0 uart none ;\ | install lirc_serial /bin/setserial /dev/ttyS0 uart none ;\ |
2010年5月19日 (三) 22:55的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/InstallLirc/Edgy }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/af | • {{#if: UbuntuHelp:InstallLirc/Edgy|Afrikaans| [[::InstallLirc/Edgy/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ar | • {{#if: UbuntuHelp:InstallLirc/Edgy|العربية| [[::InstallLirc/Edgy/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/az | • {{#if: UbuntuHelp:InstallLirc/Edgy|azərbaycanca| [[::InstallLirc/Edgy/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/bcc | • {{#if: UbuntuHelp:InstallLirc/Edgy|جهلسری بلوچی| [[::InstallLirc/Edgy/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/bg | • {{#if: UbuntuHelp:InstallLirc/Edgy|български| [[::InstallLirc/Edgy/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/br | • {{#if: UbuntuHelp:InstallLirc/Edgy|brezhoneg| [[::InstallLirc/Edgy/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ca | • {{#if: UbuntuHelp:InstallLirc/Edgy|català| [[::InstallLirc/Edgy/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/cs | • {{#if: UbuntuHelp:InstallLirc/Edgy|čeština| [[::InstallLirc/Edgy/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/de | • {{#if: UbuntuHelp:InstallLirc/Edgy|Deutsch| [[::InstallLirc/Edgy/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/el | • {{#if: UbuntuHelp:InstallLirc/Edgy|Ελληνικά| [[::InstallLirc/Edgy/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/es | • {{#if: UbuntuHelp:InstallLirc/Edgy|español| [[::InstallLirc/Edgy/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/fa | • {{#if: UbuntuHelp:InstallLirc/Edgy|فارسی| [[::InstallLirc/Edgy/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/fi | • {{#if: UbuntuHelp:InstallLirc/Edgy|suomi| [[::InstallLirc/Edgy/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/fr | • {{#if: UbuntuHelp:InstallLirc/Edgy|français| [[::InstallLirc/Edgy/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/gu | • {{#if: UbuntuHelp:InstallLirc/Edgy|ગુજરાતી| [[::InstallLirc/Edgy/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/he | • {{#if: UbuntuHelp:InstallLirc/Edgy|עברית| [[::InstallLirc/Edgy/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/hu | • {{#if: UbuntuHelp:InstallLirc/Edgy|magyar| [[::InstallLirc/Edgy/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/id | • {{#if: UbuntuHelp:InstallLirc/Edgy|Bahasa Indonesia| [[::InstallLirc/Edgy/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/it | • {{#if: UbuntuHelp:InstallLirc/Edgy|italiano| [[::InstallLirc/Edgy/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ja | • {{#if: UbuntuHelp:InstallLirc/Edgy|日本語| [[::InstallLirc/Edgy/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ko | • {{#if: UbuntuHelp:InstallLirc/Edgy|한국어| [[::InstallLirc/Edgy/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ksh | • {{#if: UbuntuHelp:InstallLirc/Edgy|Ripoarisch| [[::InstallLirc/Edgy/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/mr | • {{#if: UbuntuHelp:InstallLirc/Edgy|मराठी| [[::InstallLirc/Edgy/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ms | • {{#if: UbuntuHelp:InstallLirc/Edgy|Bahasa Melayu| [[::InstallLirc/Edgy/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/nl | • {{#if: UbuntuHelp:InstallLirc/Edgy|Nederlands| [[::InstallLirc/Edgy/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/no | • {{#if: UbuntuHelp:InstallLirc/Edgy|norsk| [[::InstallLirc/Edgy/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/oc | • {{#if: UbuntuHelp:InstallLirc/Edgy|occitan| [[::InstallLirc/Edgy/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/pl | • {{#if: UbuntuHelp:InstallLirc/Edgy|polski| [[::InstallLirc/Edgy/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/pt | • {{#if: UbuntuHelp:InstallLirc/Edgy|português| [[::InstallLirc/Edgy/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ro | • {{#if: UbuntuHelp:InstallLirc/Edgy|română| [[::InstallLirc/Edgy/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/ru | • {{#if: UbuntuHelp:InstallLirc/Edgy|русский| [[::InstallLirc/Edgy/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/si | • {{#if: UbuntuHelp:InstallLirc/Edgy|සිංහල| [[::InstallLirc/Edgy/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/sq | • {{#if: UbuntuHelp:InstallLirc/Edgy|shqip| [[::InstallLirc/Edgy/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/sr | • {{#if: UbuntuHelp:InstallLirc/Edgy|српски / srpski| [[::InstallLirc/Edgy/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/sv | • {{#if: UbuntuHelp:InstallLirc/Edgy|svenska| [[::InstallLirc/Edgy/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/th | • {{#if: UbuntuHelp:InstallLirc/Edgy|ไทย| [[::InstallLirc/Edgy/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/tr | • {{#if: UbuntuHelp:InstallLirc/Edgy|Türkçe| [[::InstallLirc/Edgy/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/vi | • {{#if: UbuntuHelp:InstallLirc/Edgy|Tiếng Việt| [[::InstallLirc/Edgy/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/yue | • {{#if: UbuntuHelp:InstallLirc/Edgy|粵語| [[::InstallLirc/Edgy/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/zh | • {{#if: UbuntuHelp:InstallLirc/Edgy|中文| [[::InstallLirc/Edgy/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/zh-hans | • {{#if: UbuntuHelp:InstallLirc/Edgy|中文(简体)| [[::InstallLirc/Edgy/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:InstallLirc/Edgy | UbuntuHelp:InstallLirc/Edgy | {{#if: | :}}InstallLirc/Edgy}}/zh-hant | • {{#if: UbuntuHelp:InstallLirc/Edgy|中文(繁體)| [[::InstallLirc/Edgy/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:InstallLirc/Edgy|:InstallLirc/Edgy|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :InstallLirc/Edgy/zh | | {{#ifexist: InstallLirc/Edgy/zh | | {{#ifeq: {{#titleparts:InstallLirc/Edgy|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:InstallLirc/Edgy|1|-1|}} | zh | | }}
<<Include(Tag/Unsupported)>> <<Include(Tag/Deletion)>> <<Include(Install_Lirc_Header)>>
Lirc Installation & Maintenance
LIRC has improved in Ubuntu 6.10 over how it was in Ubuntu 6.06. The default Lirc init scripts are properly setup to handle a single device, but the driver build scripts can handle multiple devices. If you are looking to set up an IR transmitter and a receivers, multiple transmitters, or multiple receivers, set up a Single Device and verify functionality. Afterwords, continue on to the setting up multiple devices section.
Setting up a Single Device
Throughout this howto, the lirc_mceusb driver will be used for examples. It's not necessary to build the lirc_mceusb driver if you are using a different receiver. It is just for examples sake.
Setup Repositories
In order to install lirc, you will need to have universe, multiverse, & edgy-backports enabled. See Ubuntu documentation for more information on enabling these repositories.
Install Lirc
You will only need to install lirc once, however, the kernel modules will need to be rebuilt after every kernel update.
sudo apt-get install lirc lirc-modules-source module-assistant
- NOTE: Some i2c remotes are supported directly by the kernel. If you are using a remote that would have used the i2c driver, check out the Managed I2C devices link below to use this instead.
- NOTE2: IR Blaster capability has been addeded for PVR-150 cards that have an on-card blaster jack. This is not intended for the USB-style blasters. This lirc install requires special lirc packages- see below
Configure lirc-modules-source
During the configuration of lirc-modules-source, you will choose the type of lirc device you are setting up.
sudo dpkg-reconfigure lirc-modules-source
You will be provided a screen with a bunch of information. Choose the okay button to move on. | |
Choose your module(s) that you will need. Some modules will need additional information about the device, such as serial transmitters or sir port adapters. >>PVR-150 on-card blaster: you will want to build the i2c and pvr150 modules | |
You will be given an option to build the modules. Be sure not to build the modules here. | |
You may be given an option to replace with a new version. Be sure to choose to Install the package maintainer's version. |
Modify /etc/lirc/hardware.conf
General note on configuration files: Ensure all config files are saved using Unix or Dos newline characters (i.e. including a LF character, not just CR (Mac format)), otherwise Lirc may claim they are not valid Modify /etc/lirc/hardware.conf.
sudo nano /etc/lirc/hardware.conf
Modify LOAD_MODULES=false to be LOAD_MODULES=true. Also, add your module to the line that is MODULES="". Your module is the name of the module you chose previously to build prefixed by lirc_. So for the mceusb driver, this would be lirc_mceusb. >>PVR-150 on-card blaster settings are: LIRCD_ARGS="--device=/dev/lirc0" >LOAD_MODULES=true >MODULES="lirc_dev lirc_pvr150" |
Build Lirc Modules
The lirc modules will need to be rebuilt every time that you update your kernel. Just follow these build steps every time you boot into a newer kernel for the first time.
- This step will grab the necessary headers to build the kernel modules:
sudo m-a update,prepare
- This will clean out any old lirc module builds:
sudo rm /usr/src/lirc*deb sudo m-a clean lirc
- This will build the kernel/install modules:
sudo m-a a-i lirc
- Update the modules list
sudo depmod -a
Create a lircd.conf
You have two options for how to create a lircd.conf. You may be able to find one already made for your device, or you may generate one yourself.
Using a premade lircd.conf
Find a lircd.conf used to represent the remote you will be using or emulating.
- A good place to start looking is the Lirc Website Remotes list.
- If you are using a MCEUSB or MCEUSB2 based remote, here is a lircd.conf for your remote:
- attachment:lircd.conf.mceusb
- If you are using a hauppauge remote with the i2c driver (including PVR-150 blaster), here is a lircd.conf for your remote:
- attachment:lircd.conf.hauppauge
Replace /etc/lirc/lircd.conf
with this lircd.conf that you have found:
# sudo cp <name of downloaded.conf> /etc/lirc
If you have found a remote, skip the next section. Otherwise, continue, and you will record a remote using irrecord.
Recording a Remote
Insert the module that you have just built and intend to record from. Example:
sudo modprobe lirc_mceusb
If this fails, it might be because the m-a ignored the special i2c module. Force it to load, then try the modprobe command again:
sudo dpkg -i /usr/src/lirc-modules-2.6.*.deb
- Record the remote using irrecord
sudo irrecord -d /dev/lirc0 lircd.conf
- Once you have completed your configuration, move this lircd.conf to /etc/lirc/lircd.conf
sudo mv lircd.conf /etc/lirc
Start Lirc & Test
The modules will load when you start lirc, if they aren't already loaded.
sudo /etc/init.d/lirc start irw
The terminal should 'appear' to hang, (not return a command prompt). Press buttons on your remote, you should see key presses then come up on the terminal. When your done, testing press <crtl> + 'c' to quit. If irw returns immediately, and gives you another command prompt some of your modules aren't loading correctly. Try rebooting your computer. If this doesn't work check dmesg for clues as to which module isn't loading. if you get:
sweet_user_name@ubuntu:~$ sudo /etc/init.d/lirc start Password:
You haven't created replaced the default lircd.conf read the above section on creating|lircd.conf
Create a .lircrc file
Standard Method
If you are intending on using lirc for only IR transmitting, you don't need to create a ~/.lircrc file. If you are going to use it for IR receiving, you will need to create a ~/.lircrc file describing what each of the buttons does for each application you will use lirc in. The basic syntax is as follows:
begin prog = PROGRAM button = REMOTE_BUTTON config = ACTION end
Where: PROGRAM is the program you are recording buttons for. Some examples for PROGRAM are mythtv, mplayer, xine, vlc, and irexec. REMOTE_BUTTON is the name of the button in accordance with what is listed in your /etc/lirc/lircd.conf. ACTION is the action that will be performed when this button is pressed. You can find a list of actions in the attached .lircrc example file.
- Here is the example lircrc taylored for several apps on a mceusb/mceusb2 remote:
- attachment:lircrc.mceusb
For a mceusb2 remote, you might need to change the button names from "chan-", "chan+", "vol-", "vol+" to "chandown", "chanup", "voldown", "volup".
- Here is the example lircrc taylored for mythtv only on a hauppauge remote:
- attachment:lircrc.hauppauge
Alternate configuration method - IRKick
If you're a KDE user, you may find it more convenient to set up functionality using irkick. This requires you already have your lircd.conf and hardware.conf set up, but you won't need an lircrc file if you take this approach. First, you'll need to install a couple packages:
sudo apt-get install lirc-x kdelirc
Next, start up IRKick - It's in the Utilities menu. IRKick contains extensions to easily setup the remotes functions with Amarok, Kaffeine, Noatun, and Konqueror, but can be made to perform any terminal command or dcop call. To add functionality for a button - just click add (on the right-hand side). To add a new mode for the remote, click on the left add and give it an appropriate name. Note: when adding a new mode, you'll also need to assign a button to switch to that mode. This allows you to have buttons do different things in different modes. Select the mode on the left before adding new functions for buttons. Click apply when you're done making changes, and that's it, no configuration files to play with :)
Specific Application lircrc Notes
Multiple applications can be listed in the .lircrc file, but you will need a seperate begin and end block for each button in each application.
- MythTV lircrc
If you are using this for mythtv, you will either need to create a standalone lircrc for mythtv in ~/.mythtv/lircrc
or create a symbolic link to this file and place all the lircrc related content in /.lircrc
.
- Creating a symbolic link. [ All mythtv buttons will need to be placed in
~/.lircrc
with the rest of the applications you use lirc for ]
ln -s ~/.lircrc ~/.mythtv/lircrc
- Creating a standalone file. [ All mythtv buttons will be placed in
~/.mythtv/lircrc
] - Here is an example using a mceusb/mceusb2 remote:
- attachment:lircrc.mythtv.mceusb
- Here is an example using a hauppauge remote:
- lircrc.mythtv.hauppauge
- IRexec
irexec is able to interpret keypresses and launch applications when the keys are pressed. The syntax is:
begin prog = irexec button = REMOTE_BUTTON config = APPLICATION end
APPLICATION is simply the path and name of a file marked executable.
Setting up two or more devices
After you have proven LIRC works with a single device, you can modify your scripts to include support for multiple devices. The first thing you will have to make sure you have kernel modules for the additional devices. If during the single device setup, you built modules for all the devices you thought you would need, you can skip the next step.
Build Additional Modules
- Clear our any old module builds
sudo rm /usr/src/lirc*deb sudo m-a clean lirc
- Stop lirc & unload any loaded modules.
sudo /etc/init.d/lirc stop sudo rmmod LOADED_LIRC_MODULES
- Replace LOADED_LIRC_MODULES with any lirc modules you have loaded.
- Reconfigure lirc-modules-source. Choose all modules you will need (including those previously chosen)
sudo dpkg-reconfigure lirc-modules-source
- Build/install the kernel modules
sudo m-a a-i lirc
- If you get a message that it won't reinstall an already installed version, you can force installation.
sudo dpkg -i /usr/src/lirc*deb
Modify Init Scripts
- Modify
/etc/lirc/hardware.conf
- Make sure that all of your modules are now added to the list of MODULES="". Take note of the order you provide these modules. This will be the order that lirc recognizes the devices, and important if you are going to need to differentiate between different lirc devices.
- Modify LIRCD_ARGS="" to match
LIRCD_ARGS="--device=/dev/lirc0 --output=/dev/lircd1 --pidfile=/var/run/lircd1.pid --listen" LIRCD2_ARGS="--device=/dev/lirc1 --output=/dev/lircd --pidfile=/var/run/lircd.pid --connect=localhost:8765"
- Modify
/etc/init.d/lirc
- Change this block:
LIRCD_ARGS=`build_args $LIRCD_ARGS` start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- $LIRCD_ARGS \ < /dev/null
To be:
LIRCD_ARGS=`build_args $LIRCD_ARGS` LIRCD2_ARGS=`build_args $LIRCD2_ARGS` start-stop-daemon --start --quiet --exec /usr/sbin/lircd -- $LIRCD_ARGS \ < /dev/null /usr/sbin/lircd $LIRCD2_ARGS \ < /dev/null
- If you have more then 2 LIRC devices, you will need to add additional blocks to
/etc/lirc/hardware.conf
and/etc/init.d/lirc
to connect to the main lirc process.
Test
- Start lirc
sudo /etc/init.d/lirc start
- You should have two lircd processes running. You will need to provide a parameter to any lirc process trying to interact with lircd now to indicate which lircd you want to interact with.
Additional Information
Supported Transmitting Devices
The following drivers have support for IR transmission:
- lirc_pvr150
- lirc_serial
- lirc_mceusb2
Managed I2C Devices
Ubuntu Edgy introduces support in the kernel to directly manage some remotes via the i2c bus. For remotes like this, the kernel is deprecating the use (and requirement) of lirc. You should be able to press keys on the remote and have them recognized as ordinary keyboard keys. If you don't like the way that the keypresses that are recognized for certain buttons on the remote, their behavior can be changed using Xmodmap. Alternatively, if you would like to still use lirc to manage your i2c device, hexion has written a howto explaining how to install lirc from source and replace the ir_common module in the kernel causing this behavior. See his howto here: HOWTO: Lirc in Edgy.
PVR-150 IR Transmitter
Packages
The PVR-150 IR Transmitter requires patches that have not yet been included in the upstream LIRC tree. These are packages hosted by me (Mario Limonciello <[email protected]>) that haven't been included in Edgy or Feisty yet.
- Add the following to the bottom of /etc/apt/sources.list:
#Mario's Lirc Repository deb http://people.atrpms.net/~mlimonciello/personal edgy lirc deb-src http://people.atrpms.net/~mlimonciello/personal edgy lirc
- Add the public key that I sign the packages with to apt-key.
wget http://people.atrpms.net/~mlimonciello/personal/80DF6D58.gpg -O- | sudo apt-key add -
- Update Your modules list
sudo apt-get update
- Install lirc as described above. Be sure to choose the lirc_i2c and lirc_pvr150 modules when building. above
PVR-150 firmware and codesets
You need to download the Hauppauge firmware and add the appropriate codeset to your lircd.conf for the device you want to control. The firmware can be found here. Download it and put it in ~+`/lib/firmware`+~ The codesets can be found here. This file contains the codesets for every device in the database. You will need to extract the information for the device you want to control, and append it to your /etc/lirc/lircd.conf -- but for now, just save it someplace safe. When you have downloaded and moved the firmware and have the codeset file, Reboot before continuing.
Adding the blaster codeset
You will need to determine the codeset of your device. To help you determine the possible codeset, consult the list here: here. Note that finding the correct codeset for your device can be tricky- but the master list can usually help you track them down by process of elimination. Once you have determined a codeset, you need to extract those codes from the master file you downloaded and add them to your /etc/lirc/lircd.conf as another remote. For example, to blast a Power Button a Motorola DCT6200 series cable box, you would use the POWER button raw code from codeset 85. If you are linking it to a key on your remote, you want to change the button name to the name reported by irw.
sudo nano /etc/lirc/lircd.conf
First, add the blaster header:
begin remote name blaster bits 32 flags RAW_CODES eps 0 aeps 0 plead 0 gap 333333 repeat_bit 0 begin raw_codes
Next, find the power button in codeset 85- since this is a cable box, it is prefixed in the master file as 0_85:
name 0_85_KEY_POWER 5570570
then make it conform to how irw reports the keypress- in this case, irw reports it as POWER, so that is what to name it:
name POWER 5570570
Keep adding your buttons (only the ones you want to control with the blaster). When you are finished, add:
end raw_codes end remote
to close out that remote definition. In this example, the entire remote definition for the power button only looks like:
begin remote name blaster bits 32 flags RAW_CODES eps 0 aeps 0 plead 0 gap 333333 repeat_bit 0 begin raw_codes name 0_85_KEY_POWER 5570570 end raw_codes end remote
After saving the new lircd.conf, restart lirc:
sudo /etc/init.d/lirc restart
and test it. In the example the command:
irsend SEND_ONCE blaster POWEROFF
turns the DCT6200 cable box on and off. Even if it does not control the device as intended, you should see the blaster flashing. Troubleshooting codeset selection, blaster placement, etc. is beyond the scope of this guide. A wealth of information is readily available via Google
MCEUSB2 IR Transmitter
Packages included in edgy-backports include support for the mceusb2 IR transmitter. Configuration is the same as standard serial transmitters.
Serial Receiver / Transmitter
If you are running the lirc_serial driver either for a transmitter or receiver, you will need to disable kernel serial support. There are two ways this can be achieved: Both ways depend on setserial, so install that first
sudo apt-get install setserial
First Method
- Credit to TechnoPenguin & TrubbleMaker from the forums, usring modprobe.conf
This can be achieved by editting /etc/modprobe.conf
and adding the following:
alias char-major-61 lirc_serial options lirc_serial irq=4 io=0x3f8 install lirc_serial /bin/setserial /dev/ttyS0 uart none ;\ /sbin/modprobe --ignore-install lirc_serial
This is for a typical machine using the primary serial port (/dev/ttyS0) and the standard IRQ and IO ports. If you are running on the secondary serial port, replace the device to be /dev/ttyS1 and the appropriate IRQ & IO ports.
Second Method
- Using the setserial debian configuration
sudo dpkg-reconfigure setserial
- Choose manual
- Modify /var/lib/setserial/autoserial.conf
- Add (or modify if its there already) (switch to ttyS1 if your using that instead)
/dev/ttyS0 uart none
- Copy that script to /etc/serial.conf
sudo cp /var/lib/setserial/autoserial.conf /etc/serial.conf
Rebuild Modules
If you ever need to rebuild your lirc modules for a new kernel version, here are the correct steps to follow:
sudo rm /usr/src/lirc*deb sudo m-a clean lirc sudo m-a update,prepare sudo m-a a-i lirc sudo depmod -a
You probably want to restart the lirc service afterwards:
sudo /etc/init.d/lirc restart