Archive for the 'Software' Category

Linux: setting up serial console

Monday, April 2nd, 2007

Cuz I forget:

  1. Download kermit, e.g. sudo yum install ckermit
  2. Produce a .kermrc like so (snipped from man page)
    set modem type none
    set line /dev/ttyS0;
    set carrier-watch off;
    set speed 115200;
    set flow rts/cts;
    set parity none;
    set flow xon/xoff;
    connect;
  3. (Optionally) modify grub.conf like so:
    serial --unit=0 --speed=115200
    terminal --timeout=10 serial console
  4. Add to the appropriate kernel line:
    console=ttyS0,115200

Thunderbird IMAP Setup

Friday, March 30th, 2007

This was more of a pain than I expected. My difficulties were in order to ensure that different clients have the same view of the mailboxen. But isn’t that the point of IMAP …. whatever.

  • First, do the basic setup for IMAP, knowing your server name, etc. This is widely documented.
  • You can specify that Sent messages go to one of the IMAP’d folders in the TBird gui, but no so for Trash. For this you need to find the Config Editor (Edit/Preferences/Advanced/General Tab/Config Editor), and then add:
    mail.server.default.trash_folder_name = Deleted Items
  • And then I had the problem that TBird “moves” looked like “copies” in Outlook. This is because TBird by default doesn’t purge from any folder. (Apparently, “delete” in IMAP is just a flag which different clients treat differently. Sigh. So I added this add-on: https://addons.mozilla.org/en-US/thunderbird/addon/1792 — being careful to actually drag the new button up to the button line. I now need to click “Purge” on TBird and hit “Send/Recv” on Outlook to ensure sync. Ah me.

And one non-IMAP setting (but important) — create/modify .thunderbird/ /user.js to include:
user_pref("network.protocol-handler.app.http", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.https", "/usr/bin/firefox");
user_pref("network.protocol-handler.app.ftp", "/usr/bin/firefox");

Installing subversion python bindings

Tuesday, March 13th, 2007

This ended up being a hassle, for two reasons: 1) out of date build instructions in the subversion source, 2) their instructions may not work if you have multiple subversion installations. I learned a teensy bit of python troubleshooting along the way so jotting this down ….

First, building subversion:

./configure --with-apxs=/usr/sbin/apxs   # to build apache mods
            --with-swig                  

Note: in step 2 of subversion-1.4.3/subversion/bindings/swig/INSTALL, I got misled thinking the libsvn_swig_py.so should be there at this step. It shouldn’t. In fact, it won’t be even after step 3, but step 3 does build a similarly named file.

From here out the build was as advertised:


make swig-py
make check-swig-py
make install-swig-py   # switched to root for this step

Second, the install. The problem I had was that I had two versions of subversion installed (on purpose, for compatibility with an old repository on the same server). Unfortunately I was picking up the wrong version of the subversion bindings.

This is what subversion says to do, seems reasonable enough:

$ echo /usr/local/lib/svn-python 
> /usr/lib/python2.x/site-packages/subversion.pth

But…when python parses .pth files, it places them at the end of sys.path, rather than the position of the directory containing the .pth file. So even though I set PYTHONPATH=/usr/lib/python2.4/site-packages, sys.path ended up with that directory at the head, and /usr/local/lib/svn-python at the tail. Aaargh.

