24 March 2013

XBox Media Center Connection Troubleshooting

My Xbox used to work well as a Media Center Extender (streaming TV to my Xbox) but since I installed Win8 on the server it regularly fails to connect. I have found I need to remove the certificate and re-add the extender to get it to work:
Here are the instructions from:

Windows Media Centre | Xbox 360 Console | Set Up Windows Media Centre on Xbox 360 - Xbox.com

  • Click Start, type mmc in the Start Search box and then press Enter. If you are prompted for an administrator password or for confirmation, type the password or click Continue.
  • On the File menu, click Add/Remove Snap-in.
  • Click Certificates, and then click Add.
  • Select Computer account, and then click Next.
  • Select Local computer, and then click Finish.
  • Click OK.
  • In the Navigation Pane under Console Root, expand Certificates, expand Personal, and then click Certificates.
  • Right-click Microsoft Windows Media Center Extender Host, and then click Delete.
  • After you remove the certificate, uninstall the Extender and then restart Extender Setup.


Airport Extreme: How to Disable DHCP while Maintaining NAT

If you run a DHCP server on your network already you might want to use the NAT capability of an Airport Extreme without using the DHCP server functionality. With a bit of fiddling this is possible.

I found the answer thanks to this post:
kair: How to Disable DHCP while Maintaining NA: Apple Support Communities

To guard against link rot the process is essentially:

  • On the DHCP server:
    • Set the IP to a fixed one e.g. 192.168.0.2
    • Set the DHCP range to cover the majority of your network e.g. 1-252
    • Set the forwarding DNS servers to an external one e.g. OpenDNS
      208.67.222.222
      208.67.220.220
  • On the Airport Extreme:
    • Ensure it is set to a specific IP e.g. 192.168.0.1
    • DHCP to a limited range e.g. 253-254
    • On the Internet tab set the DNS servers:
      • To the local DHCP server e.g. 192.168.0.2
      • I like to set the other one to OpenDNS server to guard against downtime

From the link and using a Windows 2008 as a DNS server the bit I struggled with was "Be sure to specify the Airport Extreme (e.g. 172.16.1.1) as the default gateway or default router". In Windows Server 2008 this is under Server Manager, Roles, DHCP Server, [server name], Scope, Scope Options, right click, Configure Options. The option was greyed out for me until I de-authorised and re-authorised the Scope for some reason (and a customary reboot of course!).


20 March 2013

Linux VNC via SSH

UPDATE: See updated version of this post here.


Prerequisites:

  • On the server: 
    • SSH deamon eg FreeShhd
    • VNCServer e.g. tightvncserver (setup here)
      sudo apt-get update
      sudo apt-get upgrade
      sudo apt-get install tightvncserver
  • On a Windows client:
To setup Putty:
  • Open Putty
  • Enter the ip address, host or domain name of your linux box
  • Click on Tunnels under SSH
  • In Source port enter 5901
  • In Destination enter 127.0.0.1:5901
  • Click on add
  • Click back to session in tree then specify a name and save
To connect:
  • In putty click open
  • In ssh session run vncserver if not already running e.g. tightvncserver
    tightvncserver :1 -geometry 1024x768
  • Start a VNCViewer, and connect to:
    [IP address]:01
    or through a tunnel: 127.0.0.1:01

To end the session:

  • vncserver -kill :1

13 March 2013

How To: Convert a SQLServer Named Instance to the Default

Having installed SQL Server as a named instance so you can have multiple instances running e.g. SQL2008, SQL2012 you might want to convert one to respond to the default so that you can use just the server name or the "." (dot) notation in connection strings for localhost.

This can be done in SQLServer Configuration Manager:

  • Navigate to SQL Server Network Configuration, [version name] in the left hand pane.
  • Select TCP/IP in the right hand pane, right click and select Properties
  • Go to the IP Addresses tab
  • Change TCP Dynamic Ports to be blank
  • Make the TCP port the default value of: 1433
NB: This can only be configured for one of the instances.

12 March 2013

How To: Force Excel to open Files in a New Instance

I don't like the way Excel opens files in the existing application as you can't then move them about as readily as if they are in their own individual windows.

I find the setting to change this behaviour rather obscure so here is a reminder:

  • File 
  • Excel options
  • Click on the 'advanced' tab
  • Scroll down to general
  • Check the "ignore other applications that use 'Dyanamic Data Exchange (DDE)"

How To: Create PDFs With Bookmarks From Word

I always forget how to do this so for my sanity:

  • In Word use Heading text type to create the bookmark basis.
  • Choose Save As
  • Select PDF
  • In the Save As dialogue choose options
  • Select Create bookmarks from headings

02 March 2013

How to Change Network Order in Windows and Mac

Both Windows and Mac try to make intelligent choices about what order to use LAN connections but they don't always get it right.

The Problem
Depending on what you're doing you might need to change the order. e.g. sharing a wireless connection to a LAN port, both OS's will probably still try to use the LAN port as the 'internet' port.

The Solution
Windows
In Windows it's called metric and hidden deep in the individual adapter's settings:
Control Panel; Network and Sharing; Change adapter settings; Choose properties for the adapter in question; Select TCP/IPv4; Advanced Button; Uncheck Automatic Metric and provide a manual number. Lowest number is priority, so if you want to make sure the wireless port is used for internet requests set the wired (LAN) port to a high metric to make it less high priority.
http://support.microsoft.com/kb/299540

Mac
On Mac it's much simpler: just change the order of the adapters in Network preferences.

  • In System Preferences; Network.
  • If you want to store your changes create a new location (drop down at the top) it will say Automatic. Create a new one by selecting Edit Locations.
  • Select the Gear (cog) icon at the bottom of the network adapters on the left hand side.
  • Select Set Service Order

01 March 2013

How To: Use Nano Router To Do Web Dev On The Move

How to use a nano router to run a DHCP server to allow website development testing on wireless devices (e.g. smartphone, tablet) whilst away from a network.

Whilst travelling I often find I need to test a website on a real wireless device. Whilst emulators are available for iPhone Android etc I often find they fall short of the actual experience, and besides, until you've tested it you haven't tested it have you.

The Aim
Open a browser on a tablet or phone and browse to a website running on a server on a laptop whilst  mobile or wireless coverage is unavailable or unreliable e.g. whilst travelling.

The Problem
If there is no reliable network available either wireless LAN or even mobile (which could be used with a Dynamic service like DnsExit.com) then you have no DHCP router to assign IP addresses, so you cannot necessarily browse from one device to the server on another (it's feasible in theory with AP but I've never got it to work).

The Solution
A nano router like TP Link TL-WR702N 

It truly is tiny, smaller than a (computer) mouse. Approx 5.5cm square and 1.75cm deep.
Comes with (short but sufficient) usb and lan cables, and a mains power adapter.

The on-board software (accessible at 192.168.0.254 default un/pw: admin admin) is basic but functional allowing various different modes:
- AP mode.
- Wireless router mode
- Repeater mode
- Bridge mode
- Client mode
Crucially for me DHCP is optional in any of these modes (e.g. not limited to router).

Great as:
- Backup router (doubtless a single point of failure in any home network)
- An access point when there is no wireless (e.g. Hotel having only LAN cable or wireless with single device sign on).

I use it to act as a DHCP in Access Point mode, plugged into my Ethernet port on my computer to provide a wireless AP for phone and tablet when I'm travelling but need inter connectivity for developing websites.

NB: to change the order of network preferences to ensure web requests use the internet connected (WiFi port):
  • Windows: Network preferences, change adapter settings, Advanced, Deselect automatic metric and ensure the one you want to use for internet has the lowest metric number.
  • Mac: change the order of the adapters in Network preferences


You could also upload new firmware (e.g. openwrt) to add additional features.