Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Lirc [howto]
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Elvis-Gauss
n00b
n00b


Joined: 14 Jul 2005
Posts: 73

PostPosted: Fri Jul 29, 2005 10:13 am    Post subject: Lirc [howto] Reply with quote

I hope this guide will help you to get your remote control working.
There is a few steps.
1) Lirc compiling
go to /etc/make.conf and add LIRC_OPTS="--with-driver=pixelview_pro" If you are using that driver. You must know which driver you are using first.This is a list of avaible drivers

none, any, act200l, adaptec, animax, atilibusb, atiusb, audio, avermedia, avermedia_vdomate, avermedia98, bestbuy, bestbuy2, breakoutbox, bte, caraca, chronos, comX, creative_infracd, dsp, cph03x, cph06x,creative, devinput, dvico, ea65, exaudio, flyvideo, gvbctv5pci, hauppauge, hauppauge_dvb, hercules_smarttv_stereo,igorplugusb, imon, irdeo, irdeo_remote,irman, irreal, it87, knc_one, kworld,leadtek_0007, leadtek_0010, leadtek_pvr2000,livedrive_midi, livedrive_seq, logitech,lptX, mceusb, mediafocusI, mouseremote, mouseremote_ps2, mp3anywhere, packard_bell, parallel, pcmak, pcmak_usb, pctv, pixelview_bt878, pixelview_pak, pixelview_pro, provideo, realmagic, remotemaster, sa1100, sasem, serial, silitek, sir, slinke, streamzap, tekram, tekram_bt829, tira, tvbox, udp, uirt2, uirt2_raw

Find your driver and emerge lirc.
2) Copy the configuration file of your remote from http://lirc.sourceforge.net/remotes/ and put it in /etc/lircd.conf.
Don't worry if it isn't there... create it.

3) Modules.
You need to load some modules to have remote control working.
First you must add lircd to a runlevel.
Type rc-update add lircd default
and /etc/init.d/lircd start

Type modprobe -l and see if there are lirc_dev lirc_gpio lirc_serial.
I think it's enough to modprobe lirc_gpio and lirc_dev and add lirc_gpio and lirc_dev to default runlevel or /etc/modules.autoload.d/kernel-2.6
After modprobe lirc_gpio you must have /dev/lirc0 file.
type cat /dev/lirc0 and press a button to ensure your remote is responding on that device and it's working fine.

4) irexec program and lircrc file
This program is used by tvtime xmms, mplayer and other applications. irexec reads what you press on your remote, recognize it as a command and sends comands to the programs like tvtime and mplayer.
irexec reads a file named ~/.lircrc that knows what each button does. At first you must create this file and then you must fill it in this format:
begin
prog = ...
remote = ...
button = ...
repeat = ...
delay = ...
config = ...
mode = ...
flags = ...
end

you can read about it at /usr/share/doc/lirc-0.7.0-r1/html/configure.html or http://www.lirc.org/
IMPORTANT!
If you don't want to fill this manually you can go on tvtime website or mplayer website or xmms and there you can find an already filled document. For example go to http://tvtime.sourceforge.net/example.lircrc
You can copy that information in ~/.lircrc

5) Now you can start irexec.
If everything is ok there won't be connection error: Could not connect to the socket or something like this.
If there is such an error it means that one of lirc_dev lirc_gpio or lircd module isn't load properly.
First ensure that /etc/init.d/lircd is loaded without errors. Than ensure that there is /dev/lirc0 and it is your remote.
(cat /dev/lirc0 and press a button).
If the remote controller is a part of the tvtuner and the tuner's modules aren't loaded correctly for YOUR tuner then you might not be able to load some of the lirc modules (lirc_gpio for example)
I hope this will help you in lirc setup. I suppose I have some mistakes. Excuse me for those :wink:

Appendix:
IMPORTANT!!! For the newest lirc version the LIRC_OPTS option becomes deprecated. Use LIRC_DEVICES="<your> <lirc> <devices>"
To see the list of available devices type emerge -pv lirc

Apendix - ~/.lircrc configuration :
Often I wanted to control diferent programs with one RC (remote control) so I needed to define diferent modes for every program. This allows me not to trigger 2 or more actions of diferent programs with pressing one button. When I enter into mode "tvtime" I work only with the program tvtime and any other programs aren't affected, then I can change the mode and operate with another program... So the question is how to define the modes. The following is the template configuration I deemed using lirc.org documentation :)
It's recomended the mode buttons not to be used for anything other than turning a mode on :!: This could cause malfunction in switching the mode or weird consequences :D

#Making the default mode
begin
flags = startup_mode #this tells irexec that the default mode (startup) will be tvtime
mode = tvtime #the name of the mode - it's better to be the name of the program irexec controls
end

