Wednesday, May 5, 2010

Upgrading your distro should come with a warning




It's that time of year again when a lot of the major distros are putting out new releases, and people are clambering to get the new versions installed. But there are two camps of people in this rush to get the latest and greatest. The upgraders, who prefer to leave their computer as is, and hit the "upgrade" button, hoping to come back to their computers in a couple hours and revel in their shiny new OS. Then there are those who prefer the "clean install" by backing up any important stuff, wiping the drive, and starting from scratch. But is the upgrade method really worth it?



After years of hanging out in various linux forums, I have come to the conclusion that upgrading is not worth it. Time after time, I see tons of posts after a release, such as: "sound/video/network/boot/application no longer works after upgrade. If you don't believe me, just head over to ubuntuforums.org and see for yourself. But this is by no means limited to ubuntu, but am just using them as an example because of their recent release.

Sure, there are people who have not done a clean install in years, and have upgraded successfully release after release. But I tend to think they are the exception, and not the norm. But why is upgrading such a risky business? I do not have the answer to this, as I am not a developer or programmer. All I know is the end result.

What can be done about this? I strongly believe that upgrading should come with a warning such as: "Please backup any important data before upgrading distro X, as sometimes the upgrade process can lead to instability of your system. It is recommended that you do a clean install at this time." Or something along those lines. The linux communities being inundated with cries for help after upgrades gone bad is simply unacceptable. It leaves a bad taste in people's mouths, and they tend to blame the new OS for being bad, rather than blaming the upgrade process itself.



When you think about it, it's really not surprising that upgrades go bad so easily. The new OS has to overwrite system files, settings, put in new drivers, config files and deal with mild fragmentation. To me, it makes absolute sense to wipe the drive and start over fresh. This way, you are all but guaranteed better results.

But, as you may be thinking, "I have too many files to backup, and too many apps and tweaks to the system. I do not want to go through setting it up again." Lack of planning is why people don't want to clean install. Why keep all your valuable data on the same partition as your OS? Simply by making a storage partition and keeping all important data there will keep you from having to backup before reinstalling. Mind you, it is still important to backup your stuff to an external source such as hard drive or flash drive.

Also, do you really need every config file in /home to be transferred to the new install? Simply by choosing the most important ones such as .mozilla/.thunderbird/.opera etc. you will save a lot of time and hassle. I never make a separate /home directory. Ask any linux guru who's been around, and they will tell you about config files in /home messing with a new version of application X.

You could also make a text file with all of your apps you need and run it in the terminal:

sudo apt-get install vlc gecko-mediaplyer gthumb glabels k3b seamonkey

You get the idea.

With a little bit of planning, you will actually find that clean installing can be quicker and less painful than upgrading. Thoughts and experiences with this?

Monday, April 26, 2010

A great way to install Ubuntu (and other distros)

For those that have been burning CD's for years to install linux, here's an alternative that will save time and money. Pendrives/thumbdrives/jumpdrives/flashdrives, or whatever you want to call them are an ideal way to install and run linux. They are now very cheap and plentiful everywhere you look. Plus, pendrives (as I will call them) can be reused 1000's of times before they wear out, making them a very green way to go about things.

Since they are very inexpensive, I highly recommend getting at least a 2gb drive so you can store stuff and make changes to your linux pendrive.

Let's start with Ubuntu. Installing Ubuntu to a pendrive is about as straight forward as it can get. You simply plug in your drive and go to: System-->Administration-->Startup Disk Creator.


Simply navigate to the .iso image you need for this, set how much space you want for personal stuff, then Make Startup Disk. I would not use all of the extra space for personal stuff if you plan on installing apps and such, if you decide to use this drive as a portable OS. But if this drive is to be used just for installing ubuntu, accepting the defaults is just fine.

Just make sure that the computer you are going to install on can boot from USB devices.

My last install of Ubuntu took all of 4 minutes using a pendrive, and I didn't need to burn a CD. I use Patriot flash drives because they are very fast and are reasonably priced.

Don't use Ubuntu? That's OK, because there an app for that too. (sound familiar?)

It's called Unetbootin.

Chances are you won't need to download it from the link above, since it is probably already in your distro's repos. Check your package manager for it. It is basically the same as the Ubuntu Startup Disk Creator, but has a few more things you can tweak if you are an advanced user. It can even download the .iso for you if you didn't already get it.

Head on over to http://www.pendrivelinux.com/ for all things pendrive related.

I highly recommend using either of these 2 applications to install linux, or to have a portable OS in your pocket. Plus it's a few less CD's in our landfills, which is always a good thing.


Tuesday, April 20, 2010

Give that old PC new life with 4 of the best lightweight distros

For those with an older computer running 256mb of RAM or less, running a full blown linux install with Gnome or KDE is basically out of the question. Sure, you could use a lightweight desktop environment such as XFCE or a window manager such as Openbox, but sometimes it is still not enough to make that older computer spring to life. 

I'm not going to go into great depth here about the technical aspects of each distro, but rather a general overview. There will be links to each distro embedded in the article. Based on my experiences, I will also list recommended memory. Here are some of my favorite lightweight distros:

Puppy Linux



Puppy Linux is one of my all time favorites. The Puppy linux community is very active and vibrant. Many members have spun their own versions called Puplets. Puppy is very easy to remaster and create your own variant. Some people have taken basic Puppy and stripped it down to the bare essentials, and others have added apps and features to make it very robust and complete. Recommended memory- 96mb+ Screenshots

