Tag Archives: Debian

Setting up Debian APT for testing and unstable

In this quick brief how to I am going to explain how to to setup Debian for default version of ‘testing’ and being able to install package from ‘unstable’ without having to run Debian ‘unstable’ by default.

First off we are going to edit or create the /etc/apt/apt.conf file:

# nano /etc/apt/apt.conf

and we are going to append this to the file:

APT::Default-Release "testing";

Now we have to edit our /etc/apt/sources.list file and add the ‘unstable’ repository to it.

# nano /etc/apt/sources.list

Here is an example of what my /etc/apt/sources.list file looks like:

deb http://security.debian.org/ testing/updates main contrib non-free
deb http://ftp.au.debian.org/debian/ testing main contrib non-free
deb http://ftp.au.debian.org/debian/ unstable main contrib non-free

Now we have to refresh / update our packages lists by:

# apt-get update

Now we can install packages from the Debian ‘unstable’ repository by doing for example:

# apt-get install -t unstable linux-image-2.6.26-1-686

Here is a brief explanation of what the ‘-t’ option does from the apt-get man page

       -t, --target-release, --default-release
           This option controls the default input to the policy engine, it creates a default pin at priority 990 using the specified release string. The preferences file may further override this
           setting. In short, this option lets you have simple control over which distribution packages will be retrieved from. Some common examples might be -t ´2.1*´ or -t unstable. Configuration Item:
           APT::Default-Release; see also the apt_preferences(5) manual page.

To learn more about apt-get

$ man apt-get

Note: to change linux-image-2.6.26-1-686 package to the package you are after out of the ‘unstable’ repository.

Bluetooth audio under Debian lenny/sid

This is a quick how to setting up bluetooth audio under Debian.

First off we need to install a couple packages:

# apt-get install bluez-utils bluez-gnome bluez-audio

Now we need to run ‘hcitool scan‘ to get the address of the bluetooth device. For example,

$ hcitool scan
Scanning ...
	00:00:00:00:00:00	Nokia BH-501

Now to get the audio part to work:

Modify or create your ~/.asoundrc to contain

pcm.bluetooth {
    type plug
    slave {
       	pcm "bluetooth_hw"

pcm.bluetooth_hw {
         type bluetooth
         device 00:11:22:33:44:55
         profile "auto"

Where 00:11:22:33:44:55 is the bluetooth address of your headset that you got from ‘hcitool scan‘ output

Now to test the bluetooth headset audio is working with ‘arecord‘ and ‘aplay‘ for example,

$ arecord -Dplug:bluetooth -f S16_LE | aplay -Dplug:bluetooth -f S16_LE
Recording WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Playing WAVE 'stdin' : Signed 16 bit Little Endian, Rate 8000 Hz, Mono
Aborted by signal Interrupt...
Aborted by signal Interrupt...

Finally configure your audio applications to use the alsa device ‘bluetooth’.

Example fro setting up Skype to use the bluetooth headset:
Right click on the Skype icon on the gnome-panel and go Options => Sound Devices and change the ‘Sound In’ and ‘Sound Out’ to ‘bluetooth’ and click apply.

And for other applications have a read here

Gnome System Monitor causes Xorg to consume 100% CPU

With Gnome System Monitor 2.22 under Debian testing (Lenny) I had the problem when I clicked on the Resources tab the CPU usage would got to 100% on my laptop and desktop.

Well I have been able to fix the problem on my laptop which has and Intel video card by adding Option “AccelMethod” “EXA” to the Device section in my xorg.conf file.


Section "Device"
        Identifier      "Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller"
        Driver          "intel"
        BusID           "PCI:0:2:0"
        Option           "AccelMethod"  "EXA"

When I have worked out how to fix the problem on my desktop using a Nvidia video card I will post the solution.

Thanks goes out to MistaED for pointing out to me that this a problem with the way Cairo rendering is done.

Installing your selection of packages on Debian based systems

Consider: You have a host you like or at least its close too. You have another you would like to replicate the installed package set on.

APT – Is a front end to dselect and dpkg

Do this to functionally replicate it…
On you favorite host

$ dpkg –get-selections > myfavs.selections

file name is totally arbitrary

Check out the text file, it’s just a simple list with install / deinstall

Here is a snippet:

apt						install
apt-utils					install
aptitude					install
aspell						install
aspell-en					install
at						install

There is no header info or anything clever just a list.

Maybe you will need to copy your sources (and othe apt conf stuff) as well.? At least line up the repositories and levels.

Now transfer that file(s) to your (same distro) target unit. Save it somewhere you can read it. then: (with admin permissions)

# dpkg –set-selections < myfavs.selections

You can repeat the first get-selections if you want to check (diff -u) but next you do this:

# apt-get dselect-upgrade


It’s possible to convert a Debian box to an Ubuntu box this way and visa versa though its gunna break something…

Working on new server

Well today has been an interesting day working on my new server that I got last Wednesday. My new server is a Compaq Proliant ML530 in a 7U 19″ rack mountable. I know it an old server and weighs heaps and needs 2 people to move it, but it a starter to help make things little more professional for the web sites i host.

Well the interesting problem i was having is that when i installed Debian 4.0r0 (Etch) it was only seeing one of the CPUs. So after playing around with different boot options as Debian boots up it was still not seeing the second CPU. So I went and had a look around the HP/Compaq web site about my server to see what they had to say and see if i could find the software needed to access the BIOS, well after bit of searching i found the Software / Drivers page for my server and saw there was a SmartStart Software CD to download. While the CD was trickling down from there server I went off and done couple other things to kill the time.

By now it has been a couple hours waiting for the download to finish, but i have a hot off the burner a freshly burnt CD of the HP SmartStart Software, now it time to boot the server up off the CD. While the server was booting up off the CD I thought it was time for a coffee, well when i got back it was sitting there with a error on the screen about not having a mouse attached and the GUI stuff would not allow me to tab around and select what i wanted. Ok ended up having to look for a ps2 mouse to plug into it and do a reboot.

Now I got a mouse plugged in and the system rebooted. Time to get into the BIOS and see what is going on there, when i got into the BIOS i noticed one thing straight out was about the OS and that was set to other so I highlighted it and pressed enter to see what other options it had to offer and noticed that there was an option for UNIX and when i selected that it gave some more options and the last option there was Linux so I selected it which then changed and interrupt from 5 to 10. I finished off looking through the BIOS to see if there was anything else that might need to be change, which there wasn’t. So after saving the BIOS and exiting out the SmartStart Software and rebooting the server, I logged in and typed cat /proc/cpuinfo and low and behold there was my second CPU finally being recognized, so me does the happy happy joy joy dance.