google tv

For several years now I’ve been on what seems to be a never ending quest to find the perfection media center setup. As technology and the times change, so do my requirements. My latest media client is the vizio costar google tv. Its a great little device for streaming media. Access to the android market, a full chrome flash enabled browser and a $99 price tag makes it the most capable and cost effective device on the market today. I’ve had this device for some time now and I’m really enjoying it.

However since i gave my httpc the boot, my 1 terabyte external usb disk has been sitting idle along with all my archived media. I set out to change all this by creating a server. I just so happened to have a fanless ssd machine laying aroud that could fullfull just such a need. My goals are to

  1. Install Ubuntu
  2. Set up file sharing – serve up media files
  3. Setup a plex server – manage and decode video files
  4. Setup ssh server – remote administration
  5. Setup vnc server – remote visual adminitration
  6. Install a good torrent applicaton – you never know

Installing Ubuntu

ubuntuLets start with step one. Installing an operating system. I expect this machine to run 24 hours a day and want easy remote access to it. My natural choice for an OS was something linux based. I’m biased towards fedora, but in my experience, ubuntu is ususally easier to deal with. Installing ubuntu is super simple. Head over to ubuntu.com and read the insallation instructions.

Set up file sharing

sambaBy far the easiest way to serve all types of media to a client is via file sharing. Ubuntu makes this very trivial as well. It’s mostly right clicking on the folder you want to share and selecting share. Head over to the ubuntu forums for full setup instructions.

Mounting External drives with windows file systems (fat, ntfs)

I ran into a small issue because I wanted to share media from my external windows formated usb drive. The permissions thats ubuntu gives the external windows drive when mounting is not sufficent for file sharing. I needed to mount its manually. Here is a guide to mounting external drives with windows file systems on ubuntu

Accessing files from client

My client of choice as i’ve stated is the google tv. This will probably not work with an apple tv or roku. In the android market on your gogole tv or android tablet/phone, download ES file explorer. Assuming you are on the same wifi network, switch to lan shares. Viola! You should see your shared server with all the folders your shared before.

Click on a video or audio file and see if it plays. While this is the easiest method, its probably not the best. You will notice that some video files will not play. This is because you may not have the codecs on your android device. Of course you can scour the android market for the apporpriate codecs, but the fact remains that this is not an optimal method as files are cached on your client device and played in their original format.

Set up Plex Media Server

plexTo install plex media server, follow the instructions at the plex wiki. Skip down to the section that says Ubuntu PMS. The plex forum is also a very good resource.

Once installed, setup through the web interface. It is very self explanatory.

Plex Clients

Fortunately there is a plex clinet for every known relevant device out there, including android, google tv, roku, ios, and the browser. Grab one and start viewing your media.

Install SSH

My ubuntu box does not come with a wireless network card, so i have to keep it tethered to the router. I really do not want to keep it on my desk and assign it a dedicated monitor, keyboard and mouse anyway. It should just stay running quietly in a corner somewhere. However I always expect the best and plan for the worse. Things go wrong and when they do, its good to know I can access my server via ssh. In order to achieve this, we need to install ssh server software. This is as simple as running sudo apt-get install openssh-server. Then you can connect from any other computer on the network. Windows machines will require a client such as putty. MAC and linux machines, can ssh via terminal.

Install VNC

SSH is fine for most tasks, but suppose I need to do something more visual, such as for downloading media  via a torrent app. It would be great to access the gui of my server machine. Enter VNC. VNC has always been tricky to setup, so i’ve outlined all the steps here.

  1. Update the system and ensure we have gnome-session installed
    sudo apt-get update
    sudo apt-get install gnome-core gnome-session-fallback
  2. Install VNC
    sudo apt-get install vnc4server
  3. Set up password and edit the config
    vncserver
    vncserver -kill :1
    cp .vnc/xstartup .vnc/xstartup.bak
    vim .vnc/xstartup
  4. Edit the config file to look exactly like the following
    #!/bin/sh
    
    # Uncomment the following two lines for normal desktop:
    unset SESSION_MANAGER
    #exec /etc/X11/xinit/xinitrc
    gnome-session –session=gnome-classic &
    
    [ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
    [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
    xsetroot -solid grey
    vncconfig -iconic &
    #x-terminal-emulator -geometry 80×24+10+10 -ls -title “$VNCDESKTOP Desktop” &
    #x-window-manager &
    
  5. Start up the vnc server
    vncserver -geometry 1024x768 -depth 8

I have not seen a VNC client for any of the tv devices out there, VNC clients are available for the major operating systems including IOS and Android. The instructions VNC were adapted from Coddswallop’s blog

There you have it. Enjoy the media server setup, I know it has made my live so much easier.