#How to start the mode called "tvtime"
begin
flags = mode
button = <button1> #a remote control button (chan+, vol+, etc.)
mode = tvtime
end
#How to start the mode called "mplayer"
begin
flags = mode
button = <button2> #a remote control button (chan+, vol+, etc.)
mode = mplayer
end

begin tvtime #begins a definition of mode called "tvtime"
begin
prog = irexec
button = POWER
config = tvtime &
config = tvtime-command QUIT
end
....... #other buttons' configurations
end tvtime #ends the definition of mode "tvtime"

begin mplayer #starts a definition of mode called "mplayer"
begin
button = 0
prog = mplayer
config = vo_ontop
repeat = 1
end
........... #other buttons' configurations
end mplayer #ends the definition of "mplayer" mode
_________________
When you think It can't be worse, well It can and usually It's worse than you've ever think it can.


Last edited by Elvis-Gauss on Wed Aug 23, 2006 11:19 am; edited 8 times in total
Back to top
View user's profile Send private message
nightmarez
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2004
Posts: 111
Location: FSV Mainz 05 ;)

PostPosted: Fri Jul 29, 2005 11:30 am    Post subject: Re: LIRC [HOWTO] Reply with quote

Elvis-Gauss wrote:

4) irexec program and lircrc file
This program is used by tvtime xmms, mplayer and other applications.

xmms. mplayer, xine, mythtv, etc has build in support for lirc (if you emerged them with lirc use flag) so you dont need irexec. just use:
Code:

begin
               remote = avertv
               button = power
               prog   = xine
               repeat = 0
               config = Quit
end

as an example. you only need irexec to start the application which can also be done with irkick when you use KDE.
Back to top
View user's profile Send private message
DetectiveInspekta
n00b
n00b


Joined: 27 Jun 2005
Posts: 58
Location: New Zealand

PostPosted: Fri Jul 29, 2005 2:06 pm    Post subject: Reply with quote

I get this errormessage

Code:

autoheader-2.59: WARNING: Using auxiliary files such as `acconfig.h', `config.h.bot'
autoheader-2.59: WARNING: and `config.h.top', to define templates for `config.h.in'
autoheader-2.59: WARNING: is deprecated and discouraged.
autoheader-2.59:
autoheader-2.59: WARNING: Using the third argument of `AC_DEFINE' and
autoheader-2.59: WARNING: `AC_DEFINE_UNQUOTED' allows to define a template without
autoheader-2.59: WARNING: `acconfig.h':
autoheader-2.59:
autoheader-2.59: WARNING:   AC_DEFINE([NEED_FUNC_MAIN], 1,
autoheader-2.59:                [Define if a function `main' is needed.])
autoheader-2.59:
autoheader-2.59: WARNING: More sophisticated templates can also be produced, see the
autoheader-2.59: WARNING: documentation.
configure.in:18: warning: do not use m4_patsubst: use patsubst or m4_bpatsubst
aclocal.m4:629: AM_CONFIG_HEADER is expanded from...
configure.in:18: the top level
configure.in:1111: warning: do not use m4_regexp: use regexp or m4_bregexp
aclocal.m4:642: _AM_DIRNAME is expanded from...
configure.in:1111: the top level
 
and further down

Building modules, stage 2.
make -rR -f /usr/src/linux-2.6.11-gentoo-r3/scripts/Makefile.modpost
  scripts/mod/modpost -m  -i /usr/src/linux-2.6.11-gentoo-r3/Module.symvers /var/tmp/portage/lirc-0.7.0-r1/work/lirc-0.7.0/drivers/lirc_dev/lirc_dev.o
/bin/sh: line 1: scripts/mod/modpost: No such file or directory
make[5]: *** [__modpost] Error 127
make[4]: *** [modules] Error 2
make[4]: Leaving directory `/usr/src/linux-2.6.11-gentoo-r3'
make[3]: *** [lirc_dev.o] Error 2
make[3]: Leaving directory `/var/tmp/portage/lirc-0.7.0-r1/work/lirc-0.7.0/drivers/lirc_dev'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/lirc-0.7.0-r1/work/lirc-0.7.0/drivers'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/lirc-0.7.0-r1/work/lirc-0.7.0'
make: *** [all] Error 2

!!! ERROR: app-misc/lirc-0.7.0-r1 failed.
!!! Function src_compile, Line 118, Exitcode 2
!!! (no error message)
!!! If you need support, post the topmost build error, NOT this status message


any ideas, I have a pvr-350
Back to top
View user's profile Send private message
nightmarez
Tux's lil' helper
Tux's lil' helper


Joined: 17 May 2004
Posts: 111
Location: FSV Mainz 05 ;)

PostPosted: Fri Jul 29, 2005 2:08 pm    Post subject: Reply with quote

