Caller ID alternate using xyac

Version 4 (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
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:
6 1
7 1
<pre>
8 1
#!/bin/sh
9 1
exec 2>&1
10 1
export TERM=linux
11 1
. /etc/rc.conf
12 1
. /etc/rc.d/functions
13 1
14 1
svwaitup -s 3 /var/service/ncidd || exit 1
15 1
16 1
which ncid 2>/dev/null >/dev/null
17 1
18 1
if [ $? = 0 ]
19 1
then
20 1
    if [ -f /var/service/ncidd/run ]
21 1
    then
22 1
        sv start ncidd
23 1
    fi
24 1
25 1
    stat_runit "Starting callerid client"
26 1
27 1
    exec /usr/bin/ncid --no-gui --message --call-prog --program ncid-yac
28 1
fi
29 1
30 1
</pre>
31 1
32 1
This uses ncid-yac along with xyac, instead of using ncid-mythtv.
33 1
34 2 Transverse
Continue and follow along with the rest of the procedure.  When you're done, come back here.
35 2 Transverse
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 3 Transverse
Make sure it is all on ONE line in the apps file or it wont start.
96 1
97 3 Transverse
Note: can also use lucidasanstypewriter-bold-18 if 24 is too big.
98 3 Transverse
For more variety, the command xlsfonts will show a list of fonts available to you.
99 1
100 3 Transverse
Restart x,
101 3 Transverse
<pre>
102 3 Transverse
sudo killall xinit
103 3 Transverse
</pre>
104 3 Transverse
and give yourself a call.
105 1
106 1
If you'd like to manually test xyac from the same machine, you can fire off one of these...
107 1
<pre>
108 1
echo -n "testing testing 123" | nc -c 127.0.0.1 10629
109 1
</pre>
110 1
111 1
or from a different machine, adjust that 127.0.0.1 to meet your needs.
112 1
113 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/