Tips and Tricks


October 28, 2007: 7:53 pm: MatthewFamily, Linux Misc, MythTV, Technical, Tips and Tricks, Ubuntu

Wow, I was putting together my MythTV machine and it was OK until I had to get my remote front-end working. Because of the WAF, I selected a small machine - the Hauppage MediaMVP. What I didn’t recognize was that the documentation for getting it running… umm… stinks. Or at least is severely misleading (http://www.mvpmc.org/ mvpmc-HOWTO-singlehtml.html, not linked so you don’t try and use it. I should have noticed when it used software 13 versions old.). Or is really hard to find. So here’s my trials and tribulations and fixes, for anyone who is doing it.

Add to Ubuntu (Feisty Fawn) to get the mvpmc code loaded:

apt-get install atftpd tftp
mkdir /tftpboot
chmod a+rwx /tftpboot
export TFTPBOOT=/tftpboot
cd /tftpboot/
wget http://downloads.sourceforge.net/mvpmc/dongle.bin.mvpmc-0.3.3?modtime=1169 586056&big_mirror=0
ln -s dongle.bin.mvpmc dongle.bin.mvpmc-0.3.3
ln -s dongle.bin.mvpmc-0.3.3 dongle.bin.mvpmc

but then I was shocked to find that while the config files for inetd were created, there was no inetd. So…

apt-get install xinetd tcpd
apt-get install nfs-common nfs-kernel-server
cd /etc
e exports
ls /media/hdb1/mythtv/recordings/
/etc/init.d/nfs-kernel-server start
/etc/init.d/nfs-common start
update-rc.d nfs-kernel-server defaults

and then it wouldn’t read the config file. Time to add the setting to have xinetd use inetd.conf…

e /etc/init.d/xinetd
add in flag: -inetd_compat

I learned that the instructions on mvpmc.org are pretty specific to the first generation of the machine, the H1. However, those aren’t made any more… and once I got into trouble, each piece turned out to be challenges with the version. I’ve got an H3. For that, you need a special service that whispers magic incantations into the ear of the MVP. It also needs a significantly different guide… and after searching and searching (has VLC notes for future) and searching (supersweet detail, enough to choke on and more, which also gave me the link to…) I finally stumbled across on http://mvpmc.wikispaces.com/ and started getting more progress on MythTV setup… well, almost…

e mvpboot.pl

and I then went spelunking into mvpboot.pl and mvprelay.c -

perl -MCPAN -e shell
install Net::Interface
apt-get install initrd-tools gcc
dd if=dongle.bin.mvpmc-0.3.3 of=dongle.bin.ver bs=1 count=40 skip=5

So once again I’m thrilled by Debian/Ubuntu and their dependencies… as well as the prompts (when you run a nonexistent program, Ubuntu now suggests packages to install that provide the command you’re trying to use… very cool). But I hate how I rely on them, because I thought once I actually installed GCC that it would work. I finally was googling and found I was still missing one big piece:

apt-get install build-essential

and now all the compilation stuff worked and Perl was happy. Argh!

I then started fighting my drive definitions… I had partitioned my three drives in a marvelous way, redundancy for the OS and big space for the media:

Mirrors on drive 1 and 2:

  • 100mb - /boot
  • 2gb - swap
  • 28gb - /

One big XFS drive (3) for media:

  • 400gb - /media

except it appears Ubuntu uses /media for its mount space, and somehow my brain didn’t register that. So when the folder was there, I thought it would have my big space… but no. Fought with fstab a while and eventually got it so the last drive moved to /mediafiles and all started working.

Now the shiny stuff. MVPMC can stream music from a central server, too…

apt-get install slimserver

and it didn’t work that well when I put it in. All I could get was a statement from Live365 that I wasn’t logged in. Shockingly, when I went to the SlimServer instructions and did some basic configuration :P it worked. Who’da thunk it?  I also had to chmod 777 to get it to read the media… I’ll clean that up later.

Other MythTV bits:

apt-get install mythweb mythmusic mythvideo mythplugins ogle mplayerapt-get install vlc videolan-doc

Followed the instructions on setting up vlc. It also said I needed mpslave to use aacPlus or Real Audio streams… right now I don’t need that bad enough to do the work. It’s not working yet, so I’ll have to poke it more later.

What remains? Glad you asked…

  • For some reason the network connection is running at 10mb Half Duplex. Since it happens with other computers on that drop I think it’s a switch or wire problem.
  • mplayer on my mvpmc only shows streaming radio successfully from live365 and the other XML is having parsing errors.
  • slimserver is cataloguing AAC files from iTunes but not playing them, even the unencrypted ones
  • I have to set up playlists and my local radio stations as m3u links so we can use them also… should be easy, just has to be done…
  • I want to get the ReplayTV and Filesystems menu items to not display, which should be doable according to the commandline argument writeup but it somehow isn’t.
  • Live TV isn’t running yet (but we almost never watch live TV so I don’t care much)
  • Get VLC working
  • Clean up the /mediafiles/music chmod 777 hack
  • Oh yeah, and getting it working with remote systems so I can drive the other two TVs. I’m going to see if I can get my hands on an AppleTV to get a richer interface for the Myth frontend and still have iTunes playback work for the stereo… that might be better for music playing. Not to mention then it will have HDMI or composite video which would be very good if we upgrade our TVs anytime in our life… sigh.
October 24, 2007: 11:19 pm: MatthewTips and Tricks, Ubuntu

I wanted to have my server with X installed but not starting, and found a handy tool rcconf from a discussion about how to keep X from running automatically.  It handles the startup alterations for you, kind of like chkconfig in redhat.

Technorati Tags: , ,

October 17, 2007: 9:23 am: MatthewBusiness, Firefox, Security, Technical, Tips and Tricks

A friend of mine, Bill, found out that his password had been mailed to him in plaintext from his ’shiny, new 401k’ and he wrote about the disconcerting experience of a financial services company being careless with security. Having worked in a financial services company, I can only say that the troubles he encountered are not that bad… you should have seen some of the sausage in the factory I worked in.

That said, Bill violated a crucial rule of security and he needs to learn it as much as the Schwab folks need to learn their own lessons:

Never, never, never depend on someone else to provide your security.

Bill “used one of his common passwords”… and you shouldn’t have any of those. A common password is a common vulnerability, especially because you can’t know how companies will protect your passwords or your data — as he unfortunately learned. To avoid this, you can use a desktop application (such as the free Password Safe, originating from Bruce Schneier’s Counterpane Labs) or a browser plug-in (such as Password Hasher or Secure Login or any of the other 48 listed on the addons site) or the Mac’s built-in Keychain app so you can generate random passwords and never, never reuse them. Personally, I’ve been using Password Safe for years.

He also offers great tips for websites to make their applications more secure, like not asking for really constant, common, data like mother’s maiden name. The other option is to not answer with an expected response. Mother’s maiden name? Istanbul. Honeymoon location? Jones. And so on…

Never trust someone else’s security.

Technorati Tags: , ,

October 14, 2007: 8:43 pm: MatthewLinux Misc, Technical, Tips and Tricks, Ubuntu, WordPress

More quick reference links to apache goodness: mod-rewrite and virtual hosts overview. Next step, hooking up the rewrite so my old-format links with multiple blogs point to the new-format post URLs. sigh.

Wordpress is simple, but it still isn’t psychic.

And I also found that Redhat has a nice overview of named for those of us still learning BIND.

October 2, 2007: 8:33 pm: MatthewBusiness, IPCop, Technical, Tips and Tricks

from a tech reference article

  • once connected open the file:
  • /var/ipcop/ovpn/server.conf
  • Add a line for each XXX subnet you want:
    • push “route 192.168.XXX.0 255.255.255.0?

    August 16, 2007: 9:11 am: MatthewSecurity, Technical, Tips and Tricks, WordPress

    Comprehensive Wordpress Plugin Database with Plugins Tracker

    AskApache htaccess password builder

    and then some tips on WP security:
    drop version string
    block viewing of plugins/themes folders
    and htaccess (see link above)

    whoops, almost forgot Lorelle’s mention of a theme security scanner… which is this security scanner here.

    Technorati Tags: ,

    August 7, 2007: 3:48 pm: MatthewSoftware Development, Technical, Tips and Tricks

    here’s a handy tool to validate pdf files in java

    Technorati Tags: , ,

    June 19, 2007: 9:35 am: MatthewTips and Tricks

    From a WebCT Student FAQ:
    Prevent Internet Explorer from opening
    Office files inside browser windows

    Note: This tip for PC users applies
    only to Internet Explorer, running under Microsoft Windows 2000 or XP.

    Are you tired of Internet Explorer’s
    insistence in opening Microsoft Office files (Word, Excel or Powerpoint)
    in a captive window within the browser? If you would rather have IE open
    Excel or Word documents in the native applications (and even give you a
    choice to save it to disk), here’s how you can do it…

    1. First open any folder (My Documents
      or a regular file folder) and click the “Tools” menu item, then select
      Folder Options....

      My Documents window showing "Folder Options" location

       

    2. On the resulting dialog box, click
      the “File Types” tab (it may take a bit of time to build the list),
      then scroll in the “Registered file types:” window until you find the
      appropriate extension(s) for the files whose behavior you want to
      change (DOC for Word files, XLS for Excel files, or PPT for PowerPoint
      files) and highlight (i.e., click) it.

      "File Types" tab of the Folder Options settings window

       

    3. Click on the
      Advanced
      button to get to the settings for this file type (in the Edit File
      Type dialog).

      "Edit File Type" dialog for setting how files open in Windows

       

    4. UNCHECK
      the “Browse in same window” option, and, if you want to have the
      browser ask whether to save or to open the file each time you
      encounter one, check the “Confirm open after download” box.

    You’re done! Now, whenever you click a
    link to a file having the extension you just changed, Windows will ask
    you whether to save the file to disk or to open it… and if you choose
    open, it will do so in the native application for the file, rather than
    in an embedded (and limited capability) browser window.

    May 1, 2007: 10:35 am: MatthewTechnical, Tips and Tricks

    From the same Slashdot computer-configuration article:

    On Windows
    (Score:5, Informative)
    by ewhac (5844) on Thursday April 05, @12:32PM (#18625205)
    I’ve done this a couple of times recently — once for my new machine, and once for a friend of mine whose machine got pwn3d. My checklist works roughly like this:

    * Perform an inventory of the hardware in the machine. Note especially the vendor and model number of the major components. You’ll need this later.
    * Establish partitions on the boot drive (only if I’m dual-booting Linux or BeOS or something).
    * Yank network cable.
    * Install Windows from installation media. This takes a ridiculous amount of time, considering that most of the work is (should be) simply copying files. Reboot.
    * Install Service Pack 2, which I conveniently have on a separate CD I burned. Reboot.
    * Crank up Windows firewall to highest setting, or moral equivalent thereof (I’m behind a NAT router, so that works).
    * Visit Windows Update, and download all security and bug fixes. Duration depends on connection speed, but it can easily consume an hour. Reboot.
    * Using the hardware inventory you prepared earlier: for $item in $inventory ; do
    o Visit hardware vendor’s site.
    o Locate, download, and install latest device driver(s) for $item.
    o Reboot.
    * done

    At this point, you have a usable machine. If it’s my machine (and even if it isn’t my machine), I usually install the following software:

    * Firefox [mozilla.com]
    * Vim [vim.org]
    * VirtuaWin [sourceforge.net]
    * TreeSize [jam-software.com]
    * PuTTY [greenend.org.uk]
    * WinSCP [winscp.net]
    * TweakUI [microsoft.com]

    Schwab

    February 15, 2007: 1:09 pm: MatthewBusiness, Firefox, Technical, Tips and Tricks

    Firefox is now 2, and I have a new tweak list - actually, it’s mostly the same ones but I don’t trust other sites to still exist after I lost a few…

    And remember, you can get to these through about:config really easily…

    • // Disable image animation

      user_pref(”image.animation_mode”, “none”);
    • // Enable frame resizability

      user_pref(”layout.frames.force_resizability”, true);
    • // Prevent popups to hide the urlbar

      user_pref(”dom.disable_window_open_feature.location”, true);
    • // Prevent popups to hide the menubar

      user_pref(”dom.disable_window_open_feature.menubar”, true);
    • // Enable pipelining to increase the speed of (broadband) connection (10 on the second line can be any number)

      user_pref(”network.http.pipelining”, true);

      user_pref(”network.http.pipelining.maxrequests”, 8);

      user_pref(”network.http.proxy.pipelining”, true);
    • user_pref(”network.http.max-connections-per-server”, 16);
    • user_pref(”browser.search.openintab”, true);
    • user_pref(”accessibility.typeaheadfind”, true);

    Disable only certain annoying JavaScript tricks:

    Tools ->
    Options -> Content -> Enable JavaScript -> Advanced ->
    uncheck (according to your taste) Allow scripts to “Move or resize
    existing windows”, “Raise or lower windows”, “Disable or replace
    context menus”, “Hide the status bar” and “Change status bar text”

    set keyword.URL to prevent I’m Feeling Lucky

    More tips from ComputerWorld

    Technorati Tags: , ,

    Next Page »