[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lirc and xawtv



On Wed, 9 May 2001 dgi_il@hotmail.com wrote:

> I am triyng to convince by brother to use linux for vieweing the TV, since
> it seems stupid he reboots the computer just to use a small program. I
> managed to use irexec to run xawtv when the POWER button is pressed. (which
> is better then the windows program, which can only be shut down from the
> remote control).
> 
> I used ~/.xsession, which runs irexec, and then start-kde. So this user has
> it's own "pid of irexec", and a second script with the first time it's runed
> it executes xawtv and writes a temp file, and the second time deletes that
> file and exit xawtv using xawtv-remote exit. So each time I press the button
> POWER irexec runs that script.
> 
> That is good, but the user has to be loged on (and only this user can do
> it). I wanted this to be global, the first idea was to make a user that will
> log in, and instead of running kde and all this stuff, it will just run
> xawtv, and when it exits the user will log off. Then I will use the remote
> control to log in as that user. I want to be 3-4 meter from the keyboard so
> inputing a passwod it's out of the question. There is a program which is
> called xrevent, which passes a keystroke to a window in X. But I need a
> string (for example tv\ntv\n to log in as "tv@localhost" using password
> "tv".
> 
> Then Tzfrir gave me a new idea. When I press the power button, it will open
> a new X session (in a new terminal) and from there run xawtv. I configured
> irexec for doing it, and run irexec /home/tv/.lircrc. This runs OK, for the
> first time, but when I exit xawtv, I get a terminal message "Terminated" and
> irxevent is killed. I dont know in when exactly. I also tried to put this
> line in /etc/X11/prefdm (in mandrake 7.2 it is a script, while in redhat 6
> it was a link to /usr/bin/gdm or kde or xdm, it was linked in boot if I
> remember). But it was never runed. I also directed the output of each
> program to some text files, and the last script was the only one not to
> redirect it's output.
> BTW: A good idea could be using fbtv intead of starting x and then xawtv,
> but then I need to boot into a framebuffer kernel, which is not bad, since I
> beed using it for while, but SVGAlib gets wierd when using fb kernels (hint
> hint matan...:), and I will not be able to play doom....

Actually my idea was that the other X server will be runing all the time
on a seperate console. If xawtv requires too much cpu cycles to run in
background (which I assume is the case) then maybe the script that
switches from the TV console to the normal X console should send SIGSTOP
to the xawtv process.

xdm seems to support more than 1 local X server, and I see no reason why
gdm and kdm won't.

This will mean that switching will take some time (swapping, unless you
have lots of memory), but other than that, no special resource consumption
is needed.

> 
> If anyone here has understand what I want, I would like to hear any
> suggestions, what can I do, (exept "deltree windows" since I have a winmodem
> that is still unsupported under linux), or even a new idea to this
> "problem".

-- 
Tzafrir Cohen
mailto:tzafrir@technion.ac.il
http://www.technion.ac.il/~tzafrir


=================================================================
To unsubscribe, send mail to linux-il-request@linux.org.il with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail linux-il-request@linux.org.il