is your remote control recognized by you kernel?
Back to top
View user's profile Send private message
Elvis-Gauss
n00b
n00b


Joined: 14 Jul 2005
Posts: 73

PostPosted: Fri Jul 29, 2005 4:03 pm    Post subject: Reply with quote

It's possible lirc does not support this remote :(
I can't find it at list of supported remotes
http://lirc.sourceforge.net/remotes/
_________________
When you think It can't be worse, well It can and usually It's worse than you've ever think it can.
Back to top
View user's profile Send private message
Maedhros
Bodhisattva
Bodhisattva


Joined: 14 Apr 2004
Posts: 5511
Location: Durham, UK

PostPosted: Fri Jul 29, 2005 4:08 pm    Post subject: Reply with quote

Moved from Multimedia to Documentation, Tips & Tricks.
_________________
No-one's more important than the earthworm.
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Fri Jul 29, 2005 4:21 pm    Post subject: Reply with quote

DetectiveInspekta,

Is the kernel in /usr/src/linux configured and built ?
Configure it with make xconfig ( or whatever you like ), build with make bzImage && make modules and try again.
Back to top
View user's profile Send private message
DetectiveInspekta
n00b
n00b


Joined: 27 Jun 2005
Posts: 58
Location: New Zealand

PostPosted: Mon Aug 01, 2005 1:16 am    Post subject: Reply with quote

I think so, I have used genkernal so I think its done already
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Mon Aug 01, 2005 7:35 am    Post subject: Reply with quote

Well - make sure of it - if not there will be no /usr/src/linux/scripts/mod/modpost and packages in portage that contain kernel modules will not build correcly.

Do you have the file /usr/src/linux/scripts/mod/modpost ?
Back to top
View user's profile Send private message
Mental
n00b
n00b


Joined: 04 Oct 2004
Posts: 45
Location: Estonia

PostPosted: Mon Aug 01, 2005 8:18 am    Post subject: Reply with quote

Elvis-Gauss wrote:
It's possible lirc does not support this remote :(
I can't find it at list of supported remotes
http://lirc.sourceforge.net/remotes/


In my humble opinion, this is NOT a final list of supported remotes, but just a list configuration files mapping the buttons of different remote controls. I didn't find my remote there, but i used irrecord to create such config for myself. Yesterday, I even submitted it to the e-mail address provided, so my Sony remote might just show up there some fine day. :)
Back to top
View user's profile Send private message
DetectiveInspekta
n00b
n00b


Joined: 27 Jun 2005
Posts: 58
Location: New Zealand

PostPosted: Mon Aug 01, 2005 10:18 am    Post subject: Reply with quote

IvanYosifov wrote:
Well - make sure of it - if not there will be no /usr/src/linux/scripts/mod/modpost and packages in portage that contain kernel modules will not build correcly.

Do you have the file /usr/src/linux/scripts/mod/modpost ?

Yep there is modpost.c and modpost.h
Back to top
View user's profile Send private message
IvanYosifov
l33t
l33t


Joined: 15 Oct 2004
Posts: 778
Location: Bulgaria

PostPosted: Mon Aug 01, 2005 10:33 am    Post subject: Reply with quote

These are the sources modpost is built from.
I meant - is the binary there ? The binary is named "modpost", no suffixes.
Back to top
View user's profile Send private message
benow
Tux's lil' helper
Tux's lil' helper


Joined: 02 Jun 2003
Posts: 84

PostPosted: Thu Sep 01, 2005 11:49 pm    Post subject: Reply with quote

I emerged using
Code:
LIRC_OPTS="--with-driver=serial"
and mod_serial and mod_dev are loaded on modprobe mod_serial. mod_gpio does not exist (is that the pixelview_pro module?), and on modprobe lir_serial no /dev/lirc0 is created. I've been trying to get this going for days with no luck. Any suggestions?

EDIT:
Following in /etc/modules.d/lirc did it
Code:
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


followed by modules-update.
Back to top
View user's profile Send private message
Headrush
Watchman
Watchman


Joined: 06 Nov 2003
Posts: 5597
Location: Bizarro World

PostPosted: Tue Nov 22, 2005 11:39 pm    Post subject: Reply with quote

I have an saa7134 based tv card and the remote is supported. When I compile lirc, it finishes but i get these messages:
Code:
WARNING: //lib/modules/2.6.14-gentoo-r2/misc/lirc_gpio.ko needs unknown symbol bttv_read_gpio
WARNING: //lib/modules/2.6.14-gentoo-r2/misc/lirc_gpio.ko needs unknown symbol bttv_get_cardinfo
WARNING: //lib/modules/2.6.14-gentoo-r2/misc/lirc_gpio.ko needs unknown symbol bttv_get_gpio_queue
WARNING: //lib/modules/2.6.14-gentoo-r2/misc/lirc_gpio.ko needs unknown symbol bttv_write_gpio
WARNING: //lib/modules/2.6.14-gentoo-r2/misc/lirc_gpio.ko needs unknown symbol bttv_gpio_enable

