Monday, 28 January 2008

Text editors

If there is one thing Linux has in spades, probably even more than desktops, it's text editors. I just entered apt-cache search "text editor" and was greeted with a staggeringly long list. Now, not all of these were text editors, some just had the phrase "text editor" in the description, but there's still a hell of a lot of them.
There's a good reason for this. Linux uses text-based files for configuration purposes. For instance, the software repositories you are subscribed to are stored in a text file. Although you can add new ones using a graphical application, it's often easier to use a text editor as you often need to do little more than add a line to the file, and separately import the signing key. Adept or Synaptic can take a while to load, whereas a text editor doesn't.
Text editors can be divided into two types:
  • Command line text editors work within the command line, and are usually started by entering their name.
  • Graphical text editors open in their own window, just like any other graphical application, and can normally be started from the menu.
Probably the two best-known text editors within Linux are vi and Emacs. Both are extremely complex and powerful applications which are very useful once you have gotten to grips with them, but have something of a learning curve to them.

vi is traditionally a command-line editor, although now it provides various GUI's (graphical user interfaces). It's small and fast, but very powerful. The commands take some getting used to, though, as they are radically different to their equivalents in similar applications in Windows (such as Notepad). Nowadays, the original vi is rarely used as it has been mostly supplanted by newer versions, the best-known of which is Vim, but these are often still referred to as vi.

Emacs takes longer to load, but is more powerful and customisable than vi. It's virtually an operating system in its own right - you can apparently use it to browse the web, read e-mail, even play Pong or Tetris!

But don't worry - you don't need to start using one of these text editors yet. Ubuntu comes with vim-tiny, which is a cut-down version of Vim, as well as gEdit and nano. Kubuntu has Kate instead of gEdit, but is otherwise the same.

