I have been playing around with a way to get my Ubuntu box (that is running VLC on startup to stream our satellite TV across the network) to notify other boxes that it is awake and broadcasting. This is so that my wife can start the box up from a WOL script on the kitchen PC and then, once it is booted up, turn on the modded Xbox and run XBMC to connect to the stream and pick up TV downstairs.
Nice enough.
I managed to get it working using the following steps.
- On the PC that broadcasts TV, I added passwordless SSH (via this link) for the user that the kitchen PC runs under.
- On the kitchen PC, I created a script in the
/usr/bincallednotifierthat has the following in it:
export DISPLAY=:0 && export XAUTHORITY=/home/[KITCHEN COMPUTER USERNAME]/.Xauthority && sudo -u [KITCHEN COMPUTER USERNAME] /usr/bin/notify-send "TV is now broadcasting" 2>&1.Most of this is via this page.
- After adding the same user to the TV PC, I have a line in the TV PC
/etc/rc.localthat says
su [KITCHEN COMPUTER USERNAME] -c notifyKitchen
ThenotifyKitchenis a/usr/binscript that simply says
ssh [KITCHEN COMPUTER USERNAME]@[KITCHEN COMPUTER] 'notifier'.
Done and done. When the TV PC boots, it calls this command and the Kitchen PC gets a pop-up notification that TV is running.
Filed under: Development, Hardy, networking, Ubuntu | Tags: DNS, networking, Ubuntu
I’m reworking my home network, and playing with a VirtualBox image of Ubuntu 8.04 LTS that is acting as my DNS server and DHCP server. This is an attempt to deal with the frustrations of my Netgear gear not doing what I want re: IP addressing, and to simplify accessing servers and other devices by name on all my various IP-enabled equipment.
I’m still getting to the bottom of all this DNS stuff, but a couple of key links I don’t want to forget are:
- The Perfect Server at howtoforge.com
- DNS server Setup using bind in Ubuntu from Ubuntu Geek
- Make your DHCP server dynamically update your DNS records on Ubuntu Hardy Heron