Linux Articles

Posting with Blackberry

Hey folks, I finally took the plunge and purchased a Blackberry when I was in Montreal. My contact list migrated over nicely and I crafted a whitelist system so only those people I have emailed or referenced in past conversations make it to my mobile (so no spam while I'm out and about).

The other neat feature is this post, which was originally an email from my wireless device. What fun!

A Linux weekend

This Labour Day weekend I took some much needed time to organize my life and made a lot of changes to the server configurations. After about a day and a half at the console I was able to accomplish the following tasks:

  • Migrate my iBook and media server to Linux 2.6.8 kernel
  • Install a new sound subsystem, alsa, on iBook
  • Configure wacom tablet to work with Linux on PowerPC (still not perfect)
  • Update file share configurations for the media server
  • Move all the laptops to the router (as opposed to the media server)
  • Setup Macintosh OSX to run within Linux, like Windows runs in Parallels
  • Configure networking for the virtual Macintosh
  • Change firewall configurations on three of the servers

Migration of the kernel spurred all this activity. Back in 2004 I had a similar configuration but lost it all due to a hardware failure. With all of the advances in the kernel and Debian packages this will finally enable me to do some serious audio routing on Linux.

None of this would be possible using the "bleeding edge" technology that many Linux fans love. I stick with a "stable" version of Debian because by the time I get around to doing these tasks most situations (even on a freaky iBook configuration) have been well documented.

Category: 

AOL will sell your soul

For AOL users out there, hold your breath. Your information is out and everyone knows what you're thinking. If you are like user 927 you might have some things to hide. This week AOL released a lot of user data with hopes that it would stimulate some new research on their clients. With only a user ID nobody can be identified, right? Wrong. Search patterns can easily identify a user, especially if they are visiting sites made by friends and family. After a lot of public outcry AOL decided to pull the data. For reference, Google has been down this road before but they are continuing to log user searches anyway.

Category: 

Radio station prototype on Debian

Dreaming in Linux. Just prior to making the switch from the Macintosh to Linux as my primary operating system you could find me in the Sonic Research Studio editing tapes and doing other fun stuff with audio. This had been going on for a couple years during my time spent in the Communication School at SFU.

After spending countless hours copying files back and forth from disks to tapes and back again I started to think there could be a better way of doing all of this. Networking has advanced a lot since sound research has been going on, but distribution has been lacking. I'm sure something could be said about the RIAA and it's tactics but let's leave that one alone for now.

Differing approaches to online media distribution

Currently sound is delivered to users through a number of methods. One methodology is through file transfer, where users connect either by http, ftp, or p2p networks to exchange files with one another. Instant messaging works similarly by acting as a p2p framework where users can send files right off the desktop without having to "repackage" the media into different forms. Since it is just a copy little new creative work is put into the transfer.

The other emerging framework is that of push technology, the technology buzzword of yesteryear. In this camp you have two common offerings: streaming media and podcast-style downloadable shows. Both of these share a common thread in that they require some kind of "programming" (not in the technical sense) to go on prior to the music being put into production. This usually involves some kind of radio announcer and/or DJ to coordinate the pieces that make up the "show". These technologies cross the line into composition where much more creativity is possible.

Configuration steps required to get running

Having a personal webserver at my disposal I decided to make an attempt at constructing my very own Internet radio station. Over the course of an evening I was able to setup a prototype site, streaming some media over my home network to my Linux laptop without ever copying a single file. The most important thing I learned was the division of responsibility for the programs that run the station. You need to run something like a web server, which is fed the streams by a streaming server (there are a few out there), and finally you need some kind of playlist-generating script to load up the content.

After the initial configuration was setup I had a chance to review my work. The low bitrates were a little disappointing at first, and the sound quality cannot compare to an original file since the compression takes a lot of the fun away. What really excited me about this setup is that with LiveIce I was able to perform some light mixing tasks as the files are being encoded. The two-channel mixer has speed, volume and source file commands that will excite any novice that is new to mixing. When I'm done playing with this program I will likely switch to "shout", a streaming program that I hear may have some additional options for playlist controls.

Looking for more information on how to setup your own server? Be sure to check out the MP3 Howto for a general overview of the configuration steps.

Category: 

Managing mailing lists with ecartis software

For all of the domains hosted on this server they have one thing in common: they all use ecartis as their mailing list manager.

Why ecartis as opposed to mailman? It was a tough choice, but it basically came down to the configuration steps required on Debian. Mailman needed to be recompiled or something like that or I would have had to redesign a bunch of webpages to get it going. Ecartis just works once you know the system.

Let's update your mailing list

You need to interact with ecartis by sending it email. You can be either a manager or a user, it doesn't matter. Your commands will be different depending on who you want to be.

Letting users take care of things themselves:

To add or remove yourself from a list you must email ecartis with the word "subscribe" or "unsbuscribe' from the account you are using. The email address to send to is often <listname>-request@<website>

Subscribing
  • Draft an email to ecartis
  • Put "subscribe" in the subject line
  • Send the message
Unsubscribing
  • Draft an email to ecartis
  • Put "unsubscribe" in the subject line
  • Send the message

 

For administrators:

Your commands will be the following, email them to ecartis. It will take these values and send you a ticket you must approve before the changes are made.

 

        # always start with admin2 and the
        # list name

        admin2 testlist

        # then manage your old users,
        # changing all their settings around

        setfor user@site.xyz MODERATOR
        setfor user@site.xyz CCERRORS
        setfor user@site.xyz REPORTS
        setfor user@site.xyz ADMIN

        # a command structured as these unset
        # commands will assume the last email
        # from above will be the same here

        unset CCERRORS
        unset REPORTS

        # we can also add people to the list
        # or remove them.  bye joe!

        unsubscribe joe@example.com

        # the rest of the commands for
        # managing users, use them as the
        # commands above are used

        NOPOST 
        DIGEST
        DIGEST2 (digest & the rest)
        VACATION
        ECHOPOST (self copy)
        HIDDEN

        # say goodbye to ecartis!
        adminend2
        

 

Finally, a schedule... done a very strange way...

I am now ready to give up paper. Long ago I gave up on Outlook's calendaring functionality as my primary time management system. At work it proves useful and it does a lot of good things. As you would expect though, I have a better way.

For a long time that better way was paper. I like to have a 7-day spread in front of me at all times in meetings and at play. During my hour-long commutes to Simon Fraser this was a flexible way of managing time. Since then my needs have changed only slightly but the nature of my work has changed too.

At the office I have fewer meetings than I had back in my university days. Hard to believe, but it's true. I was at a lot of meetings when I was studying. The other major shift is that I am now often chained to a desk like most workers. And this means Internet. The same thing goes for home, and at the cafe, so I'm noting this trend: the Internet seems to be everywhere. I bet you noted it too. So why is it that most people with calendars do things the same old way?

Familiarity is one reason. Having the ability to see things as a seven day spread is is vital to the success of any scheduling system I use. Simplicity is another. I prefer paper because there is only ever one way to use it: by writing. For me only the shell compares, so I wrote some scripts that utilize the shell and a software package called mhc to come up with a new way of scheduling.

How does my schedule work? First, I input things into my calendar using a command line tool. It prompts me for the necessary information and then quickly disappears when everything is ready to go. Then, I produce a listing of this week's entries by using the "today" command. I made one modification to the default behaviour by overriding the reporting of Sunday. I prefer Monday as the start of my week.

The last step in my configuration is to display the information out somewhere I can find it. I have a special program on my computer which I created as a "dashboard" for the shell. It displays random information so I extended it and added some additional sections. Here's what it looks like, by section:

  • Time - current to North American time zones, in 24 hour format
  • Week - the official week of the year, counting up to 52
  • Schedule - listing from Monday to Friday ending this story on a good note
  • Calendars - the three most relevant months, this one, the last, and the next one
  • Fun - stuff that is fun, like the music currently playing

Why did I select these items? Primarily because they are related to time. The 24-hour clock makes things easy to work with, and time zones are necessary for my work. The week of the year is a great planning tool for newsletters. The seven day schedule is a requisite but it is sorted to create the maximum level of personal excitement. The rest is all relative to what you think is important. For me this is the current song, making only the very top and bottom of the listing to have frequently updated information.

Category: 

"Week of month" calculation for cron

For those of you who actually keep a regular schedule you will love this one. How often do you find that Unix is so much fun but it just can't do the simple math to figure out what week of the month it is? Well, with this script you will fix that in short order.

To accomplish this I owe one to Irek Szczesniak, who had created a script to put a calendar onto an image. Irek's code figured out what the week of the month was in some simple statements so I expanded upon these to produce some creative output.

Use 1: Finding the week of the month

This one is pretty simple, run the command and it will produce the current week of the month, assuming Monday as the first day and that the first "full week" is the one that counts.

kappa@verbosity.ca:~$ wom
1

kappa@verbosity.ca:~$

Here the script has checked the calendar and determined that the 9th of July in 2006 is the last day of the first full week. Again, rememeber that Monday is the first day of the week you crazy North Americans!

Use 2: Executing commands based on the week of month

 

This is what I really wrote the script for. The "wom" script also accepts one parameter which is the "desired week" you are seeking. If you input a value here it will be compared against the current week of the month and set the exit status accordingly.

kappa@verbosity.ca:~$ wom 1 && date
Sun Jul 9 21:06:42 PDT 2006

kappa@verbosity.ca:~$ wom 2 && date

kappa@verbosity.ca:~$

So, if you have a command that you want to put into your crontab all you need to do is prefix it with "wom 1 &&" to make sure it only happens on the first week of the month. Enjoy.

Here's the code:

 

 

Category: 

China's custom firewall rules revealed

The national firewall of China is starting to show it's age. Long since western organizations put together this mythical beast meant to keep the public ill-informed the walls are coming down. Well, figuratively at the least.

Researchers have discovered that the firewall does not actually block traffic but rather sends out "reset" packets when you try to download content with keywords that are restricted. This prevents you from viewing the content because your computer stops waiting for it.

What this effectively means is that you can get any content from within China if you ignore the resets that are sent to you. Although I have never tried this myself, it is said to be trivial by the press that is re-reporting the original storey.

Does this mean you can go to China now and start a renewed democracy movement? Probably not. The authorities could presumably monitor the number of resets being sent to you and follow the flood right to your door. Encrypting traffic by accessing a western-based server as a proxy remains the only reliable method for subverting the firewall. Even then, authorities will know you have a connection from point A to B so be sure both computers reveal nothing personal about you!

Category: 

Linux media server rebooted, uptime ramblings will follow...

The root of my network will be restarted today, the server "mcluhan" acts as my main file server for all things media. The network services like web serving and email continue running, as does the desktop in the apartment.

In the computer world we celebrate uptime like some kind of cult. mcluhan has been running 196 days until now. This rivals the uptime that I had when living on 1086 Bute Street when my uptime was also around 200 days. I am always recoiling over the amount of time I spend confiugring computers and this outage is no different. I will have to reopen a few documents I have had open for months, and restart a couple system services. Crazy times. It makes me glad I settled with Linux after brief forays with Macintosh and Windows failed to excite me.

Forthcoming upgrades will provide extended battery backup and some network redundancy in another city. That will allow this system to serve out busy sites and develop out some creative email services. Look for within about a year's time. You know I only restart once or twice a year.

Category: 

On changing Linux server configurations...

Today's reboot was a success. The TV tuner card is now firmly embedded in my network. Thus far not a single frame of video has appeared. I'm saving the configuration for another day. Reason being: I need to recompile the modules (drivers) for it. That sounds really scary but it's just a matter of knowing the special incantation to make it work. This will require some browsing of my notes from the ol' kernel compiling days.

Once I've run the commands to compile the modules I will just need to load them into the system and the card should become active. At least that's my expectation. Rebooting should not be required unless a core-level kernel change is required. If that's the case I will likely take the opportunity to get a new kernel to run the drivers. Should everything go according to plan the next step will be adopting the ALSA subsystem for my environmental audio.

Music rotation is now being handled by "moosic", a free program that can slice and dice a playlist any way you like. A few of my script wrappers are getting updated to reflect the changes. This system should allow me to create multiple ongoing streams, like radio stations, and push them out on any device (to multiple sets of speakers) or to the Internet in real time.

UPDATE! The server experienced it's first crash ever. The user space halted as a result of either overheating or electrical disturbances caused by the tuner card. This card is pretty much junk, so it has been removed from the network. Good thing I didn't invest all day in this. Whew!

Category: