Archive for 'Distro Stuff'

One day, you’re happily typing away on a production server. You want to clean up /tmp so you can mount it with tmpfs instead of normal on-disk stuffs. You proceed:

root@ubuntu:/# ls /tmp/
dbconfig-generate-include.sed.fc6130Β  dbconfig-generate-include.sed.hu7261Β  dbconfig-generate-include.sed.k26205

Ok, on to the action:

root@ubuntu:/# rm *
rm: cannot remove `bin’: Is a directory
rm: cannot remove `boot’: Is a directory
rm: cannot remove `dev’: Is a directory
rm: cannot remove `emul’: Is a directory
rm: cannot remove `etc’: Is a directory
rm: cannot remove `home’: Is a directory
rm: cannot remove `initrd’: Is a directory
rm: cannot remove `lib’: Is a directory
rm: cannot remove `lost+found’: Is a directory
rm: cannot remove `media’: Is a directory
rm: cannot remove `mnt’: Is a directory
rm: cannot remove `opt’: Is a directory
rm: cannot remove `proc’: Is a directory
rm: cannot remove `root’: Is a directory
rm: cannot remove `sbin’: Is a directory
rm: cannot remove `srv’: Is a directory
rm: cannot remove `sys’: Is a directory
rm: cannot remove `tmp’: Is a directory
rm: cannot remove `usr’: Is a directory
rm: cannot remove `var’: Is a directory

You can summarize the next few seconds as “………. OMG OMG OMG OMG OMG”, while turning pale.

root@ubuntu:/# ls
bash: /bin/ls: No such file or directory

It’s a goner. Luckily i didn’t do rm -rf, because that would have FUBAR’ed the server fully. What happened is that /lib64 and /lib32 ( which are symlinks to /lib and /emul/ia32-linux/lib respectively ) got removed, effectively rendering you unable to execute any command ( because everything depends on /lib64/ ). But no worries, there is one thing that is statically linked on your system ( meaning, not requiring any libs from /lib64, thus still working ) and that’s the /lib/ file. By using this file, you can force your ln command to look into /lib for its libs instead of ( the now missing ) /lib64.

root@ubuntu:~# /lib/ –library-path /lib /bin/ln -sf /lib /lib64

Which re-creates the /lib64 symlink, reviving all commands! Then you can create the /lib32 symlink again with the normal ln command. Crisis averted πŸ˜‰

Hopefully this will help others in the same situation πŸ˜‰

Remember kids, working as root is evil! ( although it couldn’t help me in this situation since i needed to be root to clean the /tmp. )

One of the sore spots in Ubuntu 8.04 ( Hardy Heron ) is the incredibly unstable Flash plugin. Crashes on one side, inability to play sound from Flash and a media player at the same time on the other side. I have seen a lot of suggested “fixes” on other forums and blogs, but most don’t really help. So let me tell you what did the trick for me.

First of all, open source alternatives such as Gnash and swfdec are not yet ready for the big masses. It’s nice to see them growing bit by bit, but for now, we are bound to the official plugins for ‘decent’ Flash support.

First of all, let’s get rid of libflashsupport if it’s still installed. This little piece of **** is a big cause of instability in our quest to a stable Flash experience. So let’s remove it right away!

# apt-get remove libflashsupport

Ok, now that’s gone, lets make Alsa output to Pulseaudio by default. We do this by installing libasound2-plugins, and creating the file /etc/asound.conf.

# apt-get install libasound2-plugins

Contents of /etc/asound.conf are as follows:

pcm.pulse {
type pulse
ctl.pulse {

type pulse
pcm.!default {
type pulse
ctl.!default {
type pulse

Just copy-paste it in the configuration file.

Next up, nspluginwrapper. This package will “jail” Flash inside its own little environment, so that if Flash crashes, it will only take down the wrapper, and not your whole Firefox. A Flash crash will result in a gray area where your Flash should be, instead of a suddenly disappearing Firefox. Quite an improvement already πŸ™‚

Let’s install it:

# wget

# dpkg -i “nspluginwrapper_0.9.91.5-2ubuntu2.8.04.1~mt1_i386.deb”

Now you can (re-)install flashplugin-nonfree 9 to make it nspluginwrapper aware. Although it will not take down your Firefox anymore, it will still be incredibly unstable, and lots of sites will have gray areas on their pages.

So we will take one additional step, and install flashplugin-nonfree 10. The latest release candidate to be exact, which appears A LOT more stable than 9 ever was on my several systems.

We will have to download and install the deb manually from .

Click on the Hardy entry for flashplugin-nonfree, and download the correct deb for your system. Currently, for i386 ( 32bit ) desktops, this is the file you need .

Install it either by double clicking it on your desktop, or doing this on the commandline:

# dpkg -i flashplugin-nonfree-*.deb

Restart Firefox just to be sure, and then browse to “about:plugins”.

You should see something similar to the image below:

Which means it worked! Try watching a movie in youtube while listening to some music on your audio player. Both should play without problems, and most of the crashes should be gone!

Enjoy your smooth desktop experience πŸ˜‰

This evening at 18:39, the first new package was committed into the Intrepid Ibex’ repository! What will become Ubuntu 8.10 in 6 months time is now under full construction! This first package is “binutils (2.18.1~cvs20080103-4ubuntu1)”! Many will follow πŸ˜‰ People wanting to follow the changes as soon as they hit the repository can use in their feed readers!

SCIM in Ubuntu Hardy

For the past couple of days, SCIM seems to be enabled by default in the latest development builds of Ubuntu Hardy. SCIM is a platform that takes care of handling different input methods. But I really don’t need to type vietnamese, russian, or any other exotic language. Another annoyance is that the keybindings can conflict with other applications, which makes it even more cumbersome to use. Trying to close SCIM from the system tray by selecting “Exit” doesn’t work, it just restarts the application in less than a second.. So, how do we go about disabling this once and for all?

Type this in your console: “sudo update-alternatives –set xinput-all_ALL /etc/X11/xinit/xinput.d/default” .

Restarting X should show you a scim-less systray!

Now let’s hope the Ubuntu guys remove this crap by default again before Hardy hits GA πŸ˜‰

Pretty funny story here πŸ™‚

yum install *filename*

Well, it doesn’t happen very often, but I actually found a pretty nice feature in yum, the thing they call a package manager in rpm based distros. I noticed by accident, and was pleasantly surprised. AFAIK, apt-get doesn’t let you do that..

A quick demo πŸ˜‰

# yum install /usr/lib/
Loading “installonlyn” plugin
Setting up Install Process
Setting up repositories
Reading repository metadata in from local files
Parsing package install arguments
Importing additional filelist information
Resolving Dependencies
–> Populating transaction set with selected packages. Please wait.
—> Downloading header for libstdc++ to pack into transaction set.
libstdc++-4.1.2-14.el5.i3 100% |=========================| 54 kB 00:00
—> Package libstdc++.i386 0:4.1.2-14.el5 set to be updated
–> Running transaction check

Dependencies Resolved

Package Arch Version Repository Size
libstdc++ i386 4.1.2-14.el5 base 354 k

Transaction Summary
Install 1 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 354 k
Is this ok [y/N]: