Please help me execute linux commands

kittysacattack

New Member
I want to setup my windows remote to control elisa media center. I have LIRC and elisa installed, and was looking at this tutorial on how to map the buttons to communicate with elisa. Below is the a segment of the tutorial i need help with:

Copy the generated elisa lircrc file (I renamed mine to elisa.lirc) to this directory: /usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc

Edit the lirc_input section of the elisa.conf file (in ~/.elisa/) so it looks like this:

[lirc:lirc_input]
# filename of the LIRC config map to use
lirc_rc = 'elisa.lirc'

My question is how do I copy the generated elisa lircrc file to the above specified directory. Also how do I open the elisa.conf file. My guess is its along the lines of sudo gedit elisa.conf?

Thank you very much for any help
 

tlarkin

VIP Member
~/ refers to your home directory. So in terminal do a pwd and make sure you are in your home directory, if not do a cd /home/username. Then do a ls -al and make sure that .elisa exists. Files that have a dot in front of them are typically hidden from the GUI so you can only see them from the terminal. If it doesn't exist you can use the touch command to create the file.

Then once you know it is there you can use gedit .elisa (as long as you are in the proper directory, remember see where pwd tells you are) or whatever editor you want to use, like nano or vi. vi is harder to use so I don't recommend that one with out some practice first, heck I get frustrated using vi. Then you can copy/paste that line in the file in terminal and then save it out.

Some Linux/Unix distros may not have a folder called home, some call it /Users instead. So look for either of those.
 

kittysacattack

New Member
I dont really understand what you are talking about. Is it possible you could just tell me what commands to execute so I can copy and pate them. Thanks - Michael
 

kittysacattack

New Member
I did tell you what commands to use they are in blue text....

I am at work and will try when i get home. Another tutorial explains:

The Elisa LIRC configuration file generated by mythbuntu generator is located in /home/user/.lirc/elisa.lirc when it should be copied into /usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc/

So I tried to copy elisa.lirc into the specified directory:
sudo cp /home/user/.lirc/elisa.lirc /usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc/

Then to check it was copied in there I did:
sudo gedit /usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc/
but it said "......... is just a directory"

Am I doing this completely wrong? If somebody has experience with this, can you please explain step by step how to connect my remote with Elisa. Thank you - Michael.
 

tlarkin

VIP Member
do you have python loaded on your rig?

OK, you left out some things in your initial post that didn't point me to this.

So the file you need is elisa.lirc and is located in your home directory. So if you need to copy and paste that line into that file do this first.

Code:
nano /home/user/.lirc/elisa.lirc

or 

gedit /home/user/.lirc/elisa.lirc

Both are terminal text based editors and you can use either or, it doesn't make a difference.

Then copy and paste that line of code in terminal when you are editing the file and then save it out. Now copy it to the right directory:

Code:
sudo cp /home/user/.lirc/elisa.lirc /usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc/
 

kittysacattack

New Member
do you have python loaded on your rig?

OK, you left out some things in your initial post that didn't point me to this.

So the file you need is elisa.lirc and is located in your home directory. So if you need to copy and paste that line into that file do this first.

Code:
nano /home/user/.lirc/elisa.lirc

or 

gedit /home/user/.lirc/elisa.lirc

Both are terminal text based editors and you can use either or, it doesn't make a difference.

Then copy and paste that line of code in terminal when you are editing the file and then save it out. Now copy it to the right directory:

Code:
sudo cp /home/user/.lirc/elisa.lirc /usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc/

I think your right, i probably dont have python. Ill try it when I get home, thanks a lot.
 

kittysacattack

New Member
Anthother queton, what is the point of running:
gedit /home/user/.lirc/elisa.lirc

Then copying, won't is just copy the file by runnning the second line you gave me?

Before I actually opened my elisa.lirc file and tried to drag and drop all the code in that file into

/usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc/

but that didnt work.
 

tlarkin