Does this mean I have to compile the bttv module into my kernel even though my tv card isn't based on that chipset?
Back to top
View user's profile Send private message
Izydorr
n00b
n00b


Joined: 10 Sep 2004
Posts: 45
Location: Poland / Warsaw

PostPosted: Tue Feb 07, 2006 12:25 pm    Post subject: Reply with quote

I will join to the above question because I have exactly the same problem.
Back to top
View user's profile Send private message
feiner
n00b
n00b


Joined: 12 May 2005
Posts: 1

PostPosted: Sat Mar 11, 2006 6:53 pm    Post subject: Reply with quote

Hello, at the above two posters you need to compile the mentioned symbols into your kernel or as modules easiest way is cd /usr/src/linux nano .config and ^w then type the name then recompile your kernel and modules. Or you could use whatever editor you wanna use i suppose. Now on to my quick question, how exactly would i fill in the LIRC_OPTS line if I wanna make 2 drivers namely the hauppauge and creative live drive ones? I've tried putting --with_driver=hauppauge --with_driver=creative_livedrive in the same LIRC_OPTS quotes along with many other things but I can't seem to get both working at the same time I can get each one working seperately though.
Back to top
View user's profile Send private message
dreadhead
Guru
Guru


Joined: 09 Jul 2004
Posts: 470
Location: Ulm - Germany

PostPosted: Tue Mar 28, 2006 7:34 am    Post subject: Reply with quote

Hello!

Does anyone know which driver I have to use for the internal IrDA connector on my (ASUS) Mainboard?

For the PVR-350 and I think all other Hauppauge-Cards except the Ir-Blaster on the new PVR-150:
Try a different lircd-version. I had compile problems with 0.7.x but it works great with 0.8.x. Also make sure that in your kernel under Device Drivers -> I2C -> Bit-banging Interface is enabled.
cd /usr/src/linux
make menuconfig
(Enable I2C support and recompile and install the kernel)

LIRC_OPTS="--with-driver=hauppauge"
_________________
Kopete OTR Plugin
Back to top
View user's profile Send private message
DrDoverylittle
n00b
n00b


Joined: 15 Oct 2004
Posts: 41

PostPosted: Thu Jul 27, 2006 3:12 am    Post subject: Reply with quote

I have a question concerning using the remote with different applications.

I see in the config file ~/.lircrc you can specify behaviour for different applications,
but when you have more than one application open at once, say for example
xmms and mythtv, do both programs get the remote button presses or only the app in focus ?
Is there some way to configure the remote to so that the remote button presses only go to a specified app,
i.e. on my Hauppauge remote i have TV,Video,Music,Pictures, etc buttons accross the top,
i would like to configure it so that when TV is pressed, mythtv receives further button presses and when
Video is pressed, mplayer gets the button presses and when Music is pressed, xmms gets the button presses.

This seems more like the usual mutli-prepose remote behaviour.
How can this be done ?
Back to top
View user's profile Send private message
Elvis-Gauss
n00b
n00b


Joined: 14 Jul 2005
Posts: 73

PostPosted: Wed Aug 23, 2006 8:03 am    Post subject: Reply with quote

I think you can define different modes for the RC. Find example files and some documentation for irexec or .lircrc and see how it works. If you are using KDE you can use "KDE lirc server" : Contol Center -> Peripherals -> Remote Controls
_________________
When you think It can't be worse, well It can and usually It's worse than you've ever think it can.
Back to top
View user's profile Send private message
Elvis-Gauss
n00b
n00b


Joined: 14 Jul 2005
Posts: 73

PostPosted: Wed Aug 23, 2006 10:54 am    Post subject: Reply with quote

I added .lircrc howto above in the apendix. I hope it works fine. I'll try to fix some problems when they accure
_________________
When you think It can't be worse, well It can and usually It's worse than you've ever think it can.
Back to top
View user's profile Send private message
Izydorr
n00b
n00b


Joined: 10 Sep 2004
Posts: 45
Location: Poland / Warsaw

PostPosted: Wed Aug 23, 2006 8:15 pm    Post subject: Reply with quote

DrDoverylittle I think I have exactly what You ask for. I use my remote to control few apps. Below is my .lircrc file, You should be able to get the idea from it.

Code:

################# any(global) ################

begin
    remote = pixelviewp
    prog = irexec
    button = source
    mode = select
end

################# select ################
begin select
begin
    remote = pixelviewp
    prog = irexec
    button = 1
    mode = tvtime
    config = xmessage -center -timeout 1 "\n\n   ***   TV   ***   \n\n" &