gEdit and Kate are both graphical applications, and will be easy to get to grips with if you're already used to applications like Notepad. I find Kate in particular is a great application for programming, better than Notepad by a long shot. When you're writing code in many languages it will adjust the colour of the text to help make it more readable (I know it can do this with HTML, CSS and JavaScript, but it didn't seem to do so with Java).

However, I find that for editing configuration files it's best to use a command-line text editor as if you're making changes to the system you'll need to use sudo. Nano is great for this, as it's a nice straightforward text editor. To launch it, you just need to give the name and specify the path to the document (and include sudo if necessary). For example, to edit your /etc/apt/sources.list, enter the following:
sudo nano /etc/apt/sources.list
And nano will open up the document with administrative access. Once you've finished editing it, you can press Ctrl-O to Write Out (ie to save it). Or you can just press Ctrl-X to exit and if you have unsaved changes you'll be prompted to save them. It's pretty self-explanatory, but you can press Ctrl-G to get help.

You could use Kate or gEdit to do this by putting sudo kate instead of sudo nano, but they will take longer to load, whereas nano will get started almost immediately. It's therefore ideal for editing configuration files.

You'll no doubt be editing many text files as you begin to get more confident with Ubuntu, so take the time to become familiar with at least nano and Kate/gEdit. As long as you can use one command-line editor and one graphical editor, that should be sufficient. But if you find yourself using text editors a lot, more powerful options such as Vim and Emacs will become more worthwhile.

In future posts I will generally be using nano when a text editor is called for to edit a configuration file, but don't feel you have to use this. If you prefer something else, that's great, after all, they all do the same thing!

Saturday, 26 January 2008

A new look for Ubuntu

One complaint I hear about Ubuntu a lot is the colour - a lot of people dislike the choice of brown as the predominant colour in the default Ubuntu setup. Personally I think the default wallpaper in Ubuntu looks OK (it's a chocolate brown, not a something-unspeakable brown), but I use Kubuntu anyway so it doesn't affect me.

But if you're using Ubuntu, you may want to change the look if you don't like it as it is. Ubuntu has many resources to make it look better, and one of the best is Blubuntu. It includes a new session splash, wallpaper, theme and GDM theme to help rid your desktop of every last trace of brown!

Just open a terminal session and enter the following:
sudo apt-get install blubuntu-look
This will install the blubuntu-look metapackage.

Now open the System menu and go to Preferences, then Appearance. You can now change to using Blubuntu for your theme, wallpaper, GDM theme and splash.

Thursday, 24 January 2008

apt-cache

We've touched on installing packages from the command line, but to do so you have to know the name of the package you want to install. Sometimes you may know the kind of thing you want to install (such as a web browser or IM client) but not have any idea what different choices you have. Other times you may have some idea of the name of the package but not know exactly what it's called.

Now, you could use the package manager for this, but why go to the effort of starting up a graphical application that will take ages to work when the command line can do it quicker and more simply for you? Since Apt is the tool used by all these applications anyway, you might as well use it directly and get the job done quicker and more easily?

Apt has more than just apt-get up its sleeve. The apt-cache command allows you to search through both descriptions and package names, allowing you to look for a specific application, or for a type of application. This makes it a powerful and flexible tool.

First of all, let's run the following:
sudo apt-get update
That's just to make sure that you have the latest package lists from the repositories. Now, let's search for the Epiphany web browser:
matthew@matthew-laptop:~$ apt-cache search epiphany
epiphany - clone of Boulder Dash game
epiphany-data - required maps for epiphany game
epiphany-extension-gwget - Gwget extension for Epiphany web browser
libmozjs-dev - Development files for the Mozilla SpiderMonkey JavaScript library
libmozjs0d - The Mozilla SpiderMonkey JavaScript library
libmozjs0d-dbg - Development files for the Mozilla SpiderMonkey JavaScript library
peercast-handlers - P2P audio and video streaming handlers
flashplugin-nonfree - Adobe Flash Player plugin installer
epiphany-browser - Intuitive GNOME web browser
epiphany-browser-dev - Development files for Epiphany web browser
epiphany-extensions - Extensions for Epiphany web browser
matthew@matthew-laptop:~$
Apt-cache displays a list of all packages including the word "epiphany". There's no need for sudo as apt-cache makes no changes to your system. Similarly, if you wanted to search for a web browser, you could input the following:
apt-cache search "web browser"
In this example, as I want to search specifically for the term "web browser" rather than the two terms "web" and "browser", I've put them in quotes. That limits apt-cache to displaying applications which have the term "web browser" in their name or description, rather than either of the words individually, allowing you to narrow down the search parameters somewhat.

You can also use apt-cache to find other information about a package. For example, try this:
apt-cache depends epiphany-browser
will display a list of the dependencies required to run the Epiphany web browser. And this:
apt-cache show epiphany-browser
allows you to read the description for a package file.

In combination, apt-get and apt-cache allow you to install and remove packages, search for them and find out information about them. It's quicker and often easier to install from the command line once you get used to the tools. I hardly ever use a graphical application to install new software now - I just find it so much easier to use the command line.

If you were concerned about having to use the command line, hopefully these lessons have made you feel better about it. The best way to learn about the command line is to use it, and I hope you'll try to get into the habit of installing new packages from the command line, rather than going to the bother of starting up a resource-hungry graphical installer.

Monday, 21 January 2008

Installing a new desktop

As you may recall, we've gone over the concept of metapackages, where I mentioned that the different desktops are available as metapackages. I've also gone over the three main desktop choices in Ubuntu - Gnome, KDE, and XFCE.

We're now going to cover how to install a new desktop. Say you're running Ubuntu, and you'd like to be able to use the Kubuntu desktop. Simple - open Terminal and enter the following:
sudo apt-get install kubuntu-desktop
Apt-get will download the kubuntu-desktop metapackage and install it for you. You'll notice that all of the default applications for Kubuntu will be added to you Ubuntu install, so you'll have the option of using Kontact instead of Evolution for e-mail and so on. You'll also be asked which display manager you want to use, GDM or KDM (either is fine, the only visible effect so far as I can see is that if you use GDM it has the Ubuntu login screen, and for KDM the Kubuntu login screen).

Once that is done, you can log out and return to the login screen. From here, you can change the session type from Gnome to KDE using a pull-down menu, then log back in. You'll now be using the Kubuntu desktop!

You can also install the kubuntu-desktop metapackage in Xubuntu. Similarly, you can install the ubuntu-desktop metapackage in Kubuntu or Xubuntu, and the xubuntu-desktop package in Ubuntu or Kubuntu. Each metapackage includes all the applications you need to create a working install of the desktop, but every single application you've installed will continue to be available in all three desktops.

This is a great way to experiment with the three desktops to see which you prefer. By having all three available, it's easy to find out which one you like the best. Also, although I can't deny it does take a while to download each individual desktop, it's quicker than it would be to download Ubuntu, Kubuntu and Xubuntu and install them each in turn to give them a try before moving on to the next one.

Sunday, 20 January 2008

Restricted Formats

Due to licensing restrictions, in some countries (most notably the United States), it's not possible for free Linux distributions such as Ubuntu to offer many popular proprietary media formats such as MP3 and Adobe Flash Video 'out-of-the-box'. Distributions which are sold commercially, such as Linspire or Xandros, can offer these preinstalled because the purchase price includes a license to use them. Because Ubuntu is free, this option isn't available, so Ubuntu comes without the codecs (short for coder and decoder) necessary to support these formats. For more details, check out this link.
Fortunately, there is a way around this. There are still many countries where it is legal to use these codecs (for instance, anywhere in the European Union), so it is possible to install these quickly and easily. But if you're unsure, check out your country's legislation to make sure you're allowed to install this.
All you need to do is install a metapackage called ubuntu-restricted-extras (or for Kubuntu users, kubuntu-restricted-extras, or in Xubuntu, xubuntu-restricted-extras). You can open Synaptic or Adept Package Manager and find it in there, or you can go to the command line and enter the following:
sudo apt-get install ubuntu-restricted-extras
This installs the Java Runtime Environment (including a browser plugin so you can run Java applets in your browser), Adobe Flash Player (so you can watch YouTube), MP3 playback and recording, and DVD playback. The reason there are different metapackages for the different Ubuntu versions is that they have different applications installed and it includes MP3 playback for different applications.

I actually found that in Kubuntu an extra step was needed as DVD support wasn't enabled after I installed kubuntu-restricted-extras (I don't know if the same applies in Ubuntu). What you have to do is enter the following on the command line:
sudo usr/share/doc/libdvdread3/install-css.sh
This runs a shell script (a type of program) which adds DVD support. After I ran this, DVD's worked fine in the Kaffeine media player. If you've followed the above instructions in Ubuntu or Xubuntu and DVD playback still doesn't work, try this and it should sort it out.

One other thing the kubuntu-restricted-extras metapackage seems to leave out according to apt-get is the msttcorefonts package. This package is present in ubuntu-restricted-extras and xubuntu-restricted-extras, but apparently is not in kubuntu-restricted-extras. Basically, this package consists of the fonts you see in Microsoft Windows such as Arial, Helvetica, etc. So it's not essential, but still a good idea to have. So just open Konsole (or whatever other method you're using to access the command line) and enter the following:
sudo apt-get install msttcorefonts
You should now have the fonts you're used to from Windows available, so you can set your web browser to use them by default, which will make things look a bit more familiar!