Slitaz

A great straight forward approach to lightweight linux. Does not come with many apps preinstalled, but that is part of the beauty of it. Recommended memory- 64mb+ Screenshots

Antix Mepis



The legendary distro known as Simply Mepis, decided to throw it's hat into the lightweight distro arena. And what a great job they did. Using the Fluxbox desktop environment, it is a bit heavier than either Puppy or slitaz, but still light enough to be included here. Being based on the venerable Debian, you are able to download a vast array of apps and tools from Debian's repositories. Recommended memory- 192mb+ Screenshots

Tiny Core Linux



Tiny Core Linux is an absolutely amazing achievement when you consider the base .ISO file is only 10mb. That's not a typo, you get an operating system with GUI in only 10mb. It is exremely minimal as you might have guessed, but it's easy to install apps through it's tiny package manager. Recommended Memory- 32mb+ Screenshots

There are other lightweight distros out there, but these 4 represent what I think are the heavy hitters of the lightweight distro world, and will extend the life of that old computer gathering dust. Check out the screenshots and download away.

Sunday, April 18, 2010

Using a Hauppauge PVR 150/250/350/500 TV Tuner card in Ubuntu/Linux

Getting traditional TV to work in linux can be an exercise in frustration at times. For those with a Hauppauge PVR 150/250/350/500, you are in luck. The following tutorial will get you up and going in no time. It Is aimed at ubuntu users, but if you are a bit resourceful, you will be able to get it to work on the distro of your choice.

Do:

sudo apt-get install ivtv-utils vlc

Open VLC player

Media -> Open Capture Device -> PVR (from pull down menu) -> Play.

Then you can do (in terminal)

ivtv-tune -c25 (25 is channel number)

Which changes the channel. (this is for people that have cable coming into their computer directly, and NOT coming from the cable box)

If your signal is coming from a cable or satellite box, do ivtv-tune -c3 and change the channel on the box.

ivtv-tune -h

To see the options which control the card. (not necessary though) 


For a cool desktop tv remote,(so you dont have to use terminal to change channels, or to start tv) go to: CSMonkey TV Remote Highly recommended. (only works on ubuntu)

Remember to have Java installed first. Then you can right click>properties> open with> java. After that, just click normally to launch.

I might add, if your distribution does not have the ivtv firmware in the kernel, (all newer kernels do) just get the firmware here and extract the file and put it in /lib/firmware. Then do: (as root)

rmmod ivtv

then

modprobe ivtv

To record tv while you're watching, in VLC, go to Views and check off advanced contols. You will then see a record button in vlc's interface. All recordings will be saved to your home folder.

To schedule a tv for future viewing, we are going to use cron for the job.

We need to make sure you are a member of the crontab group first. Go to System>Administration>Users and Groups and unlock the window by clicking the keys button, or the "unlock" button. Enter password. Then click on Manage Groups button. Scroll down until you see the crontab entry. Highlight it, and then click on Properties. Check your name if it is not already. Log out and then back in.

First, select which channel you want to record by: (we will use channel 25 as an example)

ivtv-tune -c25

Then, in the same terminal window, do:

crontab -e

Delete everything you see in there.

Then as an example of a recording you want done on Dec. 31 4:00 PM to 5:30 PM, you would enter in crontab: (see below for an explanation of how cron works)


# start recording
00 16 31 12 05 cat /dev/video0 > /home/user_name/name_of_show.mpg
# stop recording
30 17 31 12 05 killall cat

To save the job, do Ctrl-X then Y then Enter.

Remember to put your user name in after /home. You can also save the file wherever you want, I just used /home as an example. You can name the show whatever you want, just make sure you have .mpg after the name.

For those not familiar with cron, in the line 00 16 31 12 05 cat /dev/video0 > /home/user_name/name_of_show.mpg

00 represents the minutes of the hour (4:00), 16 is the hour (4:00 a 24 hour clock is used, 12 midnight would be 00, 1 AM would be 01, etc.), 31 is the date, 12 is the month, 05 is the day of the week -Thurs. in this case. (Sunday is 00, Monday is 01, etc)

You may also find the following link useful. Thanks to MeKino for this. http://ubuntuforums.org/showthread.php?t=758845

Hopefully I have helped some people get their all important TV fix.

Install 64bit flash in linux

If you are a 64bit linux user and downloaded flash through your distro's package management system, you are not using the 64bit flash plugin, and may be experiencing problems while surfing the web. The following will help you install the proper flash for your system. I will assume you are using Firefox as a web browser.

First, remove any flash you may have installed. (see your distro's help forum if you are unsure how) Next, download the 64bit flash plugin here.  Put it on your desktop, open a terminal, (terminal should be in your applications menu) and do

tar -zxvf ~/Desktop/install_flash_player_11_linux.x86_64.tar.gz

That command will extract the libflashplayer.so file to your home folder.

In Debian, Fedora, Mandriva, or any other distro that requires the su command to become root, do su in terminal to become root. Then:

cp ~/libflashplayer.so /usr/lib64/mozilla/plugins

In Ubuntu, do:

sudo cp ~/libflashplayer.so /usr/lib64/mozilla/plugins

Then restart Firefox and enjoy 64bit flash.