Ubuntu

Getting rid of ubuntu violet colors

I dist-upgrade’ed my Ubuntu at my laptop, and I’m again annoyed by the colors. I just can’t get used to the violet colors in debconf . Changing desktop background and colors, lightdm (yeah, they’ve replaced gdm with lightdm in 11.10) or splash (plymouth) themes is not a problem, and there are tons of howto’s out there. I’ve come to routinely replacing all of these things after installing or upgrading Ubuntu. Ubuntu now even has setup violet colors in debconf (!) . At the very least I want it back to Debian default blue .
This task turned out to be rather challenging (and quite stupid to spend time on figuring out) .
I guess my main problem was I didn’t really know which program(s) that was in effect when debconf was running. At first I didn’t even know ‘debconf’ had anything to do with those violet colors .
Long story short: it’s debconf, and some dependency involving libnewt . Thanks to the open source world, when I finally got my google phrase right, the solution was just one click away and I got insight right into the mail between developers that talked about moving away from default Debian blue colors. Have a look at lists.ubuntu.com and you’ll see that it’s all about a symlink in /etc/newt.
Before: violet background

root@juno:/etc/newt# pwd
/etc/newt
root@juno:/etc/newt# ls -l
total 8
lrwxrwxrwx 1 root root  30 2011-10-05 22:00 palette -> /etc/alternatives/newt-palette
-rw-r--r-- 1 root root 309 2011-03-22 14:32 palette.original
-rw-r--r-- 1 root root 336 2011-03-22 14:32 palette.ubuntu
root@juno:/etc/newt# rm palette
root@juno:/etc/newt# ln -s palette.original palette
root@juno:/etc/newt# ls -l
total 8
lrwxrwxrwx 1 root root  16 2011-10-05 22:00 palette -> palette.original
-rw-r--r-- 1 root root 309 2011-03-22 14:32 palette.original
-rw-r--r-- 1 root root 336 2011-03-22 14:32 palette.ubuntu
root@juno:/etc/newt# 

And we’re back at the blue background with debconf.
After:

Pin a package to prevent apt from upgrading it

I got a rdesktop package from a specific ubuntu ppa repo that fixed a bug, the fix hasn’t made it into the official ubuntu repo for some unknown (to me) reason. I install my local package with dpkg but apt-get upgrade always upgrades that package and I have to do it all over. I remember pinning a package in Debian some years back, so I tried the same solution on my Ubuntu Natty setup.

joar@jupiter:~$ cat /etc/apt/preferences.d/rdesktop
Package: rdesktop
Pin: version 1.6.0-2ubuntu3ppa1*
Pin-Priority: 1001

joar@jupiter:~$ 

As you can see I created a /etc/apt/preferences.d/rdesktop preferences file, and now my apt-get upgrade leaves redesktop to the version I’ve installed with dpkg. πŸ™‚
More info regarding pinning in :

$ man 5 apt_preferences

That anoying warning from ssh-client when you’ve moved a server

I don’t know how long it’s been around, but I just noticed

<strong>joar@jupiter:~$ ssh vir04</strong>
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that a host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
55:[...]:e2:ac:b0.
Please contact your system administrator.
Add correct host key in /home/joar/.ssh/known_hosts to get rid of this message.
Offending RSA key in /home/joar/.ssh/known_hosts:306
  remove with: ssh-keygen -f "/home/joar/.ssh/known_hosts" -R vir04
RSA host key for vir04 has changed and you have requested strict checking.
Host key verification failed.
<strong>joar@jupiter:~$ ssh-keygen -f "/home/joar/.ssh/known_hosts" -R vir04</strong>
/home/joar/.ssh/known_hosts updated.
Original contents retained as /home/joar/.ssh/known_hosts.old
<strong>joar@jupiter:~$ ssh vir04</strong>
The authenticity of host 'vir04 (91.207.158.93)' can't be established.
RSA key fingerprint is 55[...]ac:b0.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'vir04' (RSA) to the list of known hosts.

NICE feature

Adobe Air – Ubuntu Maverick – amd64 and Wimp

I’m checking out Wimp as a substitute to Spotify. My Wimp stopped working yesterday and refused to start because of ‘wrong ELF’. It turned out my Adobe air installation somehow was in 32bit, I don’t know how/why it initially worked (though 32bit apps usually work fine on 64bit Ubuntu thanks to 32bit libs) .

Anyway I came over a 64bit compiled Adobe Air package at launchpad, it installed fine and I could reinstall Wimp again.

Ekiga in Ubuntu Karmic hangs with pulse

With reference to this post I finally figured out that I could after all use a Linux softphone with our iptelephony solution at work.
At first I tried Ekiga, since it’s Ubuntu’s default softphone app, but it didn’t really work, kept on hanging.
I tried Twinkle, which worked right out of the box, but using QT 3.x libs ? I just couldn’t settle with that. I don’t like to mix QT libs in my glibs environment and I REALLY don’t like to use really old QT libs if I must have them.
I took an other shot at Ekiga, and dug up this post at launchpad which solved my problems.
Upgrade to Ekiga 3.2.6 and things should be okay with Karmic, pulseaudio and Ekiga again.
Launchpad Ekiga 3.2.6 repo here.

Disable GDM in Ubuntu 9.10

When I need to disable services in Linux I’m used to symlinks in /etc/rc2.d
(for debian based distros) .
Ubuntu 9.10 doesn’t have any symlink for gdm in /etc/rc2.d
so how do I disable the freakin’ service ?
It seems gdm is started by upstart now, but they’ve also switched to grub2 and according to ubuntuforums.org we can control this from grub.

edit /etc/default/grub

Change the line GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash” to

 GRUB_CMDLINE_LINUX_DEFAULT="quiet splash text"

And issue:

# update-grub

Importing information_schema from an other mysql server

While investigating some mysql stuff at work I imported the whole mysql dump from our production system into my localhost installation. Among the 2000 or so databases was also information_schema, and I ended up with problems like :

root@pluto:~# /etc/init.d/mysql status
/usr/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 
'debian-sys-maint'@'localhost' (using password: YES)'
 * 

The solution was to reset password fr debian-sys-maint user in mysql.

GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' 
IDENTIFIED BY 'password' WITH GRANT OPTION;

Where ‘password’ is found in /etc/mysql/debian.cnf πŸ™‚

I got this one from ubuntuforums.org.

A broken installation of custom kernel gave some headache

I rolled my own 2.6.31 kernel for my Ubuntu Karmic, and used make-kpkg to make .deb packages for easy installation. For some reason, unknown at the moment, my .deb didn’t install properly. The kernel .deb package ended up in a iF state by dpkg. I didn’t have time to fix this when it occurred and planned on getting back to it later until I started getting annoying errors when update-manager wanted to update my system. It seemed that update-initramfs tried to reconfigure my broken kernel package and kept on failing. So I removed my custom kernel via dpkg –purge ‘name of package’ but still when updating my system update-initramfs got hung up on trying to configure my custom kernel, which no longer existed on my system. My first thought was to reinstall my custom kernel and then reinstall initramfs-tools but I got into this really stupid circular problem with my custom kernel not getting installed followed by update-initramfs failing ending up with dpkg setting a iF state on initramfs-tools package as well which again led to any kernel upgrade failing, or at least giving lots of complaints about that stupid kernel package of mine.
I finally got out of it by installing my custom kernel, which broke under installation, then do a update-initramfs -d -k ‘my custom kernel’ followed by dpkg –purge ‘my custom kernel’ and everything got back to normal πŸ™‚