Change hostname on Ubuntu

In business it is a common pattern that you install one user workstation that becomes the template for others.

Basically after cloning such a template machine (e.g. using CloneZilla), the most important thing after starting the clone is to change the hostname - and here is how to do it:

There are two files to edit - and you should edit them in this order - just changing the hostname (in total should be 3 times occuring):

sudo vim /etc/hosts nowthenewhostname localhost.localdomain localhost nowthenewhostname

sudo vim /etc/hostname

For those not familiar with vim - just press "i" to get into edit mode and when finished press "ESC" and enter ":x" followed by pressing "Enter".

And sure, you can use gedit instead of vim also.

See also more information on Cloning Ubuntu to Different Computer Hardware.

Related post: Virus scanning on Ubuntu, Stationary under Ubuntu.


Damn Fast Linux

I was visiting my parents on the weekend (as usually once a week) and as I stumbled over some small Linux Editions dedicated to run on older Computers, I gave it a try as I have some older Computers there. I even have a 486 with only a small amount of RAM. I did not know that there are either distributions specialized for 486 architecture also.

Unfortunately trying Linux on the 486 was not successful, because ..... because the BIOS did not support the CD drive in the boot order. I did not expect that. OK, it was the time of the 5 1/4 inch and 3,5 inch disks...

Then I tried another machine that was a lot younger - some Pentium with an XP installed and it was annoying slow already to start up. I tried Puppy Linux on it and playing around a little with the Live CD.

IT WAS SO DAMN FAST - even although from CD!

So my hint: Before you are thinking of buying a new computer just because your one is old and slow - and you do not much more than EMail, Browsing and writing some documents - then really think of giving Linux a try!

A list of Linux distributions that also should support older architectures can be found at DistroWatch.com. I would start with Puppy Linux, MEPIS, absolute Linux or Damn Small Linux for example.

Related posts: Why Linux?, Why I switched to Ubuntu, The sad thing about Linux, The operating system.


Stationary under Ubuntu

Nowadays instead of printing your business documents and sending by mail, in many cases people send PDF by email. What is missing here is usually the stationary paper that is taken from the printer tray where the comany headers and footers are pre-printed.

If you want to have a nice easy way for using or existing word processor templates adding a stationary PDF - here is what you can do:

sudo apt-get install nautilus-actions
sudo apt-get install pdftk

Then create a new action as:
Path: /bin/sh
Parameters: /home/username/stationary.sh '%d/%f'

