Wednesday, June 16, 2010


I've been messing with video calibration stuff quite a bit recently and have managed to get vastly improved picture quality out of my projector/HTPC.  I know this sounds clich├ęd but I just didn't realise what I was missing!!  To get started all you need is a HTPC and a colorimeter (a device used for measuring colour), I have the EyeOne Display2 LT which is about £90.

I actually feel quite smug now because the JVC HD750 is almost the same projector as mine (HD350), but it comes with an integrated CMS (colour management system) and costs £2k more!  But now I can achieve the same results for no added cost.

Not only that, but it is also much easier to do CMS on the PC as you only need to take readings with the colorimeter, the CMS software calculates the adjustments automatically.  I've measured the pre/post results*1 and the results are excellent both in terms of measured accuracy and perceived viewing quality.  Also, it is nice to know your film is being displayed how the director intended...

There are a few different PC-based CMS methods to choose from:

  • MPC + pixel shader
  • MadVR renderer + yCMS
  • Upsilon Mixer

I've tried all 3, they all work.  They each have attributes that may appeal or alternatively push you towards another method.

MPC + pixel shader is simple to set up, it corrects white point to D65 and gamut (primary colour points (RGB) only).

If you are using MadVR then yCMS may be a better choice (over MPC + pixel shader) as it can also manage stepped gamma adjustments in addition to white point and primaries.

Upsilon Mixer should be the best, when released it will do full CMS, i.e.: it will adjust as yCMS but also secondary colours too.

So give it a go, it is like getting a new TV/projector!

*1: I use ChromaPure to measure the pre/post performance, this software is not free however there are free alternatives.

Friday, May 1, 2009

Howto: Windows 7 boot from SAN

I decided to test installing Windows 7 onto an iSCSI LUN. It works. Here's what I did:

My setup is as follows:

Server: OpenSolaris with Comstar iSCSI target
PC: with PCI-E Intel PRO/1000 dual port Server NIC

I created a 30GB LUN on which to install Windows 7 on the server.

It is possible to flash Intel PCI-E Server NICs with an iSCSI boot ROM which provides boot from SAN support. I have one of these cards so this is the method I chose to use, gPXE has a more universal alternative which I have linked at the bottom of this post.

I flashed the iSCSI boot ROM to my Intel PRO/1000 Server NIC (only Intel PCI-E Server NICs are applicable). The ROM software was downloaded from the Intel website, it is in the networking downloads section and is called the Intel® iSCSI Remote Boot Setup Utility.
To flash, copy the iscsiutl.exe utility onto a DOS boot disk, I used a USB key I had lying about with the Win98 system files on. Boot to DOS then "iscsiutl -up" flashes the NIC.

Reboot once this has been done, now there is a new BIOS entry for the iSCSI boot ROM, I pressed Ctrl-D to get into its config page. I set the boot ROM to Primary and then configured the initiator and target settings. Exit and now the NIC connects to the target and picks up its LUN.

I already had a USB key with the Windows 7 RC installation files, I booted to this and began the installation.

From here on in it was plain sailing...

Note: those wanting to achieve the same but without a PCI-E Intel Server NIC can do it using gPXE. This will provide boot from SAN functionality but will work with most NICs, also requires DHCP and TFTP servers.

Monday, April 6, 2009

Install SNMP agent on Centos.txt

yum install net-snmp net-snmp-libs
/etc/init.d/snmpd start
chkconfig --level 2345 snmpd on

Config files located in:

Thursday, March 5, 2009

How to perform a network install of CentOS

1.) Download CentOS-5.2-i386-netinstall.iso.  I got mine from this UK mirror:

2.) Next, either burn to CD or mount, depending on whether you are going physical or virtual, and boot!

3.) Configure TCP/IP settings, you probably just want to leave it on DHCP.

4.) Installation Method = HTTP
Web site name:
CentOS directory: centos/5.2/os/i386

Sit back, it takes a while...

Monday, March 2, 2009