VIP Member
That is where it apparently (I have never ever used this) puts the configuration file which you need to copy over the python libraries? I am just figuring out what I can with what info you gave me.
 

kittysacattack

New Member
The last part of the tutorial is

Edit the lirc_input section of the elisa.conf file (in ~/.elisa/) so it looks like this:

[lirc:lirc_input]
# filename of the LIRC config map to use
lirc_rc = 'elisa.lirc'

do you know if I just copy and paste those lines in or do I need to replace those lines with something else. If so, would you happen to know what to put in there.

The actual tutorial from the start is from:
http://jaykinzer.blogspot.com/2008/02/setting-up-remote-control-lirc.html
 

Cromewell

Administrator
Staff member
gedit /home/user/.lirc/elisa.lirc

Just a small and simple thing... you are replacing user with your username right? If not the commands wont work. You should be able replace any reference your your directory (usually /home/<username>) with ~/ if for some bizzare reason you don't know your username or just don't want to type that all out..

I haven't used the app either so I'm really of no help beyond this :(
 

kittysacattack

New Member
Well im home now and checked that I do infact have python 2.5 installed. I tried creating a elisa.lirc file 2 ways, one by programming the buttons using irrecord, and another from mythbuntu lirc generator.

My bottom line problem is i cannot copy the file into
/usr/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc
because it says no such directory exists

Another tutorial says to paste it into
/usr/share/pyshared/elisa/plugins/lirc_plugin/data/lirc/
but I also get no such directory exist

Please help, thanks
 

kittysacattack

New Member
When I run:

sudo cp /home/kittysack/.lirc /kittysack/lib/python2.5/site-packages/elisa/plugins/lirc_plugin/data/lirc

I get

cp: omitting directory `/home/kittysack/.lirc'

Is that considered a successful copy?

I have elisa, elisa plugins good, bad, and ugly, and python 2.5
 

nivan

New Member
First you need modules for lirc loaded in order to start lircd process
To test lirc use mode2 command.If you see codes in console then your remote control works.
Next thing you need is /etc/lircd.conf for your remote control.You can find it in /lirc documents or some folder.If nothing then you can make it with irrecord /home/user/name_of_file.Then edit name of remote in this script and rename it to lircd.conf.Copy this file to /etc folder and restart lircd.
killall lircd
ps -A and if is dead
./lircd
Now when you got lircd.conf you can control programs with irexec or irkick aka kcmlirc (for kde).
To use irexec you will need to make .lircrc file in /home/user

Edit:
http://www.lirc.org/html/
Edit:
To see if your modules for your lirc device work use dmesg|grep lirc
You will have /dev/lirc and /dev/lirc0 nodes if kernel module works.
If you wanna know what module to load for your device give me your device id and vendor numbers and i will see it on google :)
Edit:
For all commands i writed you need to be root su user.
 
Last edited:

nivan

New Member
Oh hey i got question wrong.....it is elisa media player and not some elsa device :)
If you are on kde then just use irkick to control this program.Irkick supports remote control modes.You can set different modes with color buttons red,blue,yellow,green and then in every mode to control one program.
I think it is possible to configure irexec to bind program commands and start or kill this program.

Edit:
By the way i never used elisa player so idk how it works anyway.
 
Last edited:

tlarkin

VIP Member
It sounds like they are missing packages and they never answered my original question, of how exactly they installed it. If they used a package manager like apt to install it then it should have also downloaded and installed all needed repositories, but from the sounds of it it seems they are missing some python modules for this software.
 

tlarkin

VIP Member
Just a small and simple thing... you are replacing user with your username right? If not the commands wont work. You should be able replace any reference your your directory (usually /home/<username>) with ~/ if for some bizzare reason you don't know your username or just don't want to type that all out..

I haven't used the app either so I'm really of no help beyond this :(

~/ actually counts as the current user. So if you su, or sudo -s or something like that and then save your ~/Desktop you are actually saving to the root user's desktop.
 
Top