end
begin
    remote = pixelviewp
    prog = irexec
    button = 2
    mode = mplayer
    config = xmessage -center -timeout 1 "\n\n   ***   VIDEO   ***   \n\n" &
end
begin
    remote = pixelviewp
    prog = irexec
    button = 3
    mode = xmms
    config = xmessage -center -timeout 1 "\n\n   ***   MUZYKA   ***   \n\n" &
end
begin
    remote = pixelviewp
    prog = irexec
    button = 4
    mode = gqview
    config = xmessage -center -timeout 1 "\n\n   ***   ZDJÊCIA   ***   \n\n" &
end
begin
    remote = pixelviewp
    prog = irexec
    button = 0
    mode = system
    config = xmessage -center -timeout 1 "\n\n   ***   SYSTEM   ***   \n\n" &
end
end select

################# mplayer ################
begin mplayer
begin
    remote = pixelviewp
    prog = mplayer
    button = power
    config = quit
end
begin
    remote = pixelviewp
    prog = mplayer
    button = function
    config = pause
end
begin
    remote = pixelviewp
    prog = mplayer
    button = vol+
    config = volume 1
    repeat = 100
end
begin
    remote = pixelviewp
    prog = mplayer
    button = vol-
    config = volume -1
    repeat = 100
end
begin
    remote = pixelviewp
    prog = mplayer
    button = ch+
    config = pt_step 1
end
begin
    remote = pixelviewp
    prog = mplayer
    button = ch-
    config = pt_step -1
end
begin
    remote = pixelviewp
    prog = mplayer
    button = zoom
    config = vo_fullscreen
end
begin
    remote = pixelviewp
    prog = mplayer
    button = 1
    config = seek -10
end
begin
    remote = pixelviewp
    prog = mplayer
    button = 4
    config = seek -60
end
begin
    remote = pixelviewp
    prog = mplayer
    button = 3
    config = seek 10
end
begin
    remote = pixelviewp
    prog = mplayer
    button = 6
    config = seek 60
end
begin
    remote = pixelviewp
    prog = mplayer
    button = 7
    config = audio_delay +0.1
end
begin
    remote = pixelviewp
    prog = mplayer
    button = 9
    config = audio_delay -0.1
end
begin
    remote = pixelviewp
    prog = mplayer
    button = freeze
    config = gui_play
    config = gui_stop
end
end mplayer

################# tvtime ################

begin tvtime
begin
    remote = pixelviewp
    prog = irexec
    button = power
    config = tvtime &
    config = tvtime-command quit
end
begin
    remote = pixelviewp
    prog = irexec
    button = 1
    repeat = 2
    config = tvtime-command channel_1
end
begin
    remote = pixelviewp
    prog = irexec
    button = 2
    repeat = 2
    config = tvtime-command channel_2
end
begin
    remote = pixelviewp
    prog = irexec
    button = 3
    repeat = 2
    config = tvtime-command channel_3
end
begin
    remote = pixelviewp
    prog = irexec
    button = 4
    repeat = 2
    config = tvtime-command channel_4
end
begin
    remote = pixelviewp
    prog = irexec
    button = 5
    repeat = 2
    config = tvtime-command channel_5
end
begin
    remote = pixelviewp
    prog = irexec
    button = 6
    repeat = 2
    config = tvtime-command channel_6
end
begin
    remote = pixelviewp
    prog = irexec
    button = 7
    repeat = 2
    config = tvtime-command channel_7
end
begin
    remote = pixelviewp
    prog = irexec
    button = 8
    repeat = 2
    config = tvtime-command channel_8
end
begin
    remote = pixelviewp
    prog = irexec
    button = 9
    repeat = 2
    config = tvtime-command channel_9
end
begin
    remote = pixelviewp
    prog = irexec
    button = 0
    repeat = 2
    config = tvtime-command channel_0
end
begin
    remote = pixelviewp
    prog = irexec
    button = zoom
    config = tvtime-command toggle_fullscreen
end
begin
    remote = pixelviewp
    prog = irexec
    button = loop
    config = tvtime-command channel_jump
end
begin
    remote = pixelviewp
    prog = irexec
    button = chan+
    repeat = 100
    config = tvtime-command channel_up
end
begin
    remote = pixelviewp
    prog = irexec
    button = chan-
    repeat = 100
    config = tvtime-command channel_down
end
begin
    remote = pixelviewp
    prog = irexec
    button = vol+
    repeat = 100
    config = tvtime-command mixer_up
end
begin
    remote = pixelviewp
    prog = irexec
    button = vol-
    repeat = 100
    config = tvtime-command mixer_down
end
begin
    remote = pixelviewp
    prog = irexec
    button = mute
    config = tvtime-command mixer_toggle_mute
end
begin
    remote = pixelviewp
    prog = irexec
    button = function
    config = tvtime-command picture
end
begin
    remote = pixelviewp
    prog = irexec
    button = fn+
    repeat = 100
    config = tvtime-command picture_up
end
begin
    remote = pixelviewp
    prog = irexec
    button = fn-
    repeat = 100
    config = tvtime-command picture_down
end
begin
    remote = pixelviewp
    prog = irexec
    button = freeze
    config = tvtime-command screenshot
end
end tvtime

################# xmms ################

begin xmms
begin
    remote = pixelviewp
    prog = irexec
    button = power
    config = xmms &
end
begin
    remote = pixelviewp
    prog = xmms
    button = power
    config = quit
end
begin
    remote = pixelviewp
    prog = xmms
    button = 2
    config = play
    config = stop
end
begin
    remote = pixelviewp
    prog = xmms
    button = 1
    config = bwd
    repeat = 100
end
begin
    remote = pixelviewp
    prog = xmms
    button = 3
    config = fwd
    repeat = 100
end
begin
    remote = pixelviewp
    prog = xmms
    button = chan+
    config = next
end
begin
    remote = pixelviewp
    prog = xmms
    button = chan-
    config = prev
end
begin
    remote = pixelviewp
    prog = xmms
    button = vol+
    config = vol_up
    repeat = 100
end
begin
    remote = pixelviewp
    prog = xmms
    button = vol-
    config = vol_down
    repeat = 100
end
begin
    remote = pixelviewp
    prog = xmms
    button = function
    config = playpause
end
begin
    remote = pixelviewp
    prog = xmms
    button = loop
    config = repeat
end
begin
    remote = pixelviewp
    prog = xmms
    button = scan
    config = shuffle
end
end xmms

################# zdjecia ################

begin gqview
begin
    remote = pixelviewp
    prog   = irxevent
    button = power
    config = Key ctrl-q GQview
end
begin
    prog   = irxevent
    remote = pixelviewp
    button = zoom
    config = Key v GQview
end
begin
    prog   = irxevent
    remote = pixelviewp
    button = fn+
    repeat = 5
config = Key Prior GQview
end
begin
    prog   = irxevent
    remote = pixelviewp
    button = reset
    config = Key Home GQview
end
begin
    prog   = irxevent
    remote = pixelviewp
    button = fn-
    config = Key End GQview
end
begin
    prog   = irxevent
    remote = pixelviewp
    button = freeze
    repeat = 5
    config = Key Next GQview
end
begin
    prog   = irxevent
    button = 1
    repeat = 5
    config = Key 1 GQview
end
begin
    prog   = irxevent
    button = 4
    repeat = 5
    config = Key minus GQview
end
begin
    prog   = irxevent
    button = 5
    repeat = 5
    config = Key KP_Multiply GQview
end
begin
    prog   = irxevent
    button = 6
    repeat = 5
    config = Key plus GQview
end
begin
    prog   = irxevent
    button = 2
    config = Key bracketleft GQview
end
begin
    prog   = irxevent
    button = 3
    config = Key bracketright GQview
end
begin
    prog   = irxevent
    button = function
    config = Key s GQview
end
end gqview

################# system ################
begin system
begin
    remote = pixelviewp
    prog = irexec
    button = power
    config = sudo /sbin/shutdown -h now
end
begin
    remote = pixelviewp
    prog = irexec
    button = tv/fm
    config = ~/bin/shutdown_30 &
    config = ~/bin/shutdown_60 &
    config = ~/bin/shutdown_120 &
    config = ~/bin/shutdown_anuluj &
end
begin
    remote = pixelviewp
    prog = irexec
    button = scan
    config = ~/bin/shutdown_anuluj &
end
end system


I use one key to switch modes. I press the key and then press "1" to control tvtime, "2" to control mplayer and so on.
Back to top
View user's profile Send private message
Elvis-Gauss
n00b
n00b


Joined: 14 Jul 2005
Posts: 73

PostPosted: Mon Sep 18, 2006 4:29 pm    Post subject: Reply with quote

Well, here is my .lircrc file. It shows which mode is turned on and has some extra features :)
If you want to get it work you must install xosd :) This program is used to display the mode's name on the center of the screen.
If you want to see the other avaible fonts emerge xfontsel.
Have fun :) 8) :twisted:

# MODES' DEINITIONS
begin
flags = startup_mode
mode = tvtime
end

begin
prog = irexec
button = source
config = osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end

begin
prog = irexec
flags = mode
mode = select
button = scan
config = echo "Select" > .mode_status && osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end

