Archive for the ‘Linux’ Category

Once in a while you might download an AVI video file and, when you try to play it, are disappointed to see an error message stating that the video is corrupt so cannot be played. Free media players such as the popular cross-platform “plays everything” VLC media playerwill sometimes recognize the corrupt video and offer to fix it. While VLC does a very good job at fixing corrupt AVI files, the fix is not applied to the original video. Therefore, any subsequent attempts to play the corrupt AVI again through VLC will always result in this prompt being initially displayed. If you are running Linux (in this case I am using Ubuntu 10.04), there is an easy way to apply the fix permanently via a quick command.

Requirements

Obviously, this is geared for those running Ubuntu, so some flavour of Linux is involved. Additionally, you will need to have MEncoder installed. If you have already set up Ubuntu for multimedia playback, then there should be nothing to stop you from immediately jumping in to the fix. However, if MEncoder is not installed something has to be done about it. For multimedia playback I like to execute the following 2 commands. They will take care of installing VLC, MEncoder and a lot of codecs.

Before returning to school for the new academic year, I performed a complete wipe of my laptop so that I could reinstall fresh copies of Windows 7 Professional and Ubuntu 10.04 Lucid Lynx. One of the things I immediately did after installing Ubuntu was set up Compiz so as to take advantage of the nice effects that this desktop enhancement has to offer. However, after applying my settings and restarting, I noticed that none of my windows had the usual minimize, maximize and exit buttons or the accompanying title bar. Deactivating and reactivating ‘Window Decorations’ did not solve the problem, but two quick commands fixed it in less than 30 seconds. Here is what I did.

While logged in to Ubuntu, press ALT+F2 to call the Run Application command window.

Ubuntu's Run Application window

Enter the following two commands in succession and press Run after each entry.

metacity --replace

compiz --replace

The problem might be fixed immediately after entering the first command, but execute the second as well to restore control to Compiz. You can then proceed to configure the Compiz effects just the way you like them.

Although I use Mozilla Firefox more than I use Google Chrome, the latter does come in handy when testing how websites display on a different browser or when there is need to diagnose internet connectivity problems. On Windows, Google Chrome is fast; perhaps even faster than Mozilla Firefox. However, on Ubuntu 9.10, I have noticed that it can be a little slow to initiate or even load a simple web page. In an effort to find a solution to this problem I stumbled across quite a few user-submitted posts that described a simple fix. After applying the fix, there was a significant improvement. Read on to find out how you can speed up Google Chrome on Ubuntu.

Apparently, the slow response of Google Chrome on Ubuntu has to do with the slow DNS lookup of this browser. These instructions should not be limited to Chrome on Ubuntu 9.10 alone and should work on any version of Ubuntu where the latest version of Chrome is installed.

Close any instance of Google Chrome that might be running.

Open a terminal window by going to Applications > Accessories > Terminal.

Enter the following command and press ENTER. It will open nsswitch.conf in gedit.

sudo gedit /etc/nsswitch.conf

Locate the following line within the file:

hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

Replace that line with the following, save the file and exit gedit and the terminal.

If you like playing around with Ubuntu as I do you will, sooner or later, come across the annoying GPG error. In all the excitement of installing new applications, it is quite easy to miss the instruction of adding public keys, especially if you configure Ubuntu to update software from various sources. Usually, the GPG error that appears after you check for updates via the Update Manager or terminal’s sudo apt-get update does not prevent you from retrieving updates. However, wouldn’t it be better if you did not have to encounter the error at all? Well, sure! Who would say no to that? In this HOW-TO, I will share with you the steps you can take to fix the error, especially if the update source is ppa.launchpad.net.

The Linux kernel is not updated very often to require removing old versions regularly. However, when a new version is released, sometimes you may want to remove the old version so as to save on the disk space used. I normally employ the following method when removing old kernels because it is quite thorough and can be mostly accomplished through a terminal window. If you are accustomed to going through the Synaptic Package Manager and manually marking old versions for removal, you may want to try this alternative. However, before you start cleaning, you need to be aware of the all kernel versions that are currently installed on Ubuntu. The last thing you want to do is remove something unintentionally and be faced with an unbootable system.

