Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; AP_Twitter_Follow_Button has a deprecated constructor in /var/www/vhosts/ on line 14

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; latest_twitter_widget has a deprecated constructor in /var/www/vhosts/ on line 12

Deprecated: Methods with the same name as their class will not be constructors in a future version of PHP; wpSpamFree has a deprecated constructor in /var/www/vhosts/ on line 3890
Greg MacLellan » 2006 » July

Greg MacLellan

July 23, 2006

MythTV + PVR150

Filed under: Code,General,Technology — groogs @ 10:21 pm

I have been using MythTV in my living room for the last couple of months, and it’s quite a nice setup. Originally, I got it as a media player after the DSM-320 didn’t live up to my expectations (it’s still usable, but it’s been relegated to the 13″ TV in the bedroom).

MythTV main menuWe don’t actually subscribe to cable, and only get a few network channels that ‘leak’ through from the cable internet, so I never really intended it to act as a PVR. One day I happened to see a good deal on a Hauppage PVR-150 that included a remote, so I figured what the heck.

Recordings screenIt’s nice to have it record a few shows every day, and the “only keep x episodes” feature is handy. I even have it recording the local 6 o’clock news (and only keeping 1 episode) since I never usually watch it at that time. It’s also nice to always have a few episodes of The Simspons to pick through.

Media Library screenI’ve never been a slave to the TV schedule, I’d rather just not watch something than re-arrange the rest of my life around a tv show. For shows that interest me enough, I’ll download them and watch them at my leisure, and never miss an episode or watch them out of order. Having a PVR to do that just makes things easier.

Live TVOverall, myth was fairly straightforward to get working. I installed it on a Debian Sarge box, from source, along with ivtv and lircd.

Program GuideI wanted to post some of my config files, particularly for the remote setup, since it was very difficult to find the files for these, and for some unknown reason almost no one has posted complete configs (that have all the buttons configured) for the remotes.

  • /etc/lircd.conf – Remote definitions for various Hauppage remotes
  • /home/mythtv/.mythtv/lircrc – Mapping of remote buttons to MythTV commands

Caller ID on screen displayI also have asterisk and FreePBX installed to run my phones (I’ll write another post about that another time). One of the nice things about it is I have an on-screen popup when someone calls. I’ve written instructions on how to set up freepbx with mythtv osd on the FreePBX documentation wiki.

It does take a bit of reading and a bit of playing around, but it’s well worthwhile to setup MythTV as a PVR.

By the way: sorry about the crappy quality images for the live TV, it’s from my cell phone camera. I couldn’t take a screenshot of the video output (it just came out blue, like in the program guide picture).

July 5, 2006

Improving Windows Roaming Profiles

Filed under: General — groogs @ 11:41 pm

We use roaming profiles on our network which is handy for a number of reasons. It’s easy when users use another computer than their normal one, or want to log on to a laptop for a presentation or meeting (a couple of which we share). It’s also handy as an administrator since I can basically swap out their (faulty) computer with another without much interruption (I also use automated application distribution).

While for the most part roaming profiles do the job, there are a number of problems. The most notable is that when the profile gets large, logon and logoff takes a long time, as Windows insists on copying everything, even if it hasn’t changed. There are also obscure errors that can happen when processes remain open during logout (“\\server\user\profile.pds not found”), or when a logoff or login happens when not on the network (think laptop users that use ‘suspend’ mode a lot).

I’ve been trying to find ways around them, but the best suggestions seem to be:

  • Keep your profile ‘small’Why should I have to do this? More importantly, why should I force my users to do this? Maybe 6 years ago, a few megabytes was a reasonable size for a profile, but nowadays, I have individual pictures that are a few megabytes each. User data has grown in size, the ability of Windows to handle a large profile hasn’t.
  • Redirect Desktop, My Documents etc to network sharesThis is a great tip for desktop systems, but not for laptops, and certainly not for hybrid environments where users interchangably use both. While ‘offline files’ theoretically takes care of this, in reality it causes many more problems. If two users log on to a system, that system will forever try to synchronize files for both of their profiles – no matter whose profile you’re in. This obviously fails, as user A doesn’t have access to user B’s network shares. In my experience, it’s also not very smart, often failing to see a network server even though explorer does, or randomly switching to offline mode for no apparent reason.
  • Redirect Desktop, My Documents etc to local (non-roaming) foldersThis makes the settings for a profile roam, but obviously not the files. Switching between computers means you lose your stuff, not to mention it doesn’t get backed up on the server.

With these ideas in mind, I’ve tried to figure out a way to get around the limitations and bugs (which existed in NT and continue to exist in XP, with no signs of going away) while preserving the useful traits of roaming profiles and offline files.

The best solution I’ve come up with so far is to use a file synchronization program (like AllwaySync or the open-source FullSync) to do the transfers. Basically, I would redirect the ‘big’ folders (Desktop, My Documents, Application Data, Start Menu) to local paths only so they don’t roam with the profile, and then use the sync program to keep them synchronized to folders in the user’s home directory on the network.

AllwaySync in particular has some features that make this very useful: it can synchronize at logon/logoff, as well as on intervals or even watch for changes and synchronize ASAP. The ability to synchronize while working brings a number of benefits: for laptop users that use suspend at the end of the day instead of logoff (me!), the files are still pushed to the server (to be backed up, or available if you forget your laptop the next day); it’s possible to be logged in to two computers at once, and have a file you save show up in your My Documents folder relatively quickly; and if something happens to your computer before you logoff (power failure, or worse) then at least most of your stuff should be copied to the server.

So you may be wondering why I’m writing this article as a theoretical idea instead of as a how-to. Well, there are some shortcomings that need to be overcome. AllwaySync (as of 4.6.1) has a bug, where it is unable to copy read-only files to a linux server (it copies to a temp file first, then tries to move it, so in case it’s interrupted you don’t get a partial file — linux doesn’t allow moving a file with no write permission, while Windows does). As there are a number of read-only files stored all over the place, I cannot do a full synchronization. The XML configuration file for AllwaySync is also incredibly confusing and complex, which may make it more difficult to generate automatically for use. I’m not as concerned about this though.
I’m not sure if FullSync will fit the bill or not, but I will investigate. It doesn’t look to be as full-featured as AllwaySync though. If anyone has any other suggestions, please let me know.

I will post again about this, hopefully as a how-to once I find a solution that works. I just wanted to get this out there to gather some feedback, and so I don’t have to explain the why part again, once I figure out how to do it. :) Keep watching for updates here.