Create a zvol based hvm xvm

I have just created a Trixbox VM on my Opensolaris server (xVM/Xen).  It is currently a HVM and I will be looking into how I can paravirtualise it.

This really is disgustingly simple:

Create a 6GB zvol:
zfs create -V 6g array/xvm/trixbox

Create the VM:
virt-install --name Trixbox --ram 512 --file /dev/zvol/dsk/array/xvm/trixbox --vnc --hvm --os-type=linux os-variant=rhel5 --location /iso/trixbox.iso

Most of the options are self-explanatory:
--name Trixbox (the name of the VM)
--ram 512 (how much ram to allocate)
--file /dev/zvol/dsk/array/xvm/trixbox (uses the zvol device as hard disk)
--vnc (enables vnc access to the VM)
--hvm (specifies that the VM is a HVM, and not paravirtualised)
--os-type=linux os-variant=rhel5 (specifies that the VM is a rhel5 based linux VM)
--location /iso/trixbox.iso (uses this iso image as the installation media)

Easy peasy!

Trixbox CE 2.6.2 (Sipgate) and Cisco 7960 installation walkthrough

I am using Trixbox with a Cisco 7960, here are the steps I used to install my server and phone.  My instructions are very brief, you should find that the context sensitive help in the Trixbox interface quite useful for helping with your own customisations.

Install Trixbox CE 2.6.2 from Disk/ISO image downloaded from the Fonality website, this part is straightforward enough not to require instructions.

Once installation is complete and you have logged on as root then run the following commands:
system-config-network - to switch from dynamic (DHCP) to static IP
passwd-maint - specify the maint users (gui) password
setup-cisco - generate cisco script
setup-samba - enable CIFS (\\server\share)
vi /etc/resolv.conf and add nameserver [your nameserver ip here]

Now connect to the Trixbox web interface in your browser
http://[ip address of your Trixbox server]

In the top right "switch" to Admin mode by logging on as the maint user

Select PBX/PBX Settings menu

Add Extension, Generic SIP Device, Submit
User Extension: 203
Display Name: Office
Device Options
Secret: 203
Voicemail & Directory
Status: Enabled
Voicemail password: 203
Submit & Apply
Select Extension 203
Device Options
Set nat to never

General Settings
Allow anonymous Inbound SIP Calls? Yes
Submit & apply

Add new SIP trunk
Outbound caller ID: [your_sip_tel_no]
Outgoing Settings
Trunk name: SipgateTrunk
PEER Details:
Registration: [your_sipgate_id]:[your_sipgate_password][your_sipgate_id]
Submit & apply

Outbound Routes
Route name: Default
Dial Patterns:
Trunk Sequence 0 SipgateTrunk
Submit & apply

Ring Groups
Group Description: Office
Extension list: 203
Destination if no answer: Voicemail [203]
Submit & apply

Inbound Routes
DID Number: [your_sipgate_id]
Ring Groups: Office [600]
Submit & apply

Configure the Cisco phone with the Endpoint manager 
PBX/Endpoint Manager
Cisco Phone
Device ID (extension): 203
Phone Type: 7960
MAC address: 800613800613 (your phones mac here)

My SIPDefault file, located in:
# Image Version
image_version: "P0S3-08-8-00"

# Proxy Server
proxy1_address: ""
proxy2_address: ""
proxy3_address: "" 
proxy4_address: ""
proxy5_address: ""
proxy6_address: ""
# Proxy Server Port (default - 5060)

# Emergency Proxy info
proxy_emergency: ""
proxy_emergency_port: "5060"

# Backup Proxy info
proxy_backup: ""
proxy_backup_port: "5060"
# Outbound Proxy info
outbound_proxy: ""
outbound_proxy_port: "5060"
# NAT/Firewall Traversal
nat_enable: "false"
nat_address: ""
voip_control_port: "5061"
start_media_port: "16384"
end_media_port:  "32766"
nat_received_processing: "0"

