Caller ID alternate using xyac

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

1 1
h1. Caller ID Display, alternate, using xyac.
2 1
3 11 Transverse
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 mythtv playback, but also when viewing menus, mplayer, xine, etc. 
4 1
5 9 Transverse
Follow the procedure at [[Caller ID displayed on your LinHES screen]], but when it comes to editing /etc/ncid/ncid.conf don't bother.  Just leave it alone, as you'll be running ncid with specific options, so there is no need to change the defaults in the config file.  When it comes to editing /etc/sv/ncid/run, change it to this instead:
6 1
7 6 Transverse
For R6:
8 1
<pre>
9 1
#!/bin/sh
10 1
exec 2>&1
11 1
export TERM=linux
12 1
. /etc/rc.conf
13 1
. /etc/rc.d/functions
14 1
15 1
svwaitup -s 3 /var/service/ncidd || exit 1
16 1
17 1
which ncid 2>/dev/null >/dev/null
18 1
19 1
if [ $? = 0 ]
20 1
then
21 1
    if [ -f /var/service/ncidd/run ]
22 1
    then
23 1
        sv start ncidd
24 1
    fi
25 1
26 1
    stat_runit "Starting callerid client"
27 1
28 5 Transverse
    exec /usr/bin/ncid --no-gui --message --program ncid-yac
29 1
fi
30 1
31 1
</pre>
32 6 Transverse
33 6 Transverse
For R7 (the service directories have changed):
34 6 Transverse
<pre>
35 6 Transverse
#!/bin/sh
36 6 Transverse
exec 2>&1
37 6 Transverse
export TERM=linux
38 6 Transverse
. /etc/rc.conf
39 6 Transverse
. /etc/rc.d/functions
40 6 Transverse
41 6 Transverse
svwaitup -s 3 /etc/sv/ncidd || exit 1
42 6 Transverse
43 6 Transverse
which ncid 2>/dev/null >/dev/null
44 6 Transverse
45 6 Transverse
if [ $? = 0 ]
46 6 Transverse
then
47 6 Transverse
    if [ -f /etc/sv/ncidd/run ]
48 6 Transverse
    then
49 6 Transverse
        sv start ncidd
50 6 Transverse
    fi
51 6 Transverse
52 6 Transverse
    stat_runit "Starting callerid client"
53 6 Transverse
54 6 Transverse
    exec /usr/bin/ncid --no-gui --message --program ncid-yac
55 6 Transverse
fi
56 6 Transverse
57 6 Transverse
</pre>
58 6 Transverse
59 6 Transverse
60 1
61 1
This uses ncid-yac along with xyac, instead of using ncid-mythtv.
62 1
63 2 Transverse
Continue and follow along with the rest of the procedure.  When you're done, come back here.
64 2 Transverse
65 14 Transverse
Now, the additional steps:
66 1
ncid-yac needed to be modified slightly, as it wasn't stopping on its own and wasn't sending until it was stopped.
67 1
<pre>
68 1
sudo nano /usr/share/ncid/ncid-yac
69 1
</pre>
70 1
71 1
This line:
72 1
<pre>
73 1
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -w1 $YACCLIENT $YACPORT
74 1
</pre>
75 1
76 1
Needs to change to:
77 1
<pre>
78 1
echo -n "@CALL${CIDNAME}~${CIDNMBR}" | nc -c $YACCLIENT $YACPORT
79 1
</pre>
80 1
81 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.
82 1
83 1
84 1
85 1
ncid-yac depends on netcat. So install netcat:
86 1
<pre>
87 1
sudo pacman -S gnu-netcat
88 1
</pre>
89 1
90 1
This gave me a warning, but it functions.
91 1
92 1
93 1
94 12 Transverse
Now to set up "xyac,":http://www.bah.org/~greg/tivo
95 13 Transverse
modified for R6/R7 from "elgordo123's procedure:":http://mysettopbox.tv/phpBB2/viewtopic.php?t=4836
96 1
97 1
xyac depends on xosd, so install that.
98 1
<pre>
99 1
sudo pacman -S xosd
100 1
</pre>
101 1
102 1
103 14 Transverse
pacman doesn't know xyac, so we'll have to compile it.
104 1
<pre>
105 1
wget http://www.bah.org/~greg/tivo/xyac/xyac-0.1.tar.gz
106 1
tar zxvf xyac-0.1.tar.gz
107 1
cd xyac*
108 7 Transverse
sudo make
109 7 Transverse
sudo make install
110 1
</pre>
111 1
112 1
This installs xyac to /usr/local/bin
113 1
114 1
To get xyac to run, it'll need an entry in fluxbox apps.
115 1
<pre>
116 1
sudo nano /home/mythtv/.fluxbox/apps
117 1
</pre>
118 1
119 1
Add this line:
120 1
<pre>
121 1
[startup] {/usr/local/bin/xyac -p middle -A center -c yellow -s 5 -f lucidasanstypewriter-bold-24 &}
122 1
</pre>
123 3 Transverse
Make sure it is all on ONE line in the apps file or it wont start.
124 1
125 3 Transverse
Note: can also use lucidasanstypewriter-bold-18 if 24 is too big.
126 8 Transverse
For other font options, the command xlsfonts will show a list of fonts available to you.
127 1
128 3 Transverse
Restart x,
129 3 Transverse
<pre>
130 3 Transverse
sudo killall xinit
131 3 Transverse
</pre>
132 3 Transverse
and give yourself a call.
133 1
134 14 Transverse
If you'd like to manually test xyac from the same machine, you can fire off one of these:
135 1
<pre>
136 1
echo -n "testing testing 123" | nc -c 127.0.0.1 10629
137 1
</pre>
138 1
139 1
or from a different machine, adjust that 127.0.0.1 to meet your needs.
140 1
141 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/