https://help.ubuntu.com/community/Xbox360Media
Ushare has been working flawlessly to stream media to my Xbox 360 for about a month now. It does not, however, stream mkv or mp4 files. Those must be converted to m4v or avi.
ben mctee . com
Family, Geekery, Pictures.
Wednesday, January 4, 2012
Google Tricks
Try typing these into Google (it helps to turn off instant search results):
do a barrel roll
let it snow
askew
google gravity and then click "I'm feeling Lucky"
Play pacman:
www.google.com/pacman
do a barrel roll
let it snow
askew
google gravity and then click "I'm feeling Lucky"
Play pacman:
www.google.com/pacman
Labels:
Technology
Media Server - Hard drive spindown time
Hard drives that constantly spin are more prone to errors than those that spin down after some pre-determined time. I usually run Ubuntu on a laptop, and with that configuration it is set to conserve power by spinning down hard drives from the Power Management dialog. Due to knowing this, it never crossed my mind to even check the server for hard drive spin-down because I had just assumed it was already implemented, which was not the case.
In order to "buy" more life out of your hard drives, or to conserve electricity, use hdparm to spin down the hard drives. If you do not have hdparm installed, run:
sudo apt-get install hdparm
To set the hard drive to spin down, issue the following command:
sudo hdparm -S 120 /dev/sda
This will spin down the sda drive in 10 minutes. The number scheme is weird. Since it is based on a 0-255 range, the following correlate the minutes:
0: disabled (will never enter standby mode)
1-240: multiples of 5 seconds (ie 2=10 seconds and 120=10 minutes)
241-251: multiples of 30 minutes (ie 242=1 hr and 251=5.5 hrs)
252: 21 minutes (don't ask me why)
253: vendor supplied, somewhere between 8-12 hrs
254: reserved
255: 21 minutes, 15 seconds (again, no clue)
If you have multiple drives in your computer, this command must be run for each drive you want to spin down.
There is a downfall: the setting goes away once the computer is restarted. Fear Not! Add it in to rc.local to make it run on any change of runlevels (ie, during a startup):
sudo gedit /etc/rc.local
Unless you have already added something to rc.local, the only thing currently in there should be:
#!/bin/sh -e
exit 0
Or something along those lines (there may be a few commented lines describing what the file does between those two)
My rc.local now looks like the following, set up to spin down my system drives after 1 hr and my RAID drives after 10 minutes:
#!/bin/sh -e
#Set system drives to spin down after 1 hr idle time:
hdparm -q -S 242 /dev/sde
hdparm -q -S 242 /dev/sdf
#Set RAID drives to spin down after 10 min idle time:
hdparm -q -S 120 /dev/sda
hdparm -q -S 120 /dev/sdb
hdparm -q -S 120 /dev/sdc
hdparm -q -S 120 /dev/sdd
exit 0
The reason I want to wait a longer time for the system drives is that those get used more often for every-day tasks, and I don't want to wait for the hard drives to spin up each time I need to use the computer. Since the RAID is going to constantly be seeking data while I stream to my TV and not at all when I do not, spinning down after 10 minutes seemed to be the logical choice. The "-q" means it does it "quietly" (no visible output) during the startup.
In order to "buy" more life out of your hard drives, or to conserve electricity, use hdparm to spin down the hard drives. If you do not have hdparm installed, run:
sudo apt-get install hdparm
To set the hard drive to spin down, issue the following command:
sudo hdparm -S 120 /dev/sda
This will spin down the sda drive in 10 minutes. The number scheme is weird. Since it is based on a 0-255 range, the following correlate the minutes:
0: disabled (will never enter standby mode)
1-240: multiples of 5 seconds (ie 2=10 seconds and 120=10 minutes)
241-251: multiples of 30 minutes (ie 242=1 hr and 251=5.5 hrs)
252: 21 minutes (don't ask me why)
253: vendor supplied, somewhere between 8-12 hrs
254: reserved
255: 21 minutes, 15 seconds (again, no clue)
If you have multiple drives in your computer, this command must be run for each drive you want to spin down.
There is a downfall: the setting goes away once the computer is restarted. Fear Not! Add it in to rc.local to make it run on any change of runlevels (ie, during a startup):
sudo gedit /etc/rc.local
Unless you have already added something to rc.local, the only thing currently in there should be:
#!/bin/sh -e
exit 0
Or something along those lines (there may be a few commented lines describing what the file does between those two)
My rc.local now looks like the following, set up to spin down my system drives after 1 hr and my RAID drives after 10 minutes:
#!/bin/sh -e
#Set system drives to spin down after 1 hr idle time:
hdparm -q -S 242 /dev/sde
hdparm -q -S 242 /dev/sdf
#Set RAID drives to spin down after 10 min idle time:
hdparm -q -S 120 /dev/sda
hdparm -q -S 120 /dev/sdb
hdparm -q -S 120 /dev/sdc
hdparm -q -S 120 /dev/sdd
exit 0
The reason I want to wait a longer time for the system drives is that those get used more often for every-day tasks, and I don't want to wait for the hard drives to spin up each time I need to use the computer. Since the RAID is going to constantly be seeking data while I stream to my TV and not at all when I do not, spinning down after 10 minutes seemed to be the logical choice. The "-q" means it does it "quietly" (no visible output) during the startup.
Labels:
Linux,
Technology
Tuesday, December 27, 2011
Apple TimeMachine backup to Ubuntu 11.10 over network
Time Capsule is a great way to backup your MacBook over the network. But at $500 for the 3 terabyte version, why spend the money when you have an Ubuntu 11.10 media server with 6 TB of storage and an Airport Extreme base station (which is 1 of the 2 things the Time Capsule accomplishes)? It does take a little bit of configuration to get it running, so here goes:
1) In the terminal, install netatalk so that your Ubuntu machine will communicate via AppleTalk. While you're there, make sure that avahi-daemon is installed (it is by default on 11.10):
1) In the terminal, install netatalk so that your Ubuntu machine will communicate via AppleTalk. While you're there, make sure that avahi-daemon is installed (it is by default on 11.10):
sudo apt-get install netatalk avahi-daemon
2) Now edit the afpd config file (AppleTalk Filing Protocol) so we can communicate with the directory properly over the network. To see a description of each option, view the afpd website or "man afpd" in terminal:sudo gedit /etc/netatalk/afpd.confAdd this to the bottom of the file:- -tcp -noddp -uamlist uams_guest.so,uams_dhx.so,uams_dhx2.so -n3) Create the directory for you TimeMachine backups:mkdir /dir/dir/YourBackup/FolderI chose /media/Backups/macbook/TimeMachine4) Edit the permissions for that folder so that everyone can have read/write access.5) Edit the netatalk AppleVolumes.default file to point to your directory:sudo gedit /etc/netatalk/AppleVolumes.default/media/Backups/macbook/TimeMachine "TimeMachine" cnidscheme:dbd options:usedots,tm,uprivThe "tm" enables for TimeMachine use. This page details all the options for AppleVolumes.default6) Tell the avahi daemon to broadcast AppleTalk over the network:sudo gedit /etc/avahi/services/afpd.serviceThis will open an empty (hopefully) file.Enter the following, save, and close:<?xml version="1.0" standalone='no'?><!--*-nxml-*--> <!DOCTYPE service-group SYSTEM "avahi-service.dtd"> <service-group> <name replace-wildcards="yes">%h</name> <service> <type>_afpovertcp._tcp</type> <port>548</port> </service> <service> <type>_device-info._tcp</type> <port>0</port> <txt-record>model=Xserve</txt-record> </service> </service-group>7) Restart the services to read in the new config files:service netatalk restart service avahi-deamon restart8) In order to not fill all of the hard drive space on the Ubuntu server with MacBook backups, create a disk image from OS X:Disk Utility > New ImageCreate whatever size image you'd like. This will look like an external hard drive to TimeMachine, which it will fill until it is out of space, and then start replacing the oldest data first.Save this to your networked folder on the Ubuntu server (/media/Backups/macbook/TimeMachine/backup.dmg)9) On the Mac, select the Go menu > Connect to Folder > Browse > TimeMachine10) Enable TimeMachine and see if that drive is available. If not, I found this small hack for OS X on engadget.com:defaults write com.apple.systempreferences TMShowUnsupportedNetworkVolumes 1Enter that into your terminal and try again.
Labels:
Linux,
Technology
Monday, December 26, 2011
Saturday, May 28, 2011
Thursday, April 28, 2011
Troy's 3rd Birthday
I'm on leave in Henderson for Troy's 3rd birthday (24th)! Can't believe how quickly time has flown and how grown up he is getting.
I've posted some pictures on Picasa of his party at my parents' house.
| Troy playing in his new pool |
Subscribe to:
Posts (Atom)