I know this seems like a lot of hassle, but believe me, there are good legal reasons not to distribute Ubuntu with these restricted formats installed. There are other ways to get around the issue, though. Linux Mint is a Linux distribution which is based on Ubuntu, but takes a slightly different tack when dealing with the issue of restricted formats. Linux Mint has two versions, a Main edition for downloading in countries where it's legal to use these restricted formats, and a Light edition for countries where this is illegal. The Main edition includes these restricted formats so that they work 'out-of-the-box', whereas the Light edition lacks these. If you really don't want the hassle of dealing with installing support for restricted formats yourself (but honestly, it's not that hard), then Linux Mint makes an excellent alternative to Ubuntu, and is similar enough that much of what I discuss in this blog still applies.

Saturday, 19 January 2008

Metapackages

What is a metapackage? Basically, there are some packages which, although they aren't dependent on each other to function, logically belong together. For instance, the different desktops for Ubuntu, Kubuntu and Xubuntu are available as metapackages, each consisting of all the applications that make up the desktop, as well as the desktop itself. The Ubuntu one includes the Firefox web browser, Pidgin IM client and so on.

In theory, it is possible to install all of these separately, but this would be rather tiresome - in Synaptic, you'd have to pick out all of the applications individually and select them to be installed, on the command line you'd have to type out the name of every package. Apt-get would only pick up on the dependencies, leaving you to select everything else - you'd quickly lose the will to live!

That's why metapackages exist. They make your life easier by allowing you to install one package that contains all the other packages. This way, you can easily install lots of packages which are logically grouped in one go.

Don't worry too much if you're struggling to understand this at the moment. We'll be using several metapackages in my next few posts, as they allow you to solve a number of common problems that newbies have with Linux, and I'm sure all will become clear at that point!

Thursday, 17 January 2008

Gnome?KDE?XFCE?

Many people who have never seen Linux have the preconception that it is a DOS-like environment where you're expected to use only the command line, and there's no pointing or clicking, and certainly no Mac-esque dock. This actually couldn't be further from the truth! On the contrary, Linux has a staggering number of graphical desktops available, ranging from lightweight window managers like Fluxbox or Enlightenment to full-blown desktops like Gnome, KDE and XFCE. In fact, there's so many that it can be extremely confusing to a newbie. "Which one should I use?" is a common refrain.

In truth, I can't give a good answer to that, because we're all different and have different needs. You may prefer one desktop over another, or you may need to use something lighter because your machine isn't fast enough to run a full desktop. What I can do is give you some idea of what to expect from each, and what to bear in mind when choosing a desktop. Don't worry though, you can easily change your desktop without having to install a new version of Linux.

Although they are far from being the only ones available, I don't think anyone will disagree when I say Gnome and KDE are far and away the most popular desktops within Linux. These two are the most widely used and most advanced desktops available within Linux, and the chances are you will wind up using one or the other.

If you're using Ubuntu, then Gnome is the desktop that is installed by default:



It's a little like the Mac desktop in some ways. Don't be put off by the colour! A lot of people do seem to dislike the colour choice for Ubuntu, but you can change that easily once it's installed - you have several alternative wallpapers and themes available.

Gnome is a good desktop - it's reasonably fast, and has good applications. It's the default desktop for Ubuntu, and is simple enough that it's easy to use, yet also powerful enough for most things you could want. It's a bit of an adjustment from Windows, however.

If you like the layout of Windows or you consider yourself a power user, then KDE may be a better choice. It's laid out in a similar fashion to Windows, so you may find it easier to get used to. Also, it's got some very powerful features which Gnome can't match.



This is the KDE desktop in Kubuntu. Like in Windows, by default there's a bar at the bottom, with the main menu at the bottom left.

I'm unashamedly a KDE man myself - it has a lot of features I like. It has an excellent application launcher called Katapult - just press Alt+Space and it will appear, then start typing the name of an application and it will find it for you. Then press Enter and it will launch it. Konqueror is also a great asset - it's an extremely powerful file manager which doubles as a web browser, and has integration with many other KDE applications. However, if you just want to open files, KDE now has a lightweight file manager called Dolphin which is the default file manager.

Finally, there's XFCE. It's more lightweight than either Gnome or KDE - think of it as a quicker, faster version of Gnome. It's a good choice for older machines which don't have the processing power to run Gnome or KDE at an acceptable speed, or if you just want a really fast desktop.


You can still use all the same applications in XFCE as you could in Gnome or KDE, but you will notice a significant difference in speed.

Ultimately, the best advice I can give is to try them all out to see which you like the best. Although applications are usually designed with one of the desktops in mind, most Linux applications will work on all of them. I'll give details of how to install a new desktop in a future post.

Wednesday, 16 January 2008

dpkg

Although the Ubuntu repositories are very comprehensive, from time to time you may want to install something which isn't available from them (such as a more recent version of an application which has a feature you want). As mentioned previously, there are additional repositories you can add which may have these, but not often. More often, you'll have to download and install a .deb package yourself.

Now, apt-get is no use for this, as it only works with the repositories. But dpkg can be used to install any .deb package you wish.

Let's try it out. One of the best resources for finding .deb packages not yet in Ubuntu is GetDeb. This site has .deb packages for many applications not yet in Ubuntu, and others more up-to-date than those in the current version of Ubuntu. Follow this link to get to the page for Micropolis. Look familiar? It's the original Sim City, which has been open-sourced and is now available free for Linux! Click on the link for your version (32 or 64 bit), and download it to your desktop or home directory.

Both Ubuntu and Kubuntu now have graphical tools to install the package if you just double-click on it. But these tend to be quite slow and unwieldy, so let's use the command line. Open Konsole or Terminal, whichever you have installed. Now, you'll need to know the exact name of the package to install it. What I often do is right-click on it, select rename, then Ctrl-C to copy the name of the package to the clipboard. Then press enter to leave the name as it is - don't change it!

All you need to do now is enter the following:
sudo dpkg -i micropolis_0.0.20080114-1~getdeb1_i386.deb


And it will install it for you!

If you got fed up with it, you can remove it with the following command:
sudo dpkg -r micropolis


Note that to uninstall it you don't need the full name, it now has a record of the package and doesn't need all the same information.

Now, what about dependencies? When compared to apt-get, dpkg is not as sophisticated. All it does is install a package as it's told to, it doesn't pay attention to any dependencies. As a result, if you download and install something, you may get a message saying something like this:
matthew@matthew-laptop:~$ sudo dpkg -i pidgin_2.3.1-1~getdeb1_i386.deb pidgin-data_2.3.1-1~getdeb1_all.deb libpurple0_2.3.1-1~getdeb1_i386.deb
Selecting previously deselected package pidgin.
(Reading database ... 124149 files and directories currently installed.)
Unpacking pidgin (from pidgin_2.3.1-1~getdeb1_i386.deb) ...
Selecting previously deselected package pidgin-data.
Unpacking pidgin-data (from pidgin-data_2.3.1-1~getdeb1_all.deb) ...
Selecting previously deselected package libpurple0.
Unpacking libpurple0 (from libpurple0_2.3.1-1~getdeb1_i386.deb) ...
dpkg: dependency problems prevent configuration of pidgin:
pidgin depends on liblaunchpad-integration0 (>= 0.0patch26); however:
Package liblaunchpad-integration0 is not installed.
dpkg: error processing pidgin (--install):
dependency problems - leaving unconfigured
Setting up pidgin-data (1:2.3.1-1~getdeb1) ...

dpkg: dependency problems prevent configuration of libpurple0:
libpurple0 depends on libnm-glib0; however:
Package libnm-glib0 is not installed.
libpurple0 depends on libzephyr3; however:
Package libzephyr3 is not installed.
dpkg: error processing libpurple0 (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
pidgin
libpurple0
This is for the Pidgin IM client, which I've downloaded and installed a new version of from GetDeb. Basically, this means that there are outstanding dependencies which need to be resolved before you can use Pidgin. But here's where apt-get comes to the rescue. You see, apt-get can tell what packages are outstanding, enabling it to resolve the dependencies for you! Just enter the following command:
sudo apt-get -f install
Now, this basically says to apt-get "Resolve any outstanding dependencies", and it will do it with no further input from you.

In this way, you can get software that isn't yet available in the Ubuntu repositories quickly and easily. However, be aware that this does pose a potential security risk, so try to only get .deb packages from websites you trust. Also, packages that aren't yet in the official repositories may not be as stable as ones that are, so you take a certain amount of risk in terms of reliability.

Tuesday, 15 January 2008

apt-get

Installing software is a piece of cake in Ubuntu. For applications, you can just open Add/Remove Applications, select what you want to install and then click on a few buttons to install it. Couldn't be simpler.

For more complex things, you can use Synaptic (or Adept in Kubuntu). This allows you to search through the packages using search tools which make it easy to narrow down the choices to what you want. Synaptic doesn't just give you a list of applications, it gives you absolutely every single utility available in the repositories, making it an extremely powerful tool. Many things are available from there that you wouldn't be able to get using Add/Remove. For instance, you can use Synaptic to install the Kubuntu desktop in an Ubuntu install.

However, both Add/Remove Applications and Synaptic are just graphical front-ends to make it easy for new users to get started. The real work is done by apt-get, which you can access yourself from the command line if you wish. This has lots of advantages:
  • It's faster - since the computer doesn't have to expend a lot of processing power making it look nice, it can get on with installing it quicker.
  • It's easier to install more than one thing at once - you can just specify the names of all the software packages you wish to install.
  • And of course, you get more kudos for installing from the command line!
First of all, a quick lesson. The software available for Ubuntu is kept in the repositories. Think of them as online software libraries, the contents of which are free for you to download and install. There are other repositories available (for example, Google have their own Linux repositories , from which you can download and install things like Picasa or Google Desktop), but the main ones that come preconfigured with Ubuntu are:
  • main
  • restricted
  • universe
  • multiverse
I won't explain what each one is now, we'll come to that in the future. For now, you just need to know that they are there. The software for Ubuntu comes in packages. Ubuntu uses a package format called deb packages - if you download one from somewhere other than the repositories to install it manually, you'll notice it has the .deb suffix.

Any package may depend on other programs to function - this is known as a dependency. For instance, if you install a program written in the Java programming language, you need to have the Java Runtime Environment installed. In Windows, this issue is solved by the installer including all of the dependencies within the download - so if you download Firefox, everything you need is included in that installer. This has the disadvantage that the download can be bigger than it needs to be.

Ubuntu takes a different approach. Each package consists of only the program itself, but it includes a list of all the dependencies. apt-get can use this to determine what dependencies for a package aren't yet installed, and then automatically download and install them. This means you don't have to download any more than necessary, saving you time.

That's the theory part. How does it work in practice? I'll walk you through a few basic commands. Open the command line (Terminal in Ubuntu, Konsole in Kubuntu), enter the following and press Enter. Remember, as apt-get makes changes to your system, you'll need to preface it with the sudo command each time, and you'll be prompted for your password - just use the same one you use to log in:
sudo apt-get update
This command updates your system's record of the most recent versions of packages, to make sure it's up to date. So it's good practice to run this before you install anything, in order to make sure you get the most recent version from the repositories.

What it DOESN'T do is upgrade the packages you already have installed to the latest versions. For that you need this:
sudo apt-get upgrade
If you perform these two commands regularly (say, once a week or so), you'll be able to keep up with the latest versions of everything you have installed. Unlike in Windows, you don't have to open an application and then discover it's found a more recent version, you can do it all from the same place! Don't you think that's more convenient?

Installing is easy. For instance, say you want to install the strategy game Singularity. Just enter the following on the command line:
sudo apt-get install singularity
You'll be prompted for your password. Then take a look at the resulting message:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
python-pygame singularity-data
Suggested packages:
timidity
The following NEW packages will be installed
python-pygame singularity singularity-data
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 1201kB of archives.
After unpacking 3457kB of additional disk space will be used.
Do you want to continue [Y/n]?
Don't worry if yours looks a bit different to this - you may have different things installed. Notice the line saying "The following extra packages will be installed: python-pygame singularity-data". These are dependencies that Singularity relies on to work, and apt-get has picked up on that.

Now, press Y and Enter to continue. apt-get will download and install everything you need without further need for you to do anything.

There, that wasn't hard, was it? Suppose you get fed up of Singularity and want to uninstall it. Just type the following:
sudo apt-get remove singularity
and again follow the on-screen instructions. Note that when uninstalling, apt-get doesn't automatically remove dependencies that aren't required any more. If you want to get rid of these, you can use the following command:
sudo apt-get autoremove
That's it! Now you can install anything you want from the Ubuntu repositories using the command line. You do need to know the name of the package you want to install or remove, but we'll cover how to discover that later.

Monday, 14 January 2008

Sudo

What is the sudo command? If you're familiar with Microsoft Windows, you'll no doubt understand what is meant by having administrative access - if you have it you can install new software, make changes to the system and things like that.

Linux works slightly differently to this. Most Linux distributions use what is called a
root account or superuser account to control what users can do. There can be any number of normal user accounts, but there is only ever one root account. To make any change at all to the system (such as installing or removing software), you need to log in as root.

Any operating system based on Unix has this, be it Linux, Mac OS X, FreeBSD or whatever. It's because Unix was designed right from the start to be a multi-user operating system, so it was designed so that many people could use it, but administrative access could be limited to certain individuals. This is why any Unix-based operating system is inherently more secure than Windows, which was designed as a single-user operating system.

However, it does have one or two disadvantages. For one thing, it can be a pain to log in as root, do what you have to do to administer your system, then log out and log back into your normal account. It can be tempting to just think "No, it'll be alright" and remain logged into root and go surfing the web. This can be a bad idea because it means that anything that gets into your computer from the Internet can then get in with administrative access, which could potentially cause problems. Also, it means more than one person may have to know the password for root, which could cause problems - I mean, how many times have you seen offices where people write passwords on Post-It notes so they can remember them? If several people need access to root and they have to write it on a piece of paper so they can remember that as well as their normal password, how bad would it be if someone got hold of that?

That's where sudo (pronounced soo-doo) comes in. It's available for many other distributions to install, but Ubuntu uses it by default (as does Mac OS X). Basically, sudo means that there is no root account. Instead, one or more users can use the sudo command to temporarily gain root access by entering their normal password again.

In use, you preface another command with it to run it as root. For instance, to use the apt-get program to install the game Pingus, here's what you would enter:
sudo apt-get install pingus
This is arguably safer because with sudo, root access expires after a few minutes, so you're safe to go surfing the Internet straight after having made whatever changes you want to. You can set which users can use sudo and which can't. So you can prevent your horrible little brother from installing any new software without your permission.

There are two similar commands for if you want to run graphical programs with root access. For instance, say you want to use the gedit text editor in Ubuntu to edit a text file that's important to the running of your system - let's say this is your /etc/apt/sources.list (you don't need to worry what this is at this stage). You'd enter the following:
gksudo gedit /etc/apt/sources.list
because gksudo is the graphical equivalent to sudo for the Gnome desktop. The KDE desktop has its own equivalent, kdesudo. So, if you wanted to edit the same file using the Kate text editor in Kubuntu, you could enter the following:
kdesudo kate /etc/apt/sources.list

Any application which will always need root access, such as when you open the Add/Remove Programs, will automatically prompt you for your password in this fashion. If you've used Windows Vista, it's very similar to that message that comes up when you want to install or remove anything, only you have to put in your password. So you may encounter kdesudo or gksudo like this even if you never input them on the command line.

Don't forget, it's there to keep your system secure.

Don't fear the command line!

If you've come to Linux from Windows (and probably if you've come to it from a Mac as well), you may not be used to the command line. You may indeed have never used it, and the thought of doing so might well scare you rigid.
Well, don't be scared. The command line is there to help you, and it really doesn't take that much effort to get used to it. When I was eight, I had an Amstrad CPC which had a command-line interface only, and I managed to use it fine, so I'm sure you will too.
Also, you might worry that by using the command line, you'll completely screw up your system. Believe me, it's just as possible to do that from a graphic user interface as it is from the command line.
There is a learning curve, no doubt about it, but it's not that steep. A handful of commands will see you in good stead. I wouldn't call myself a whizz with the command line by anybody's standards and only know a handful of commands, but with those I'm fully able to install any software I wish, add new software repositories, edit configuration files and manipulate files and folders.
It's possible to use Linux without ever using the command line if someone else is administering it for you, but if it's your own computer and you will be doing the administration, you'll probably soon need to use the command line. But DON'T PANIC! There's plenty of resources available to help you learn the basics -  try this link for basic commands in the command line. That should be enough to get you started.
Honestly, the command line is not that hard. And you may not believe me when I say this, but very often it is the quickest and easiest way to get things done. To install a new application (say, Pingus) using Synaptic Package Manager (or any other package manager, for that matter), you have to open the menu, go to the right submenu, click on the application, enter your password, sort through a long list of applications for the one you want, select it, then click a button to install it. Whereas with the command line, you just open a session and type:
sudo apt-get install pingus

Press enter, put in your password, and it does it all for you! It's quicker because the computer doesn't have to spend so much time making it look pretty for you - it can get on with the job at hand!
So dont' worry about it. It will take you no time at all to get used to it, I promise!

Blogged with Flock

About Easierbuntu

I first tried Ubuntu back in February 2007. At the time, I was just beginning with Linux. I'd bought a book, Linux for Dummies, and had tried the distros enclosed with it (Fedora, Knoppix, OpenSUSE, Linspire, Xandros and Mandriva), and not one of them really appealed to me that much.

But the book mentioned a newer distro as well. Ubuntu. It didn't have space on the enclosed disc for it, so I'd have to get a copy of it myself. So I went to the website.

Immediately it appealed to me, with its philosophy that epitomised the best of the free software movement, a community that was one of the friendliest of all Linux distributions, and a goal of providing the world with a great operating system that was, and always would be, free of charge and would empower you to take control of your computer and not be dependent on a faceless corporation.

Intrigued, I downloaded a copy, burned it to a disc and ran it. I was amazed. Here was a free operating system that was well-thought out and user friendly. It was so easy to use, even though it was quite unlike Windows. Virtually any software you wanted was free to download from the Ubuntu repositories.

Later, I heard about Kubuntu, a version of Ubuntu with the KDE desktop. I tried this, and it instantly felt like it was my operating system. This was the Linux distribution for me.

But I struggled with it. There were always some things that were difficult, and I found it hard to find answers to some problems I had with it. I wasn't able to get my wireless internet connection working, and it was frustrating. Once Kubuntu Feisty was released, I managed to get the wireless working with the help of a book, but I wish that I had been able to find somewhere to go for basic tips on using it.

Well, now I know how to sort out all the problems I had with Ubuntu, and I no longer have to use potentially risky third-party solutions like Automatix to install what I want in Kubuntu. So I've decided to start this blog to give new Ubuntu users (or users of any other distribution based on Ubuntu) regular tips. Things intermediate-level Linux users like myself take for granted, but that can seem like the end of the world when you're just starting out, like DVD playback, MP3 support, installing software, things like that. I hope I can make a difference to a few users.

If you are a more experienced user, and you'd be interested in contributing to this blog, please contact me. The more people we can get contributing tips and guides to this blog, the more people we can help. I'd be very glad to hear from you!

You may also notice a few links on this page. I've included links to several useful blogs and forums which I'm sure will come in handy. I've also added two customised search engines for Ubuntu software packages and help with Ubuntu.

If you're a new user of any Ubuntu-based Linux distribution, then I hope this blog is useful. I've added links to make it easy to bookmark it, subscribe in an RSS reader, or add it to your Technorati favourites.