January 2006 Archives
January 31
It seems I need a new kernel
I am told udev needs at least kernel
2.6.12 so on my backup computer I will have to install a new
kernel, and of course redo the wireless and video drivers. Then I
will try once more to upgrade to udev.
Nobody wants to be the only kid on the block not running udev.
I have quite by accident discovered bash's 'ESC .', that is, run a command and then press ESC followed by a period. It places the last argument of the last command you used onto the command line. Lets say you want to look at a file but are uncertain if its a binary file or text
Nobody wants to be the only kid on the block not running udev.
I have quite by accident discovered bash's 'ESC .', that is, run a command and then press ESC followed by a period. It places the last argument of the last command you used onto the command line. Lets say you want to look at a file but are uncertain if its a binary file or text
$file /var/log/exim4/mainlog
/var/log/exim4/mainlog: ASCII text
less [ESC] .
becomes...
less /var/log/exim4/mainlog
pretty nifty, and you can repeatedly press ESC . to go back in your
history.January 28
udev upgrade has broken my system
This morning on my backup computer I
did a weekly upgrade and as usual lots of packages needed
upgrading, but one package hotplug, was marked to be removed and
replaced with udev. I knew this was a big leap, I have seen the bug
reports for udev and of course the hundreds of posts on the
debian-user mailing lists.
I thought though that sooner or later I will have to make the switch and let it do the upgrade. When I rebooted, the wireless card didn't come up, there was no sound and no X server. For this machine its not a big deal because I pretty much use it for backing up my other computers, and testing upgrades like today's so that I can see what problems I will have on my main desktop.
The X server wont come up because it cannot find /dev/input/mice, this seemed easy enough to fix, I tried /dev/input/mice, /dev/input/mouse0-3 and /dev/psaux with no success. I guess its moved somewhere?
There is no sound because of a missing /dev/dsp, even though its the same device and symlink as on my non udev desktop
So...some poking around on the web is needed to fix this mess. I think my kernel 2.6.8 might be a problem, I might need a newer one?
The other, most tempting option is to remove udev and reinstall hotplug. But if udev is no going to go away, it seems like something I should probably learn to deal with.
In the meantime, my main desktop will sit and wait, I will just put udev on hold for now and update all the other packages.
I thought though that sooner or later I will have to make the switch and let it do the upgrade. When I rebooted, the wireless card didn't come up, there was no sound and no X server. For this machine its not a big deal because I pretty much use it for backing up my other computers, and testing upgrades like today's so that I can see what problems I will have on my main desktop.
The X server wont come up because it cannot find /dev/input/mice, this seemed easy enough to fix, I tried /dev/input/mice, /dev/input/mouse0-3 and /dev/psaux with no success. I guess its moved somewhere?
There is no sound because of a missing /dev/dsp, even though its the same device and symlink as on my non udev desktop
armarda:~# ll /dev/dsp
lrwxrwxrwx 1 root root 9 2005-04-10 01:22 /dev/dsp -> /dev/dsp0
armarda:~# play /usr/share/bzflag/missile.wav
sox: Can't open output file '/dev/dsp': No such device
The Atheros wireless won't work because the modules I had compiled
are no longer automatically loaded. So I have to manually do
modprobe wlan
modprobe ath_pci
modprobe ath_hal
ifup ath0
This is something I never really understood. When I do a modprobe
_foo_ the next time I rebooted, _foo_ was then automatically
loaded. I do not know how this happens but it just did. Now I do
not know where to look to fix it.So...some poking around on the web is needed to fix this mess. I think my kernel 2.6.8 might be a problem, I might need a newer one?
The other, most tempting option is to remove udev and reinstall hotplug. But if udev is no going to go away, it seems like something I should probably learn to deal with.
In the meantime, my main desktop will sit and wait, I will just put udev on hold for now and update all the other packages.
January 25
it depends
My roommate has had problems sending
or receiving email all this week. Despite using it every day at
work I really don't know much about fixing it if it goes wrong. (I
have a spiffy IT guy to do that for me) It turns out though fixing
my roommate's problem wasn't that hard.
Because sometime last week my server had refused her samba connection, instead of asking why that was, she decided instead to simply email me the file. All 600 MB's of it!
I didn't get see the results of pestering my IT guy with the on-board LAN, I had to sit in a meeting all afternoon and he'd fixed it when I got back :-\
It seems I am struggling with pointer lately again, not the basics so much as when to use them, if I want to alter something from inside another function, should I pass the address of a pointer to the function or have the function return the pointer. And why does this get complicated if strings are involved?
Pretty much all my questions about C can be answered with "it depends"
Because sometime last week my server had refused her samba connection, instead of asking why that was, she decided instead to simply email me the file. All 600 MB's of it!
I didn't get see the results of pestering my IT guy with the on-board LAN, I had to sit in a meeting all afternoon and he'd fixed it when I got back :-\
It seems I am struggling with pointer lately again, not the basics so much as when to use them, if I want to alter something from inside another function, should I pass the address of a pointer to the function or have the function return the pointer. And why does this get complicated if strings are involved?
Pretty much all my questions about C can be answered with "it depends"
January 23
voting
We have a National election today, I
went to vote but it really doesn't matter. Its a silly system we
have inherited from the British. I have to vote for a local
candidate that lives in my riding. But if the best person for your
local area has a national leader who's an idiot, your out of luck.
I would like a federal election to be split into two votes, one for
your local candidate and one for the federal leader. Maybe that has
implications I am not aware of that will lead to trouble, but
something has to be better than the system we now live under.
I also have a real problem with lobbying, and campaign funding. Commercial interests simply should not be allowed to contribute to political parties. In fact no one should. Its legalised bribery.
This page illustrates a pretty good example of such bribery. The CRIA pale in comparison to the donations made by oil, lumber, tobacco and other big business interests.
A campaign is a race to convince the public. A race that allows private or corporate funding. So the party that can afford the best advertising, public relation specialists, focus-group analysts have a much better shot of being successful regardless of what their platform may or may not be.
I also have a real problem with lobbying, and campaign funding. Commercial interests simply should not be allowed to contribute to political parties. In fact no one should. Its legalised bribery.
This page illustrates a pretty good example of such bribery. The CRIA pale in comparison to the donations made by oil, lumber, tobacco and other big business interests.
A campaign is a race to convince the public. A race that allows private or corporate funding. So the party that can afford the best advertising, public relation specialists, focus-group analysts have a much better shot of being successful regardless of what their platform may or may not be.
January 18
WinXP
I finally got a new computer at work,
its a Celeron 2Ghz with 512mb's of ram running WinXP. It's actually
plenty fast for what I do at work. Annoyingly though it required a
visit from my
favorite IT guy He was his usual self, wanting to explain the
finer nuances of Windows XP to me and how I might feel "a little
overwhelmed" (his actual words) coming from Windows 2000. I
just nodded and tried to let the information soak in, then asking
if we could
Take The Tour!!, I actually sensed he was happy that I
asked.
I did notice they hadn't password protected the bios, so tomorrow I think I will disable the on board LAN card and see if he can figure out what's going on.
I did notice they hadn't password protected the bios, so tomorrow I think I will disable the on board LAN card and see if he can figure out what's going on.
January 16
cleaning
I noticed some of my hair had gotten
under my keyboard keys and decided to clean them out, there was
also a smudge of something, spaghetti sauce maybe, on the side of
the ctrl key.
I buy those cans of compressed air for cleaning my computer stuff, I know lots of people use vacuums but I was warned once about static electricity being harmful so I just use the can of air and Windex for most jobs.
The hair however, (I have longish hair) wouldn't come out from under the keys so I started popping the keys off, I got them all off and then cleaned the base of the keyboard and started polishing each key :-)
It took me about an hour, my roommate thinks I have some sort of cleaning fetish but I find tedium sometimes relaxing.
Anyway my Mac keyboard is shiny, white and all squeaky clean again.
I buy those cans of compressed air for cleaning my computer stuff, I know lots of people use vacuums but I was warned once about static electricity being harmful so I just use the can of air and Windex for most jobs.
The hair however, (I have longish hair) wouldn't come out from under the keys so I started popping the keys off, I got them all off and then cleaned the base of the keyboard and started polishing each key :-)
It took me about an hour, my roommate thinks I have some sort of cleaning fetish but I find tedium sometimes relaxing.
Anyway my Mac keyboard is shiny, white and all squeaky clean again.
January 14
OnlineRights.ca
Dear onlinerights.ca, If you wish me
to sign a petition,
please implement and link to your privacy policy, what you
will do with my name, address and phone number once you pass it
along to the Minister of Canadian Heritage.
Sincerely, æc♥
Ok you might think so what? First off, your sending this information out on to a public petition list anyway. And secondly, privacy policies are a joke, people see the link, may or may not read it, and are placated into submitting their information. What happens then is any ones guess. Do some companies adhere to their policy whilst others sell or trade your information? How can we know for sure?
I am likely as sceptical as most when dealing with these things but I just think a site with a name like Online Rights Canada should have their own privacy policy in place before harvesting information for whatever purposes.
Sincerely, æc♥
Ok you might think so what? First off, your sending this information out on to a public petition list anyway. And secondly, privacy policies are a joke, people see the link, may or may not read it, and are placated into submitting their information. What happens then is any ones guess. Do some companies adhere to their policy whilst others sell or trade your information? How can we know for sure?
I am likely as sceptical as most when dealing with these things but I just think a site with a name like Online Rights Canada should have their own privacy policy in place before harvesting information for whatever purposes.
January 11
wmanip
I was pointed to wmanip.el
on the emacs mailing list, by It's author no less, and must say it
makes resizing windows in Emacs so much simpler, I even
changed its bindings so that I can just use the arrow keys. Now
with Emacs in a 1900x1200 terminal with about 8 windows open,
resizing takes seconds. Very nice!
Also Emacs related, when I ssh into my Debian server, I usually am using rxvt-unicode as my terminal. I had noticed that it never recognized my terminal type and as such apps like Mutt, Emacs and the like refused to run or ran with only 8 colors (urxvt supports 88 text colors).
This is kind of drag because it wont let me use the more subtle colors, like grey on white, which is readable, but doesn't jump out out as much as black on white so its very good to color email sigs or code comments this way so you tend to focus on the more important stuff.
The reason my $TERM settings are set incorrectly, as it turns out, is that Debian has seen seen fit to alter them and not enable a terminfo entry for urxvt.
Also Emacs related, when I ssh into my Debian server, I usually am using rxvt-unicode as my terminal. I had noticed that it never recognized my terminal type and as such apps like Mutt, Emacs and the like refused to run or ran with only 8 colors (urxvt supports 88 text colors).
This is kind of drag because it wont let me use the more subtle colors, like grey on white, which is readable, but doesn't jump out out as much as black on white so its very good to color email sigs or code comments this way so you tend to focus on the more important stuff.
The reason my $TERM settings are set incorrectly, as it turns out, is that Debian has seen seen fit to alter them and not enable a terminfo entry for urxvt.
By default, rxvt-unicode uses its own terminfo entry instead of rxvt's
since it provides more features and may fix minor problems with the default
rxvt terminfo data.
However, as with every non-xterm terminal program, users get trouble with
various programs and remote shell environments (e.g. via ssh to non-Debian
systems) since they usually do not have the rxvt-unicode terminfo data.
If you do not care about such things and want to use the new fancy
features, you can install the rxvt-unicode terminfo data doing this (as
root):
# tic /usr/share/doc/rxvt-unicode*/examples/rxvt-unicode.terminfo
# echo URxvt.termName: rxvt-unicode >> /etc/X11/app-defaults/URxvt
(or your personal ~/.Xresources file, or /etc/X11/app-defaults/URxvt-ml
or /etc/X11/app-defaults/URxvt-lite depending on your package flavor)
Ugh, anyway with the proper terminfo in place all is well. Oh, and
I find this amusing, from the bash(1) man page..
BUGS
It's too big and too slow.
hehe..now if only the Gnome people would make such an
acknowledgment...January 10
bash comments
I don't mind the bash shell and to
be honest wouldn't really have time to learn new and sexy shells
like zsh even if I wanted to, which I do.
In my ~/.bashrc I have several alias's that help me. First I set bash to keep several thousand lines in my history, then to erase any duplicate lines and to erase common commands like exit or ls.
Some handy alias's I use
In my ~/.bashrc I have several alias's that help me. First I set bash to keep several thousand lines in my history, then to erase any duplicate lines and to erase common commands like exit or ls.
Some handy alias's I use
#apt-get
alias search='apt-cache search'
alias show='apt-cache show'
# installed | grep
alias ig='dpkg -l | grep $1'
# history | grep
alias hg='history | grep $1'
'hg' is really useful lets say if you need to remember some long
./configure command you used 3 weeks ago. But what if you build
lots of packages and can't remember what ./configure commands
belonged to what program?
2356 ./configure --enable-colors256 --enable-rxvt_osc
3528 ./configure --help | less
3556 ./configure --with-x
3557 ./configure --with-x --enable-mpd --enable-proc-uptime --enable-xft
3872 ./configure --enable-debug
4180 ./configure
4469 ./configure --with-included-gettext --with-lispdir
4504 search configure keyboard
5178 ./configure --with-x --enable-mpd --enable-proc-uptime --enable-xft
5765 ./configure --enable-debug LDFLAGS="-lpthread"
6659 ./configure --enable-everything
This used to be a problem for me until I was recently clued into
bash's comments (the one you see above the alias definitions), you
can put comments on the command line so now to find the last
./configure I did for bzflag I can look for the comment in my
history
./configure --enable-debug LDFLAGS="-lpthread" # bzflag/nvidia
Comments on the command line are useful in GNU/screen's multiuser
mode when the person whom you've allowed to ssh in and share a
terminal with insists on chatting in the shell window and not the
editor window, thus filling your bash history with crap :-)January 06
spamprobe, Gnus and procmail
In response to my spam problem
Paul suggested trying
Spamprobe.
This program "scores" your email an based on the words in the message decides on it's likelihood of being spam. The nice thing is it does this with your messages, not some database of known spammers. So all I had to do is train it with a folder of spam that Gnus keeps and add some examples of good messages.
Fetchmail places my mail in /var/spool/mail/username, and Gnus reads it from there directly. Spamprobe, based on its scores, inserts a header into each email, "X-SpamProbe: SPAM|GOOD" but in order to do that I needed a procmail rule that calls Spamprobe before Gnus sorts my email.
This program "scores" your email an based on the words in the message decides on it's likelihood of being spam. The nice thing is it does this with your messages, not some database of known spammers. So all I had to do is train it with a folder of spam that Gnus keeps and add some examples of good messages.
Fetchmail places my mail in /var/spool/mail/username, and Gnus reads it from there directly. Spamprobe, based on its scores, inserts a header into each email, "X-SpamProbe: SPAM|GOOD" but in order to do that I needed a procmail rule that calls Spamprobe before Gnus sorts my email.
LOGFILE=$HOME/.procmaillog
VERBOSE=no
:0
SCORE=| /usr/bin/spamprobe receive
:0 fw
| formail -I "X-SpamProbe: $SCORE"
Then in tell Gnus to filter spam into its own folder
("spam" "^X-SpamProbe: SPAM")
And an nice Gnus hook from this site
lets me automatically add a message to to my "teach SpamProbe"
files just by pressing s for spam and g for good
;; spam
(defun my-gnus-save-luncheon-meat (type)
"Save current message as TYPE ('spam' or 'good') for training SpamProbe."
(let* ((file (cond
((eq type 'spam) (expand-file-name "~/Mail/spamprobe/spam"))
((eq type 'good) (expand-file-name "~/Mail/spamprobe/good"))
(t (error "Unrecognized type '%S'" type))))
(gnus-mail-save-name
`(lambda (newsgroup headers &optional last-file) ,file))
(gnus-prompt-before-saving nil)
(gnus-expert-user t))
(gnus-summary-save-article-mail)
(if (eq type 'spam)
(gnus-summary-mark-as-expirable 1)
(next-line 1))))
(defun my-gnus-save-spam ()
"Save this message as spam, for training SpamProbe."
(interactive)
(my-gnus-save-luncheon-meat 'spam))
(defun my-gnus-save-good ()
"Save this message as good, for training SpamProbe."
(interactive)
(my-gnus-save-luncheon-meat 'good))
(defun my-gnus-summary-mode-hook ()
;; Save spams and goods for training SpamProbe.
(local-set-key "s" 'my-gnus-save-spam)
(local-set-key "g" 'my-gnus-save-good))
(add-hook 'gnus-summary-mode-hook 'my-gnus-summary-mode-hook)
Now once in a while, or even with cron, I can cd into
~/Mail/spamprobe and do
spamprobe spam spam && spamprobe good good
Oh, and the fellow who goes by the nick ALL CAPS PABLO!!!,
and of course TALKS TO YOU LIKE THIS!!! cant help but make
me smile....January 04
spam
You most likely get lots of spam. If
you use email you get spam. Up until recently I was getting around
half a dozen in my inbox and 3 or 4 in each newsgroup/mailing list,
every day.
It was mildly annoying. Now its becoming a chore. I don't know how mailing lists work with spam, but the list I read, Debian and GNU lists have gotten pretty spamalicious and my ISP does filter some of it, I get a condensed email once a month with a list of all the spams they blocked, but its not enough.
So I was thinking about using Spamassasin or some other spam filter that works with exim4 and something I can get GNUS to work with. Its just a drag to have to read up, implement and maintain something that it isn't exciting or even remotely interesting to me.
Luckily however Bill Gates has promised that spam will be a thing of the past in 2 years! But then he should know, he has been working on it for a while now.
It was mildly annoying. Now its becoming a chore. I don't know how mailing lists work with spam, but the list I read, Debian and GNU lists have gotten pretty spamalicious and my ISP does filter some of it, I get a condensed email once a month with a list of all the spams they blocked, but its not enough.
So I was thinking about using Spamassasin or some other spam filter that works with exim4 and something I can get GNUS to work with. Its just a drag to have to read up, implement and maintain something that it isn't exciting or even remotely interesting to me.
Luckily however Bill Gates has promised that spam will be a thing of the past in 2 years! But then he should know, he has been working on it for a while now.