femtobyte: tech journey

random findings by wt8008
RSS icon Home icon
  • Ubuntu Resolve Hostname

    Posted on February 7th, 2009 wt8008 1 comment

    I wanted to ping my vmware-player system using its hostname. The easiest way to do this is to install samba on the server computer, and let samba announce to the network my hostname.

    Everyone on the network that can pick up and process those packets will know about the hostname.

    Playing with /etc/nsswitch.conf and /etc/dhcp3/dhclient.conf does not make an effect that I can notice.

    Edit: Apparently I only tested from my laptop. My Desktop (the host system for vmware) cannot ping the hostname of my vmware-client directly, but it can reach it via .local from avahi. Some weird configuration somewhere. I should try with a livecd.

    Edit: Samba worked fine for Ricky’s Windows PC to Ricky’s eee running Ubuntu.

  • Ubuntu 8.10 avarice USB permission issue

    Posted on January 9th, 2009 wt8008 No comments

    Apparently lots of people are having issues with permissions with USB devices, mines is the AVR Dragon. Using sudo allows the command to work. Most people change the udev mask rules to 0666 to allow everyone to read and write. I found that in Ubuntu the package does not setup the udev rules file properly.

    When installing the packages the file /dev/udev.d/avarice.rules already exists to setup the permissions and group.


    # Atmel Corp. AVR Dragon
    ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="2107", MODE="0666", GROUP="dialout"

    The avarice.rules file is linked to /etc/udev/rules.d/z60_avarice.rules, but it does not work, so create a new link:

    cd /etc/udev/rules.d
    sudo ln -s ../avarice.rules 60-avarice.rules

    Replug in the AVR Dragon and it should work, assuming you are in the dialout group. You can check the /etc/group files to see if you are a memeber of that group.

  • Ubuntu 8.10 Fresh Install

    Posted on December 27th, 2008 wt8008 No comments

    Some things I first installed were

    ubuntu-redistricted-extras: This package pull’s in Java, flash, and common media formats.

    Add Medibuntu repositories for

    w32codec: This will play my rmvb files.

    Chinese font settings under an English installation:

    ttf-wqy-zenhei and xfonts-wqy

  • Algorithm on Studying for Finals

    Posted on December 8th, 2008 wt8008 No comments
    void study(void)

    That is it, it works quite well sometimes. 😉 It never ends, until you blow up.

  • mvPod – converting video

    Posted on November 28th, 2008 wt8008 No comments

    mvPod is a gui over mencoder, and it can support conversion from rmvb to H264 mp4 for the ipod. Use version > 0.1alpha2, or else you’ll run into issues. The newer versions the mpeg4ip-server package is needed, according to the author, the next release will have this information in its’ documentation. Also, two-pass encoding fails, so do not select that option.

    Using Amarok, the files can be transferred to the iPod. gtkpod allows the user to change the tags on the mp4 file, and also transfer it to the iPod.

  • Kile DVItoPDF

    Posted on October 20th, 2008 wt8008 No comments

    The dvi-to-pdf setting in Kile produceds A4 by default, another missed A4 paper size setting. Set the build settings in Kile to

    Command: dvipdfmx
    Options: -p letter ‘%S.dvi’

    Now the pdf’s produced from dvi files will be of proper size.

  • Mythtv Box with HDTV Support

    Posted on October 5th, 2008 wt8008 No comments

    Last month, I completed building a Mythbuntu box with HDTV support. I also have analog support, but who would want to watch TV on that, so I didn’t bother setting that part up. Anyway here is the hardware setup:

    • CPU: Athlon XP 3000+ (from the top of my head Runs at 2.25 GHz)
    • RAM: 1GB
    • HD: 750GB
    • Video card: PNY Geforce 6600gt
    • TV Tuner
      • HDTV: Air2PC rev 2
      • NTSC: Avermedia AverTV Go 007 FM Plus

    The CPU recommended for single core processors are P4 3.0GHz or equivalent for HDTV playback. With only using the CPU alone my computer was able to play back HDTV video, but it was not smooth. A way around this (but not recommended by the community because of issues with using this) is with XvMC, which allows X to use the video card’s processor to accelerate playback. Only the 5000-7000 series close source drivers from Nvidia have the support for XvMC, and also only the 5000 series support color OSD during playback. The menus are in color, but any item that displays on top of the video is in grayscale with XvMC.

    My system was used as as frontend and backend. For HDTV the backend just writes a digital stream to the HD so this does not strain the system. For analog TV, if the tuner did not have hardware encoding the CPU would have to do the lifting, thus the CPU would have to do more work. A seperate backend would help for commercial tagging.

    The video card has S-video, composite, and component video out, along with the standard DVI and VGA (via an adaptor). The HDTV we have that the HTPC is hooked to does not contain any other HD inputs besides component video. My xorg.conf file is located at the end of the post for 1080i output.

    The video settings I have is to have video above 720p and 1080i to play back using XvMC, and for lower resolutions to use ffmpeg. This allows me to smoothly playback HDTV (but there is still another issue), and have color OSD for lower resolutions.

    If I were to use the Avermedia tuner, it is will be detected by the kernel automatically. My Avermedia card came with a remote, so I am using the remote that came with that tv tuner to control Mythtv and mplayer. The infered port should be detected and be under /dev/input/event*. By using the command `cat /proc/bus/input/devices’, you can find the module that goes with the remote. Note that when mice, keyboards, or other input devices are added to the system, the device location may change without udev rules. I have generated a lircd.conf file for my remote. By using the mythbuntu-control-centre, you can setup the remote to use the devinput driver, proper device, and link to the lircd.conf file. Under the users home folder in ~/.lirc/mythtv, the file maps the buttons from the remote file (lircd.conf) to mythtv commands. Both files will be located at the end of this post.

    The Air2PC card requires a firmware file (dvb-fe-bcm3510-01.fw) to be downloaded and placed in /lib/firmware for the kernel to properly use the card. In dmesg output, you will see that the firmware is sucessfully loaded upon boot.


    • Using XvMC with OSD is in grayscale and causes the video playback to shutter. When the OSD timesout video playback resumes smoothly.
    • EIT: The electronic programming guide transmitted through the air by the TV stations, sometimes stop over each other. For example, Channel’s 5 programming data will also appear in Channel’s 4 slot. I later found out there is a setting for each channel to allow EIT programming to be disabled on each channel.

    Testing ATSC Card via Commandline

    The dvb-utils package in Ubuntu has utlities for scanning for channels. This will install the scan utilty which will look for channels, it is ran by

    scan /usr/share/dvb/atsc/us-ATSC-center-frequencies-8VSB > channels.conf

    It will save the results of the scan in channels.conf. Some programs, like mplayer use this file for viewing tv. Run mplayer to view TV

    mplayer dvb://

    Now with the tv verfied to be working.

    Setup Mythtv Backend

    1. General Settings
    2. Capture Card
      1. Card Type: DVB DTV capture card for ATSC tuner; NTSC card is Analog V4L capture card – audio alsa:1,0 (or /dev/dsp1) audio sampling limit maybe 32000
    3. Video Source – setup scanning frequncies, and listing grabbers
    4. Input Connections – map a capture card to a video source, also scan for channels in here
    5. Channel Editor – easier to edit with the Mythweb plugin http://mythtvboxhostname/mythweb
    6. Storage Directory – for recordings

    Setup Mythtv Frontend
    Utilities/Setup -> Setup


    • output and mixer device ALSA:default
    • mixer control PCM, so that i can have the master volume at 95%


    • Screen Settings – my tv requires
      • GUI width: 1730
      • GUI height: 1025
      • GUI X offset: 80
      • GUI Y offset: 35
    • Font sizes: Small – 12, Mediu – 16, Big – 25

    TV Settings

    1. General
    2. Program Guide: Eco – Transparent
    3. Playback
    4. Playback OSD
    5. Playback Groups
      • Live TV for v4l can support up to 640 x 480
      • Enable realtime priority threads – need to edit the RTC of the kernel
      • Enable extra audio buffering – without this causes studdering issues on HDTV
      • Disable OpenGL vertical sync for timing – does not properly work for me
    6. Playback profiles:
      • if rez >= 1280 720 -> XvMC-opengl
        • Deinterlace: None or Box (2x) (if a patched is applied and complied in)
      • if rez > 0 0 -> ffmpeg & Xvideo
        • Deinterlace: Kernel
      • Sticky keys and smart fast forwarding settings located here
      • Commerical Skip settings
      • Recording Priorities

    Other settings are for Mythvideo, which is not as complex as setting up the tv part, so that has been omitted.


    • hardware.conf – goes under /etc/lirc/ remote dev
    • lircd.conf – goes under /etc/lirc/ remote control keys
    • mplayer – goes under ~/.lirc matches remote keys to mplayer options
    • mythtv – goes under ~/.lirc maps remote keys to mythtv options
    • xorg.conf
  • Hot Weather in SoCal

    Posted on May 18th, 2008 wt8008 No comments

    Hot weather these couple of days in SoCal, my air conditioner is getting a good workout today, luckily my wallet won’t. I don’t have to pay for the electricity bill. 🙂

  • Ubuntu 8.04

    Posted on April 24th, 2008 wt8008 No comments

    I have caved in and upgraded my laptop using the alternative install cd. I am sure the repo’s are being pounded right now. The apt-get update takes ages to run, so I guess no new packages until the servers calm down. I notice my sound is broken and also my touchpad isn’t working. I have a feeling the sound issue has to deal with the dial up modem driver I installed for my Dell Latitude D420. I guess I’ll try removing it tomorrow, as I don’t have a use for dialup for now. I just used it as AT&T was setting up dry loop DSL at my place.

    The update finally loaded, so now to install the updates that are not on the cd. Maybe that will fix things. We will see tomorrow when I wake up.

  • (K)ubuntu 8.04 arriving soon

    Posted on April 2nd, 2008 wt8008 No comments

    I decided not to watch another episode of ?? and blog, since they are 45 mins long, and I need my sleep. 😉 I haven’t blogged at all since life is just wake up, work, cook dinner, series, sleep. Not much to needed to record down or say. 😛

    Frequently checking digg.com and slashdot.org out is not good for me talking about Ubuntu alpha’s and beta’s and how awesome KDE4 is with screen shots, of course. On Kubuntu’s side KDE4 is the largest update on that side in terms of what is different the user sees, so that is giving me the want to install it right now. There as some changes in Gnome too, but of course not as much as the transition between KDE3 and KDE4. 😛

    The other item I need to address is to fix up my partitioning scheme on my computer.