Caller ID alternate using xyac

Version 1 (Transverse, 05/08/2012 02:26 am)

1 1
h1. Caller ID Display, alternate, using xyac.
2 1
3 1
This is based on [[Caller ID displayed on your LinHES screen]] but uses xyac to overlay text on the X11 window.  The benefit of this is that it will display the caller id information, not just during playback, but also when viewing menus etc. 
4 1
5 1
Tested under R6.02
6 1
7 1
Follow the procedure at [[Caller ID displayed on your LinHES screen]], but when it comes to editing /etc/sv/ncid/run, change it to this instead:
8 1
9 1
<pre>
10 1
#!/bin/sh
11 1
exec 2>&1
12 1
export TERM=linux
13 1
. /etc/rc.conf
14 1
. /etc/rc.d/functions
15 1
16 1
svwaitup -s 3 /var/service/ncidd || exit 1
17 1
18 1
which ncid 2>/dev/null >/dev/null
19 1
20 1
if [ $? = 0 ]
21 1
then
22 1
    if [ -f /var/service/ncidd/run ]
23 1
    then
24 1
        sv start ncidd
25 1
    fi
26 1
27 1
    stat_runit "Starting callerid client"
28 1
29 1
    exec /usr/bin/ncid --no-gui --message --call-prog --program ncid-yac
30 1
fi
31 1
32 1
</pre>
33 1
34 1
This uses ncid-yac along with xyac, instead of using ncid-mythtv.
35 1
36 1
Now, the additional steps...
37 1
ncid-yac needed to be modified slightly, as it wasn't stopping on its own and wasn't sending until it was stopped.
38 1
<pre>
39 1
sudo nano /usr/share/ncid/ncid-yac
40 1
</pre>
41 1
42 1
This line:
43 1
<pre>
44 1
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -w1 $YACCLIENT $YACPORT
45 1
</pre>
46 1
47 1
Needs to change to:
48 1
<pre>
49 1
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -c $YACCLIENT $YACPORT
50 1
</pre>
51 1
52 1
So now, instead of waiting for a timeout, nc just sends and closes. That timeout never happened on my system, so the yac messages were only occurring on shutdown.
53 1
54 1
55 1
56 1
ncid-yac depends on netcat. So install netcat:
57 1
<pre>
58 1
sudo pacman -S gnu-netcat
59 1
</pre>
60 1
61 1
This gave me a warning, but it functions.
62 1
63 1
64 1
65 1
Now to set up "xyac...":http://www.bah.org/~greg/tivo
66 1
modified for R6 from "elgordo123's procedure":http://mysettopbox.tv/phpBB2/viewtopic.php?t=4836
67 1
68 1
xyac depends on xosd, so install that.
69 1
<pre>
70 1
sudo pacman -S xosd
71 1
</pre>
72 1
73 1
74 1
pacman doesn't know xyac, so we'll have to compile it...
75 1
<pre>
76 1
wget http://www.bah.org/~greg/tivo/xyac/xyac-0.1.tar.gz
77 1
tar zxvf xyac-0.1.tar.gz
78 1
cd xyac*
79 1
su
80 1
make
81 1
make install
82 1
</pre>
83 1
84 1
This installs xyac to /usr/local/bin
85 1
86 1
To get xyac to run, it'll need an entry in fluxbox apps.
87 1
<pre>
88 1
sudo nano /home/mythtv/.fluxbox/apps
89 1
</pre>
90 1
91 1
Add this line:
92 1
<pre>
93 1
[startup] {/usr/local/bin/xyac -p middle -A center -c yellow -s 5 -f lucidasanstypewriter-bold-24 &}
94 1
</pre>
95 1
96 1
(Note can also use lucidasanstypewriter-bold-18 if 24 is too big)
97 1
(Note: the command xlsfonts will show a list of fonts avail to you)
98 1
(Make sure it is all ONE line in the apps file or it wont start)
99 1
100 1
Restart x and give yourself a call.
101 1
102 1
If you'd like to manually test xyac from the same machine, you can fire off one of these...
103 1
<pre>
104 1
echo -n "testing testing 123" | nc -c 127.0.0.1 10629
105 1
</pre>
106 1
107 1
or from a different machine, adjust that 127.0.0.1 to meet your needs.
108 1
109 1
If you'd like to serve yac information to other machines on your network, set the list of listeners for ncid-yac at the bottom of /etc/ncid/ncidmodules.conf. I've got ncid-yac serving out to my windows box too, with the yac client "here.":http://www.sunflowerhead.com/software/yac/