During these last couple of days before I head back to university, I will attempt to install Linux on my laptop to see if it is at all possible for me to learn Linux. This may well be a crude attempt seeing that my laptop will be my only working PC at school where getting papers done in time is more important than fixing an OS that I know little to nothing about! However, I decided to start small and simple, and hopefully, this should be a great learning opportunity.

I’ll be honest. Linux and me do not seem to get along very well. I guess it’s because I’ve been used to Windows for such a long time that I forget that I must begin as a rookie again on a completely different architecture. Lately, I have tried a few distributions after reading some information at DistroWatch.com and PolishLinux.org. I installed openSUSE 10.2, but it was way too slow; I then went on to install Ubuntu 6.10 LTS, but I couldn’t get the wifi features to work. A few months ago I had tried Fedora Core 6, but running updates left more things broken than fixed. I finally decided on Xubuntu, i.e. a Ubuntu base with a Xfce desktop environment instead of the usual GNOME or KDE. Because my laptop, a Toshiba Satellite 1800-S204, is not that powerful with only 512MB RAM, Celeron 1.0GHz CPU and 20GB hard disk space I chose to run a lighter (but yet stable) desktop environment that I hope will prove to be the correct choice. I was really hoping to experience the speed of Gentoo (and its forks such as Kororaa and Sabayon), but that area of Linux is more for the hardcore and experienced Linux user, something which will take me some time to achieve.

Right now Xubuntu is being installed on my system. It should take about an hour or so, then another hour to set it up and a few days to get things just the way I like them. I hope this all works out and that I can finally learn how to use the Linux OS. Unleash the power of open source…!

UPDATE: Linux must hate me! This is the hundredth time I’ve attempted to install a distribution and things either did not install or did not install completely. I thought the GNOME desktop environment would be more stable than KDE, but after running the installation I was missing icons and menus. Anyway, to make a long story short, I went back to good ol’ Windows XP Professional. At least things work for now.

Well, I was finally able to install openSUSE 10.2. The installation went smoothly and I was surprised at how the installer was able to properly identify my hardware, even down to the exact model/part number of my Toshiba Satellite 1800-S204 laptop! Although detection went well, there was still some configuration problems, which I was able to fix once I got into YaST and meddled with the settings.

The 2 major components that required attention were my audio card and printer. Yes, openSUSE recognized the ALi audio chipset, but I had to manually give my user account permission to use “audio”, which was quite strange since, by default, I had permissions to view “video”. What’s the good of “video” if there ain’t no audio! Anyway, that went smoothly after a reboot (so as to load the modules), so Amarok and RealPlayer 10 didn’t complain about it anymore. However, I wasn’t getting playback of certain media. I soon found out that I had to “add support” because, openSUSE, being open source and all, has to obey license agreements that restrict certain software being pre-loaded with its OS (as with many other open source software). I added the w32codecs and also installed libdvdcss from vlc quite easily. Now, my players can play back my MP3s; haven’t tested with DVD as yet.

Everything looks good so far. openSUSE 10.2 has a very “splexy” (as my sister would say) GUI. I’m still in the process of configuring it for speed because I noticed that things can get really slow at times. I’ve disabled some of the major eyecandy without losing too much, but, being the speed-demon I am, I’ll be looking for more tweaks! What I don’t understand is why my RAM usage is so high. I read a forum post about this being a difference between UNIX OSes and Windows. Things are always cached in RAM for faster access; I still need to find out if there is anything I can do to speed things up more. I’m afraid of disabling certain processes (as I could easily do in Windows) because that may leave the system crippled for me since I wouldn’t know what to do to fix it if I had to go through the console.

It takes time to learn Linux and I hope this becomes a great learning experience!