And here is the content of script stationary.sh (don't forget to make it executable):
pdftk "$1" background /home/username/stationary.pdf output "$1.new.pdf"
if [ -f "$1.new.pdf" ]
rm -f "$1"
mv "$1.new.pdf" "$1"

And all what you need now is to put save your stationary as PDF to /home/username/stationary.pdf

Related post: Document file format, Virus scanning on Ubuntu.


Why Linux?

I do not consider it a good way how FSF started bashing Windows with Windows7Sins. Besides the fact that this is bad behavior, they should have asked the people why they keep using Windows.
Here are some arguments, I get told by people who don't want to switch OS:
  1. "I don't want to invest time into learning a new system. Computers are already a big time waster."
    Learning something new is additional effort. Although it might be an investment with a short ROI, it depends how people are using the computer (and how much money they have to pay others for fixing their problems).
  2. "I heard that it is pretty common to experience incompatibilities with the hardware and I am worrying about my foto printer, scanner or mobile device not working with it."
    Yes, this is indeed true. There were made big steps forward in the last years but there are still plenty of gadgets not working well. If you are planning to buy new hardware, you should prefer those items that are known to be working with Linux over others - just for the case you might want to switch in the future. Anyway, with some manual work I was able to get my Canon foto printer and my Canon Scanner to work with Fedora already back in 2006. Nowadays it should work better.
  3. "I do need to share a lot of documents in Word, Photoshop and other proprietary formats with others I collaborate with. I worry about incompatibilities."
    This is indeed another thing to be taken into consideration. In the best case it is just some additional click but in the worst case you can't read or write the needed format any more. Although some Windows applications run fine under Wine (Windows-Emulator), many others do not. Although people should prefer open standards this is not always possible.
  4. "I am a gamer and the most cool games run on Windows."
    Also true, although there are many free games on Linux, vendors produce new games quite only for Windows. Dual boot is an option but means to maintain two systems - and you still pay for the Windows license.
  5. "I have plenty of friends around who can help me when I have troubles with my Windows-Machine, but I have no or very few options for the case I then have problems with the Linux box."
    This is also true for many as there are simply still more people around knowing Windows than knowing Linux. It does not really make sense trying to convince a person worrying about issues that are really there.
I think that most people who switched to Linux switched because of suffering and not because of philosophical or political reasons. - I personally suffered - and so here are my top reasons for switching to Linux:
  1. Stability & Reliability
    I had several key experiences with Windows in a short time frame like these: Machine began with strange behavior being slow and having hangups. Nothing in the event logs and no indicator whether it could be the hard drive, motherboard or "just" a software problem; Burned CDs that were not readable on a different Windows machine (but Linux could); Blue screens on startup turning out to be a problem with the CD drive (hell, I booted from HD so why can't go without the CD drive); files getting corrupted over time silently - I could continue further and not mentioning the plenty of issues I had trying to get reliable (restorable) backups/images of the OS.

    There are also some stability issues on Linux - I already had some sudden restarts of X - but I am simply less in panic mode on linux. In case of emergency, the OS switches to read-only mode to prevent from further corruption. Apart from that: Firefox runs more smoothly and stable on Linux, Memory usage of the complete system is less, ...
  2. All the important stuff is right there after install.
    After installing a Linux desktop distro, you can right away burn CDs and DVDs, write your documents (full open office suite included) and emails and more. With a few clicks you can start developing software, do mind mapping, manage databases, do sound and video editing and much much more. - Without paying a dime!
  3. You are legal without entering a single license key.
    I hate the annoying entering of serial numbers as well as the annoying registration over the internet. I have seen too many people not finding their original CDs any more (even in companies) and I have seen too much problems registering over the internet - even losing the only developer license of a product after setting up a new notebook after the old was rotten - just because vendor saved hardware information.
  4. Software management.
    On Linux there are managed repositories of software. That means basically, that you have a list of available software, can go through it or search and you can install a software by just putting a checkmark in front. Dependencies of files and packages are handled by the package manager. The result is that there is only very few chance to kill your machine with just installing some software. I only had a very few cases where two application were conflicting and that is already a longer time ago. Removing both an reinstalling the one you like more then works.
  5. Intention and business strategy.
    The intention of the makers of Linux is to create a reliable and helpful system that helps you getting things done - at least for me it feals that way. If features are missing then they are not ready yet, they are not missing because of business considerations. This makes a big difference in user experience. PDF is a good example. On Windows there is a huge market around PDF and there is no interest in integrating PDF features in the core OS. - Or on the other hand there are "features" like DRM in the multimedia area that would be better missing. In many cases it seems for me that I have just the "light version" and need to pay more for the final needed productivity improvement. Further business strategy of Microsoft and Apple for example shows that they do not miss a chance to drive the customer into a dependency and try to block out every attempt of communities to improve interoperability. Although Microsoft shows some cooperation, they put big rocks somewhere else. Microsoft did a better job than all the other vendors in the last about 20 years helping to improve productivity on the client. But currently I can only see that they fully exploit their market situation and customers are suffering from that. There are many messages in the news pointing out untrustworthy behavior of Microsoft and even Apple (e.g. Microsoft capturing ISO or common strategy on entering product categories; Apple removing Google voice).
    There is a saying: "Fool me once, shame on you. Fool me twice, shame on me."
However, I can understand people who stick with Windows as Windows has it's advantages - for instance the more options in the Explorer configuration offering many more columns to show in detailed view. The above list of pros and cons is not exhaustive and shows just some general thoughts over particular features. For me personally the Linux ln command for creating symbolic links is a really cool feature. It allows you to link a file or folder to a file/path somewhere else in your file system. This works really seamless (not as the lnk files in Windows). You can use this to link parts of your profile from a completely different location (e.g. external USB drive). But this is just one of the small nice things - as the default support for multiple desktops.

The more I see people litigating about what OS is best (Windows, Linux, Mac or even others), the more I come to the conclusion that those quarrels will not bring a winner - at least not nowadays. I think, everyone should accept, that there are different operating systems and sooner or later we will find ourselves within a multi-OS environment. We should improve interoperability and find ways living together in peace.

Related posts: Windows 7 RC, My application set on Windows, Installing your PC from scratch, Apple worse than Microsoft?, The operating system, The Open Source idea, Why I have chosen Fedora, Why I switched to Ubuntu, Going Linux, Ubuntu 10.04 experiences, Small Business Boom, Ubuntu compatible hardware, User lock down, A few Linux related videos.