Archive for July, 2008

Creating an NFS share on Windows XP

Wednesday, July 16th, 2008

Recently, on the Mythtv-users mailing list, Gabe Rubin posted a question asking why he was getting no thumbnails in his mythweb view. Having already resolved that problem in my own environment, I told him that there was a bug in CIFS that showed up when using the MythTV uPnP code (which Mythweb does as of 0.21) and he was better off using NFS if possible. I also offered to help him get NFS working using Microsoft Services for Unix (SFU). Silly me 🙂

I’d never previously setup SFU under Windows XP. I’d only ever used it under a ‘Server’ version of Windows. As it turns out, there is a bug (or is that a feature?) in the User Name Mapping (UNM) feature of SFU that causes it to fail on Windows XP if the username/password combination of the *nix account you want to map does not match the username/password combination of the Windows account it is mapped to. The way UNM is supposed to work, is that it will take any *nix user account and map it to any Windows user account. Username and password is not supposed to matter, and indeed, this is the way it works in Windows Server. Not so for Windows XP though.

 So, for anybody out there trying to get SFU working properly (the NFS Server portion in particular) on a Windows XP machine, here are step-by-step instructions for what worked for me in my test-lab… (more…)

Use VNC to view your X11 console display

Saturday, July 12th, 2008

Although I do 99% of the remote administration on my linux servers via a ssh terminal, it is sometimes desirable to connect to the root X11 display. Fortunately X11 has a built-in method for doing this.

Step 1: Add the following lines to your /etc/X11/xorg.conf

Section "Module"
  ...
  Load "vnc"
  ...
EndSection
Section "Screen"
  ...
  Option "SecurityTypes" "VncAuth"
  Option "UserPasswdVerifier" "VncAuth"
  Option "PasswordFile" "/root/.vnc/passwd"
  ...
EndSection

Step 2: Set a VNC password

# /usr/bin/vncpasswd
Password: ******
Verify: ******

Step 3: Open TCP port 5900 in the firewall

# echo --port=5900:tcp >> /etc/sysconfig/system-config-securitylevel

Step 4: Restart the X server with a ctrl-alt-backspace or reboot the server if possible

Step 5: Connect with your favorite vncviewer client

Note: If you are running in a secure environment and would like to connect without a password, you can replace the three ‘Option’ lines in the ‘Screen’ section of /etc/X11/xorg.conf (from Step 1 above) with a single line that reads

Section "Screen"
...
Option "SecurityTypes" "None"
...
EndSection

Removing Letterboxing in MythTV

Sunday, July 6th, 2008

I currently record all my shows in MythTV using a couple of Hauppauge PVR-[12]50’s. This works great, but I sometimes record shows originally  filmed in HD and they show up as letterboxed 4:3 shows. This isn’t a problem when I play them back on a standard def 4:3 display, but when played back on my widescreen displays they end up having a black border all they way around the show. I know I can just use the playback menu  ‘adjust fill’ option and set it to ‘full’ in order to fix this, but that has to be done every time I start playback. I wish there was a way for MythTV to automatically detect this situation and automatically select the correct playback fill.

To handle this situation, I created a small ‘user job’ script that I run automatically on the shows that I know will be recorded in a letterboxed format. It takes the original 4:3 mpeg2 recording and crops 60 pixels off the top and bottom and re-encodes it to a 16:9 aspect mpeg2 file. It then replaces the original file with the transcoded version, updates the mythconverg database to reflect the changed file settings, runs mythcommflag to rebuild the seektable (ffw/rwd doesn’t work without this) and finally runs a lossless mythtranscode with the –mpeg2 option (length of the recording is incorrectly shown without this).

The following is that script… (more…)