begin select
begin
prog = irexec
flags = quit
button = 1
mode = tvtime
config = echo "TvTime" > .mode_status && osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end
begin
prog = irexec
flags = quit
button = 2
mode = mplayer
config = echo "MPlayer" > .mode_status && osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end
begin
prog = irexec
flags = quit
button = 3
mode = amarok
config = echo "AmaroK" > .mode_status && osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end
begin
prog = irexec
flags = quit
button = 4
mode = kopete
config = echo "Kopete" > .mode_status && osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end
begin
prog = irexec
flags = quit
button = 0
mode = volume
config = echo "Volume" > .mode_status && osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end
begin
prog = irexec
flags = quit
button = function
mode = system
config = echo "System" > .mode_status && osd_cat -p middle -A center -f "-*-times-bold-r-*-*-40-*-100-100-*-*-*-*" -c blue -d 1 -s 1 .mode_status
end
end select

begin system

begin
prog = irexec
button = fn+
config = poweroff
end

begin
prog = irexec
button = fn-
config = reboot
end

end system

# Main Volume

begin volume
begin
prog = irexec
button = 1
config = dcop kicker Mixer0 increaseVolume 0
end
begin
prog = irexec
button = 2
config = dcop kicker Mixer0 increaseVolume 1
end
begin
prog = irexec
button = 3
config = dcop kicker Mixer0 increaseVolume 6
end
begin
prog = irexec
button = 1
config = dcop kicker Mixer0 increaseVolume 0
end
begin
prog = irexec
button = 2
config = dcop kicker Mixer0 increaseVolume 1
end
begin
prog = irexec
button = 3
config = dcop kicker Mixer0 increaseVolume 6
end
begin
prog = irexec
button = 4
config = dcop kicker Mixer0 decreaseVolume 0
end
begin
prog = irexec
button = 5
config = dcop kicker Mixer0 decreaseVolume 1
end
begin
prog = irexec
button = 6
config = dcop kicker Mixer0 decreaseVolume 6
end
begin
prog = irexec
button = 4
config = dcop kicker Mixer0 decreaseVolume 0
end
begin
prog = irexec
button = 5
config = dcop kicker Mixer0 decreaseVolume 1
end
begin
prog = irexec
button = 6
config = dcop kicker Mixer0 decreaseVolume 6
end
begin
prog = irexec
button = mute
config = dcop kicker Mixer0 toggleMute 0
end

end volume
# KOPETE

begin kopete
begin
prog = irexec
button = freeze
config = dcop kopete mainWindow show

end
begin
prog = irexec
button = reset
config = dcop kopete mainWindow hide

end
begin
prog = irexec
button = fn+
config = dcop kopete KopeteChatWindow show

end
begin
prog = irexec
button = fn-
config = dcop kopete KopeteChatWindow hide

end
begin
prog = irexec
button = 1
config = dcop kopete KopeteIface setAway "Switched to away by the RC"
end
begin
prog = irexec
button = function
config = dcop kopete KopeteIface setAvailable
end
begin
prog = irexec
button = chan+
config = dcop kopete KopeteIface connectAll
end
begin
prog = irexec
button = chan-
config = dcop kopete KopeteIface disconnectAll
end
end kopete

# AMAROK

begin amarok
begin
prog = irexec
button = function
config = dcop amarok player pause
end
begin
prog = irexec
button = reset
config = dcop amarok player play
end
begin
prog = irexec
button = mute
config = dcop amarok player mute
end
begin
prog = irexec
button = fn+
config = dcop amarok player next
end
begin
prog = irexec
button = fn-
config = dcop amarok player prev
end
begin
prog = irexec
button = vol+
config = dcop amarok player volumeUp
end
begin
prog = irexec
button = vol-
config = dcop amarok player volumeDown
end
begin
prog = irexec
button = freeze
config = dcop amarok player stop
end
begin
prog = irexec
button = chan+
config = dcop amarok player enableRepeatTrack 1
end
begin
prog = irexec
button = chan-
config = dcop amarok player enableRepeatTrack 0
end
begin
prog = irexec
button = +100
config = dcop amarok player showOSD
end

begin
prog = irexec
button = tv/fm
config = dcop amarok MainApplication-Interface quit
end
begin
prog = irexec
button = power
config = amarok
end
end amarok




# The following defines most of the common buttons found on a remote and
# what commads they would map to inside tvtime.

begin tvtime
begin
prog = irexec
button = POWER
config = tvtime &
config = tvtime-command QUIT
end

begin
prog = irexec
button = +100
config = tvtime-command SCREENSHOT
end

begin
prog = irexec
button = tv/fm
config = tvtime-command DISPLAY_INFO
repeat = 1
end
begin
prog = irexec
button = ZOOM
config = tvtime-command TOGGLE_FULLSCREEN
end
begin
prog = irexec
button = MUTE
config = tvtime-command TOGGLE_MUTE
repeat = 0
end

