Category Archives: Linux

Linux

Getting a Linux Kernel changelog using git

I am setting up my new webserver (which, incidentally, this post is being written on), and had some trouble with the version of the Linux kernel I was using. I wanted to see whether my problem had been fixed between my kernel version and the current one, but couldn’t find an easy way to do that. User Octayn in ##linux on freenode IRC suggested I use git with tags. A little googling suppiled the right command-line magic.

First, I cloned the linux-stable git:


git clone git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git

Then, after changing into the linux-stable directory, I checked the tag names available:


git tag -l | less

That showed me the formatting of the tags, namely v. So then the command to get the full changelog was:


git log --decorate v3.0.9..v3.0.32

I did find some commits that might have fixed my problem. I upgraded and so far, so good. Only time will tell.

This is here as much for my own reference as it is for yours, but I hope it helps you!

delayacct and iotop in Ubuntu 10.04 Lucid Lynx

I was trying to use iotop yesterday on my workstation and it was complaining that “CONFIG_TASK_DELAY_ACCT” was not enabled in the kernel. “OK,” I thought, “I can rebuild the kernel, no problem.” So I went to rebuild the kernel and discovered that CONFIG_TASK_DELAY_ACCT was already enabled along with the associated config options needed for iotop, so I was confused.

After a little spelunking of old mailing list entries (which I am trying to spare you with this post, dear reader), I discovered that the Ubuntu folks flipped around how the “nodelayacct” kernel boot parameter works for various arcane reasons. Here’s the short version of how to enable it.

1) Edit /etc/default/grub, adding “delayacct” as an option to the GRUB_CMDLINE_LINUX_DEFAULT entry. If you hadn’t already modified that line, it would go from


GRUB_CMDLINE_LINUX_DEFAULT=""

to


GRUB_CMDLINE_LINUX_DEFAULT="delayacct"

2) Run “sudo update-grub”
3) Reboot, and you should be good to go

Using a bluetooth headset with SIP on Linux

After hours of banging my head against the wall, I have finally got my bluetooth headset working with my SIP accounts in Ubuntu Linux 10.04 LTS (Lucid Lynx).

Assuming bluetooth is already working, and you’ve paired your headsets, do the following things:

1. Download the x-lite 4.0 software for Linux
2. Run the softphone with ‘padsp xtensoftphone’ (this will wrap it’s audio i/o with pulseaudio
3. Change the audio settings in the x-lite phone to use the PulseAudio virtual device
4. Make sounds in the x-lite phone, call an 800 number or something, then while sound is being made run ‘pavucontrol’
5. In the output and recording tabs, find the padsp streams and select the bluetooth headset inputs/outputs.

Caveats: I haven’t tested whether this is remembered between logins, and I think if you are using padsp to wrap other applications this will send them all through bluetooth.

Let me know if this helps you or if you get stuck!

Archiving Emails and Attachments to PDF from Thunderbird in Linux

I have a couple of businesses, plus my own personal transactions, and every year come January I have to make sure I have all of the appropriate financial documentation for them, including copies of invoices and receipts. Fortunately, most of my invoices and receipts are now in email form, though I still get some paper ones (which go straight into the ScanSnap). Unfortunately, emails and attachments can’t go nicely in a reference folder in my Dropbox.

Thunderbird to the rescue!

I use Mozilla Thunderbird for my email for mostly the same reason I still use FireFox to browse the web: there’s a plugin for almost anything I want to do. Also, in Linux it’s easy to use a CUPS-PDF virtual printer to print to PDF. Combining this with the attachment extractor Thunderbird plugin allows me to dump all of the attachments and emails to files on my hard drive in just a few clicks.

I have ‘Invoices’ and ‘Receipts’ email folders that need to be dumped, so I just go into each folder, select all messages, print them using CUPS-PDF, and then right-click and tell AttachmentExtractor to dump any attachments as well. Done, in about 5 minutes. Trying to do this manually would take countless hours, meaning in reality that I would just never do it, and if my taxes were audited, it would be a total nightmare.

Hopefully if you have this same problem google + this post will help you out. Enjoy!

Installing python-qwt5-qt4 on Ubuntu Jaunty 64-bit

I needed the package mentioned in the title, but it fails to install due to some problems with the dependency configuration in the original package.

Following some instructions here and using the patch provided here (from this thread), I was finally able to get it working.

Here’s the resulting package.

python-qwt5-qt4_510dfsg-1ubuntu1_amd64

Steps to build:

Create some directory where you want to build this. Change to that directory. Then…

sudo apt-get build-dep python-qwt5-qt4

(installs dependencies for building)


sudo apt-get source python-qwt5-qt4

This should download the package source. Download the patch from the comment I linked to above, then change into the directory and patch the files. You may have to change the directory ownership so that your user can write to it (sudo chown -R yourusername .)


patch -p0 < ~/Inbox/pyqwt-final.diff

(of course your patch may be located in a different location)

Per the GPLv2, here's the patched source I used to build the .deb file (note -- I think you can just download this instead of patching it yourself).

brocks_patched_pywqt5_src.tar.bz2

Once it's patched, rebuild it with:

sudo dpkg-buildpackage -rfakeroot -uc -b

Go get a cup of coffee or whatever, it's a fairly involved build. When it's done, in the directory above you should find your .deb packages. A simple:

sudo dpkg -i python-qwt5-qt4_5.1.0.dfsg-2_amd64.deb

(replace the filename with whatever yours is, of course)

will install it for you. Hope this is helpful for someone, as I wasted a few hours trying to install this all from source and so on.