# Proxy Registration (0-disable (default), 1-enable)
proxy_register: "1"
# Phone Registration Expiration [1-3932100 sec] (Default - 3600)
timer_register_expires: "3600"
# Codec for media stream (g711ulaw (default), g711alaw, g729)
preferred_codec: "none"
# TOS bits in media stream [0-5] (Default - 5)
tos_media: "5"

# Enable VAD (0-disable (default), 1-enable)
enable_vad: "0"
# Allow for the bridge on a 3way call to join remaining parties upon hangup
cnf_join_enable: "1"     ; 0-Disabled, 1-Enabled (default)
# Allow Transfer to be completed while target phone is still ringing
semi_attended_transfer: "0"   ; 0-Disabled, 1-Enabled (default)
# Telnet Level (enable or disable the ability to telnet into this phone 
telnet_level: "2"      ; 0-Disabled (default), 1-Enabled, 2-Privileged

# Inband DTMF Settings (0-disable, 1-enable (default))
dtmf_inband: "1"
# Out of band DTMF Settings (none-disable, avt-avt enable (default), avt_always - always avt )
dtmf_outofband: "0"
# DTMF dB Level Settings (1-6dB down, 2-3db down, 3-nominal (default), 4-3db up, 5-6dB up)
dtmf_db_level: "3"
# SIP Timers
timer_t1: "500"                   ; Default 500 msec
timer_t2: "4000"                  ; Default 4 sec
sip_retx: "10"                     ; Default 11
sip_invite_retx: "6"               ; Default 7
timer_invite_expires: "180"        ; Default 180 sec
# Setting for Message speeddial to UOne box
messages_uri: "*97"

#*********  Release 2 new config parameters **********
# TFTP Phone Specific Configuration File Directory
tftp_cfg_dir: "./"
# Time Server
sntp_mode: "unicast"
sntp_server: ""
time_zone: "GMT"
dst_offset: "1"
dst_start_month: "Mar"
dst_start_day: ""
dst_start_day_of_week: "Sun"
dst_start_week_of_month: "2"
dst_start_time: "02"
dst_stop_month: "Nov"
dst_stop_day: ""
dst_stop_day_of_week: "Sunday"
dst_stop_week_of_month: "1"
dst_stop_time: "2"
dst_auto_adjust: "1"
# Do Not Disturb Control (0-off, 1-on, 2-off with no user control, 3-on with no user control)
dnd_control: "0"                  ; Default 0 (Do Not Disturb feature is off)
# Caller ID Blocking (0-disabled, 1-enabled, 2-disabled no user control, 3-enabled no user control)
callerid_blocking: "0"            ; Default 0 (Disable sending all calls as anonymous)
# Anonymous Call Blocking (0-disbaled, 1-enabled, 2-disabled no user control, 3-enabled no user 

anonymous_call_block: "0"         ; Default 0 (Disable blocking of anonymous calls)
# Call Waiting (0-disabled, 1-enabled, 2-disabled with no user control, 3-enabled with no user 

call_waiting: "1"                 ; Default 1 (Call Waiting enabled)

# DTMF AVT Payload (Dynamic payload range for AVT tones - 96-127)
dtmf_avt_payload: "101"           ; Default 100
# XML file that specifies the dialplan desired
dial_template: "dialplan"

# Network Media Type (auto, full100, full10, half100, half10)
network_media_type: "auto"

#Autocompletion During Dial (0-off, 1-on [default])
autocomplete: "1"

#Time Format (0-12hr, 1-24hr [default])
time_format_24hr: "1"

# URL for external Phone Services
services_url: ""

# URL for external Directory location
directory_url: ""

# URL for branding logo
logo_url: ""

My SIP file, located in:

# Cisco SIP Configuration

phone_label: "Office"
line1_name: "203"
line1_shortname: "203"
line1_displayname: "203"
line1_password: "203"
line2_name: "UNPROVISIONED"
line2_shortname: "UNPROVISIONED"
line2_displayname: "UNPROVISIONED"
line2_password: "UNPROVISIONED"
line3_name: "UNPROVISIONED"
line3_shortname: "UNPROVISIONED"
line3_displayname: "UNPROVISIONED"
line3_password: "UNPROVISIONED"
line4_name: "UNPROVISIONED"
line4_shortname: "UNPROVISIONED"
line4_displayname: "UNPROVISIONED"
line4_password: "UNPROVISIONED"
line5_name: "UNPROVISIONED"
line5_shortname: "UNPROVISIONED"
line5_displayname: "UNPROVISIONED"
line5_password: "UNPROVISIONED"
line6_name: "UNPROVISIONED"
line6_shortname: "UNPROVISIONED"
line6_displayname: "UNPROVISIONED"
line6_password: "UNPROVISIONED"
line1_authname: "203"
line2_authname: "UNPROVISIONED"
line3_authname: "UNPROVISIONED"
line4_authname: "UNPROVISIONED"
line5_authname: "UNPROVISIONED"
line6_authname: "UNPROVISIONED"

Thursday, February 26, 2009

VNCSERVER: Couldn't find "xauth" on your PATH

Attempting to run vncserver as non-root user gives me this error:
couldn't find "xauth" on your PATH
So I do a search for xauth:
find / -name xauth
which finds it in /usr/X11/bin

Also, knowing that when logged on as root I don't get this problem, I assume that root must have this in its path so I log on as root and run:
echo $PATH
This confirms that /usr/X11/bin is in the root users path.

I Log out of root session and add xauth to path:
PATH=$PATH:/usr/X11/bin && export PATH

vncserver now runs successfully but with some errors referring to permissions on the ~./vnc & ~./Xauthority folders.

For some reason root:root is owner of the .vnc in my root folder, presumably because I had run vncserver initially while su'ed from my non-root users session...

pfexec -R marc:staff ~/.vnc
pfexec -R marc:staff ~/.Xauthority
Sorts that out!

vncserver -kill :1
and all is working great!

Tuesday, February 24, 2009

How to enable xVM on Opensolaris 2008.11

Create a new boot environment called "xvm":
beadm create -a -d xvm xvm

Reboot into new "xvm" environment:

Download & install xVM packages:
pkg install xvm-gui SUNWvirt-manager SUNWxvm SUNWvdisk SUNWvncviewer

Modify xvm entry in /rpool/boot/grub/menu.lst to the following:
#============ End of LIBBE entry =============
title xvm
bootfs rpool/ROOT/xvm
kernel$ /boot/$ISADIR/xen.gz
module$ /platform/i86xpv/kernel/$ISADIR/unix /platform/i86xpv/kernel/$ISADIR/unix -B $ZFS-BOOTFS,console=text
module$ /platform/i86pc/$ISADIR/boot_archive
#============ End of LIBBE entry =============

Reboot into new "xvm" with xvm kernel:

Check xvm is enabled in kernel:
uname -a
Look for "i86xpv"

Enable xVM services:
svcadm enable -r xvm/virtd ; svcadm enable -r xvm/domains


Using VNC Server on Opensolaris

To set the VNC server password:

To start VNC server:
note the display number, i.e.: myserver:1 = display 1

Connect to the VNC server:

From the VNC client, use the following syntax: servername:display number.  I.E.: for a server called "myserver" with VNC server running on display 1:

To stop VNC server:
vncserver -kill :[display number]
i.e.: to stop display 1:
vncserver -kill :1

Enable gnome desktop:

Using your favourite text editor edit the/.vnc/xstartup file in your home folder:
vi ~/.vnc/xstartup
disable TWM (Timeless Window Manager) by commenting out:
#twm &
Add the following lines at the end:
gnome-session & 
"unset SESSION_MANAGER" disables gnomes check for other session managers.  "gnome-session &" starts the gnome desktop.

My xstartup file:

[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &
xterm -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# twm &
gnome-session &