Sounds easy, but it took me a while to figure this all out. I learned:

  • python looks for modules in sys.path()
  • module.__path__ tells the provenance of the module; very handy
  • you really want tab-completion
  • Hellaciously long find line

    Monday, February 26th, 2007

    Find all the extensions used in the cvs repository:

    # find all files, skipping the CVSROOT directory
    find . -name CVSROOT -prune -false -or -type f | \
    # extract the filename skipping everything before the last slash
    sed 's/\(.*\)\/\(.*\)$/\2/' | \
    # chuck the ,v suffix
    sed 's/\(.*\),v$/\1/' \
    # ignore files without a . (dot)
    | grep "\." | \
    # extract the bit past the .
    sed 's/\(.*\)\.\(.*\)$/\2/' | \
    # easy part: sort it and only show unique entries
    sort | uniq

    ssh tips

    Tuesday, January 16th, 2007

    A couple things I usually forget:

    • Add “ClientAliveInterval 30″ to /etc/ssh/sshd_config for the server to initiate keep alives every 30 seconds, defeating firewalls that want to drop idle connections.
    • My umask is 002, and ssh checks that permissions on authorized_keys is 644, so be sure to chmod this sucker after creation.

    Python scopes

    Saturday, January 13th, 2007

    Some odd design decisions for python re scope. I gotta think more about this, but I’m groggy.

    • the placement of a “global” in a scope doesn’t matter, but does warrant a warning if there’s an access or assignment prior to the “global”
    • in the absence of a “global” an assignment always creates a variable with local scope
    • global or not, access seeks from local scope outward

    CES Impressions

    Saturday, January 13th, 2007

    Very unsorted impressions:

    DivX seems to be trying to build an entire ecosystem around their codec. This seems like a fruitless enterprise in the day of HD-DVD and BluRay but they are touting compatible players, portable and otherwise, an array of content (including HD disks on DVD?), and more. They weren’t getting a lot of traffic, at least not Monday at 10am. Not really sure what the business model is at this point.

    Eton (owns Grundig) had a big, stylish booth, especially considering their products are decidely unsexy hand-crank radios for emergency use.

    A number of companies are pitching audio distributed through the home via 802.11: Sonos, Logitech (via a purchase of Slim Devices), Philips.

    • The Sonos solution is expensive, their remote looks sexy with an lcd panel and iPod-like scroll wheel. Since their on the floor database had a whopping 11 artists, it was kind of hard to tell how usable it would be.
    • Logitech is more affordable, the remote has no LCD so you need to stare at the box’s display while you pick the music. It uses cell phone style T9 input to pick artists, pretty usable. The entry price is $300-ish, there’s a higher end box, and some cool looking remotes, but I didn’t figure out how they all plug in together.
    • Philips looked nice but the details escape me now; I think it’s spendy

    Pioneer: Elite plasmas look sweet. Showing off their BluRay player.

    Sharp Aquos has excellent LCD TVs.

    LG too: TruMotion, TruColor. LCDs are being emphasized.

    I noticed the news that Toshiba made a last minute decision not to show their SED technology TVs.  Apparently they’re in some patent infringement struggle with Canon (their partner) and a third party.  SED may wither on the vine.
    Talked to a guy from Qualcomm about MediaFlo. Initially being marketed through Verizon, branded as VCast. Transmits on UHF55; he said they had transmitters everywhere, although I thought they only had them in some markets; may be a timing thing. (Vcast coverage map here.) They had content deals with CBS, Viacom (Comedy Central and MTV, Fox, NBC, more. Doing pretty well there, ESPN is a big omission (”we’re in talks”). h264 codec. We talked about hitting the sweet spots in terms of price, content available, screen size, etc.

    Moxi from Digeo is a DVR they’re trying to market to cable cos right now. May be selling direct to consumers at some point; he said to look for an announcement, oh wait. Linux based, he said they have an SDK but not clear if that will be targetted at end-users; also a nice UI, step up from MythTV. Has two boxes one central, and a thin client to receive media streams elsewhere in the house. So DVR plus media network in one. Looks sweet. Curious to see price, and rollout timetable etc.

    Ubicod won a show prize, one of few that seems deserved, for their integrated pvr and home networking solution. Here’s gizmodo’s take, but unfortunately the company’s sites (try ubicod and/or gabia) are pretty weak and they appear to have no channels outside of www.auction.co.kr. Ahem. Best of luck to them; looks promising so far.

    Stopped by the HP booth; they were introducing the G4050 a flatbed 4800×9600dpi scanner with slide/negative trays, $199. Seems like a good deal; reviews were pretty good, the downside is that it’s slow, but hey 2 bills.

    Webcams are plentiful.

    Michael Dell’s keynote:

    • extremely low on content, even for a keynote, lots of cute graphics
    • he knows they’ve sucked on support so:
      • hired thousands of North American support people
      • improved online chat support
      • cut 1-800 #s by 83% (ouch, how many are left?)
      • generally left the impression that they’re feeling the cost of their sins
    • in a stunning lack of vision, Michael Dell professed that the PC will be the center of the consumer electronics world; wow MD, thanks. What a tool.
      • he challenges telcos to provide more broadband in the US
      • he showed a slide of a PC/monitor/printer at a desk; I assumed this was the before of a before-and-after. Nope, that’s the vision. Ahem.
    • 85% of Dell business is govt/corp. Thus the lack of consumer vision.
    • They’re psyched on a new 27″ monitor with increased color gamut. (On the floor Monday am, they had it hooked up to a crappy low-res video card, so it looked awful. Oops.)

    Samsung was showing a lot of innovation in TVs. They’re covering LCD, Plasma, and DLP, but seem to be most pushing LCD:

    • two technologies for improving motion perf: 120Hz with frame interpolation, and with LED backlights, BLU, not sure what it stands for but adjust led illumination dynamically to adjust for motion
    • showing high contrast LCD, which had excellent blacks
    • half their models will be 1080P by end of 2007

    Sharp/Aquos, also showing 120Mhz for motion comp. Interesting: Sharp, Samsung, and many others feed their displays with Component cables not HDMI. Maybe this is because component distribution is much easier (and they like to distribute the same picture to a lot of monitors)? Anyway, they’re happy to show off quality via component, fwiw.

    Sharp was also showing an IP/TV solution. I am baffled that CNet in their frantic foolishness gave this a best of show. Au contraire, when I was approached by some moderately technical Korean guy, I said I thought it was a bust, since its mpeg only, can’t handle streaming video off the internet, etc. You can’t even play a youTube video on the thing. What you can do is shrink your 16:9 image to the left half of the screen (thus getting huge letter box bars and about a quarter of the pixels working for ya) and then putting a browser on the right half of the screen. I guess you connect a keyboard to drive it. Ugh. This is not integration folks. The guy was very receptive though, and emphasized that they’re learning. Inputs to this box are ethernet and HDMI.

    Sharp had a 108″ LCD but they were showing video without motion so I assume the motion sucks. It is big tho.

    Sharp also had a cool LCD for use in cars with 3 distinct viewing angles giving 3 distinct pix. Cool!

    Hitachi is really pushing plasma. “Unleash the power of plasma.” I think plasma is going to lose out to LCD. A wise man once said “never fight ethernet” and he was right. I think LCD may be the same way: not an intrinsically superior technology, but has traction and gets the volume and support technologies to make it fly.

    Hitachi also had the 1st 1TB hard drive (7200 RPM, 14ms read seek time); interesting to see how this ramps down. They also had the 1st 4x BluRay reader. Hitachi is a pure technology company methinks. Good engineering.

    Boy the Canon booth was slow.

    DLP seems like the best picture technology; really mind blowing images, but physical depth is an issue. I think it will die or become a niche for home theater geeks unless they knock the depth issue. Someone is marketing “Slim DLP” which sort of begs the question.

    3 AMD690 vendors, FoxConn, Elite, GigabitTech. Can’t find URLs for the mobos.

    Ultralink HDMI repeater.

    musicgiants.com had a band gigging. They sell high bitrate music, apparently from a small stable of artists(?). Anyway their site had many dead links and only support IE, so ttfn.

    CBS keynote from Leslie Moonves (moon-vase), emphasized community and emphasized media companies need to lead the pack not be reactive, e.g. his guests:

    • he pitched MediaFlo partnership
    • no such thing as new media, old media, just media
    • CSI creator came out pitching community in the form of responding to viewer preferences re character fates; this is just easier marketing to me not really community; this was the worst example of community, prolly b/c tv is not about community (except maybe the water cooler)
    • CSTV, Brian Bedol, pitches an interactive video chat about basketball (Duke-UConn, whoohoo!)
    • paltalk.com a chat site based around morning radio djs
    • ourchart.com a web2.0-ish thing based around the L-word show, they had the creator and Jennifer Beals on stage
    • the YouTube founder Chad Hurley gave a super wooden speech, poor guy, but I guess CBS puts a lot up on YT??
    • Second Life; I’ll certainly buy that this is community
    • SlingBox was pitching clip and sling, pretty impressive that CBS is cool with this, not clear what all the restrictions are

    Kubuntu 6.10 Install Log

    Monday, November 27th, 2006

    sudo apt-get install ntp-simple

    add \”capability\” to /etc/modules, nothing worked, I finally went with an hourly cronjob running \”sudo ntpdate pool.ntp.org\” — ugh!
    cifs mount\’s of mp3\’s on windows box, but Amarok db is still f-ed up

    nvidia install was a nightmare, not even sure what made it half work, worst time I\’ve had installing nvidia drivers ….

    java install

    firefox was working great for a while and then it stopped; ethereal (now wireshark) revealed a dns lookup problem (nslookup had worked tho) a bit more googling and apparently it’s an ipv6 problem to these silly actiontec dsl routers, easily disabled: so in about:config, I found network.dns.disableIPv6 and set the value to true

    FC5 remote X clients

    Monday, November 27th, 2006

    Sheesh, this was more hell than anticipated. I had to do the following:

    1. “xhost +” — yes this is overly permissive but I’m comfortable inside our building firewall
    2. gdmsetup, Security tab, uncheck “Deny TCP connections to Xserver” which adds “DisallowTCP=false” to the [security] section of /etc/gdm/custom.conf
    3. allow the firewall to pass the x11 ports; I’m not sure what’s recommended for FC5 but I used firestarter: “yum install firestarter”, then under the Policy tab, Inbound section, add a rule for x11. Since firestarter doesn’t come with FC5 by default, what do they want you to use? Direct editing of /etc/sysconfig/iptables?

    My friends were “netstat -lt” and of course ethereal. There’s probably (maybe?) a simpler way but these steps all seemed to be necessary ….

    Fun with libraries

    Friday, October 20th, 2006
    Libraries have been installed in:
    /usr/local/lib
    
    If you ever happen to want to link against installed libraries
    in a given directory, LIBDIR, you must either use libtool, and
    specify the full pathname of the library, or use the `-LLIBDIR'
    flag during linking and do at least one of the following:
    - add LIBDIR to the `LD_LIBRARY_PATH' environment variable
    during execution
    - add LIBDIR to the `LD_RUN_PATH' environment variable
    during linking
    - use the `-Wl,--rpath -Wl,LIBDIR' linker flag
    - have your system administrator add LIBDIR to `/etc/ld.so.conf'
    
    See any operating system documentation about shared libraries for
    more information, such as the ld(1) and ld.so(8) manual pages.