Caller ID alternate using xyac

Version 3 (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 3 Transverse
Tested under R7.2
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 2 Transverse
Continue and follow along with the rest of the procedure.  When you're done, come back here.
37 2 Transverse
38 1
Now, the additional steps...
39 1
ncid-yac needed to be modified slightly, as it wasn't stopping on its own and wasn't sending until it was stopped.
40 1
<pre>
41 1
sudo nano /usr/share/ncid/ncid-yac
42 1
</pre>
43 1
44 1
This line:
45 1
<pre>
46 1
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -w1 $YACCLIENT $YACPORT
47 1
</pre>
48 1
49 1
Needs to change to:
50 1
<pre>
51 1
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -c $YACCLIENT $YACPORT
52 1
</pre>
53 1
54 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.
55 1
56 1
57 1
58 1
ncid-yac depends on netcat. So install netcat:
59 1
<pre>
60 1
sudo pacman -S gnu-netcat
61 1
</pre>
62 1
63 1
This gave me a warning, but it functions.
64 1
65 1
66 1
67 1
Now to set up "xyac...":http://www.bah.org/~greg/tivo
68 1
modified for R6 from "elgordo123's procedure":http://mysettopbox.tv/phpBB2/viewtopic.php?t=4836
69 1
70 1
xyac depends on xosd, so install that.
71 1
<pre>
72 1
sudo pacman -S xosd
73 1
</pre>
74 1
75 1
76 1
pacman doesn't know xyac, so we'll have to compile it...
77 1
<pre>
78 1
wget http://www.bah.org/~greg/tivo/xyac/xyac-0.1.tar.gz
79 1
tar zxvf xyac-0.1.tar.gz
80 1
cd xyac*
81 1
su
82 1
make
83 1
make install
84 1
</pre>
85 1
86 1
This installs xyac to /usr/local/bin
87 1
88 1
To get xyac to run, it'll need an entry in fluxbox apps.
89 1
<pre>
90 1
sudo nano /home/mythtv/.fluxbox/apps
91 1
</pre>
92 1
93 1
Add this line:
94 1
<pre>
95 1
[startup] {/usr/local/bin/xyac -p middle -A center -c yellow -s 5 -f lucidasanstypewriter-bold-24 &}
96 1
</pre>
97 3 Transverse
Make sure it is all on ONE line in the apps file or it wont start.
98 1
99 3 Transverse
Note: can also use lucidasanstypewriter-bold-18 if 24 is too big.
100 3 Transverse
For more variety, the command xlsfonts will show a list of fonts available to you.
101 1
102 3 Transverse
Restart x,
103 3 Transverse
<pre>
104 3 Transverse
sudo killall xinit
105 3 Transverse
</pre>
106 3 Transverse
and give yourself a call.
107 1
108 1
If you'd like to manually test xyac from the same machine, you can fire off one of these...
109 1
<pre>
110 1
echo -n "testing testing 123" | nc -c 127.0.0.1 10629
111 1
</pre>
112 1
113 1
or from a different machine, adjust that 127.0.0.1 to meet your needs.
114 1
115 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/