# Menu navigation.
begin
prog = irexec
button = CHAN+
config = tvtime-command UP
repeat = 0
end
begin
prog = irexec
button = CHAN-
config = tvtime-command DOWN
repeat = 0
end
#####VOLUME UP 3 TIMES
begin
prog = irexec
button = VOL+
config = tvtime-command RIGHT
repeat = 1
end
begin
prog = irexec
button = VOL+
config = tvtime-command RIGHT
repeat = 1
end
begin
prog = irexec
button = VOL+
config = tvtime-command RIGHT
repeat = 1
end

begin
prog = irexec
button = VOL-
config = tvtime-command LEFT
repeat = 1
end
begin
prog = irexec
button = VOL-
config = tvtime-command LEFT
repeat = 1
end
begin
prog = irexec
button = VOL-
config = tvtime-command LEFT
repeat = 1
end
####END SOUND CONFIG
begin
prog = irexec
button = LOOP
config = tvtime-command CHANNEL_JUMP
repeat = 1
end

begin
prog = irexec
button = 1
config = tvtime-command CHANNEL_1
end
begin
prog = irexec
button = 2
config = tvtime-command CHANNEL_2
end
begin
prog = irexec
button = 3
config = tvtime-command CHANNEL_3
end
begin
prog = irexec
button = 4
config = tvtime-command CHANNEL_4
end
begin
prog = irexec
button = 5
config = tvtime-command CHANNEL_5
end
begin
prog = irexec
button = 6
config = tvtime-command CHANNEL_6
end
begin
prog = irexec
button = 7
config = tvtime-command CHANNEL_7
end
begin
prog = irexec
button = 8
config = tvtime-command CHANNEL_8
end
begin
prog = irexec
button = 9
config = tvtime-command CHANNEL_9
end
begin
prog = irexec
button = 0
config = tvtime-command CHANNEL_0
end
end tvtime


##### MPLAYER CONFIGURATION
begin mplayer

begin
prog = irexec
button = power
config = mplayer ~/Cinema/*
end

begin
button = 1
prog = mplayer
config = contrast 10
repeat = 1
end
begin
button = 2
prog = mplayer
config = contrast -10
repeat = 1
end

begin
button = 4
prog = mplayer
config = gamma 10
repeat = 1
end
begin
button = 5
prog = mplayer
config = gamma -10
repeat = 1
end
begin
button = 7
prog = mplayer
config = brightness 10
repeat = 1
end
begin
button = 8
prog = mplayer
config = brightness -10
repeat = 1
end
begin
button = zoom
prog = mplayer
config = vo_fullscreen
repeat = 1
end
begin
button = vol+
prog = mplayer
config = volume 1
repeat = 1
end
begin
button = vol-
prog = mplayer
config = volume -1
repeat = 1
end
begin
button = fn+
prog = mplayer
config = seek +10
repeat = 1
end
begin
button = fn-
prog = mplayer
config = seek -10
repeat = 1
end

begin
button = tv/fm
prog = mplayer
config = quit
repeat = 1
end
begin
button = reset
prog = mplayer
config = seek -500
repeat = 1
end
begin
button = freeze
prog = mplayer
config = seek 500
repeat = 1
end

begin
button = mute
prog = mplayer
config = mute
end

begin
button = function
prog = mplayer
config = pause
end

end mplayer
_________________
When you think It can't be worse, well It can and usually It's worse than you've ever think it can.
Back to top
View user's profile Send private message
marco007
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2005
Posts: 99

PostPosted: Thu Sep 21, 2006 7:13 am    Post subject: Reply with quote

i have kworld global tv treminator (saa7134 card=65 tuner=54)
how to i get lirc work?
_________________
e6400@3.6Ghz,Gigabyte MB
6800GS+Zalman,Audigy2
Gentoo+2.6.18-r5
Back to top
View user's profile Send private message
dreadhead
Guru
Guru


Joined: 09 Jul 2004
Posts: 470
Location: Ulm - Germany

PostPosted: Thu Sep 21, 2006 3:52 pm    Post subject: Reply with quote

marco007 wrote:
i have kworld global tv treminator (saa7134 card=65 tuner=54)
how to i get lirc work?


by following the howto on the top of this thread.
_________________
Kopete OTR Plugin
Back to top
View user's profile Send private message
marco007
Tux's lil' helper
Tux's lil' helper


Joined: 03 Apr 2005
Posts: 99

PostPosted: Fri Sep 22, 2006 5:49 am    Post subject: Reply with quote

dreadhead wrote:
marco007 wrote:
i have kworld global tv treminator (saa7134 card=65 tuner=54)
how to i get lirc work?


by following the howto on the top of this thread.

http://lirc.sourceforge.net/remotes/
ther`s only kworld-878 conf :roll:
_________________
e6400@3.6Ghz,Gigabyte MB
6800GS+Zalman,Audigy2
Gentoo+2.6.18-r5
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum