« December 2011 | Main | February 2012 »

January 30, 2012

Beginning Linux : Part 4 - Exploring the Unity interface

Ubuntu's Unity interface is a step away from traditional graphical user interfaces. The intention is to make it the basis of a standard interface for everything from PCs to tablets to phones, and it's implementation has been somewhat controversial. It's predicated on two main ideas; that most users only ever use a handful of applications, and that people prefer to search for things by typing -- as they do on the web -- rather than going through going through arcane menus and clicking on drop-downs. I take issue with the second of those, but before abandoning the interface entirely -- this is Linux, after all! -- it's worth exploring Unity to see what it has to offer.


Unity vs Unity 2D

There are two distinct forms of Unity -- Unity and Unity 2D -- and they look almost identical, but they are built very differently. The default, Unity, (sometimes called "Unity 3D"), uses the Compiz window manager and your fancy 3D graphics card to add all sorts of eye candy like translucency and cool 3D graphical effects. It's really designed for modern hardware. Older gear will perform better with Unity 2D.

The easiest way to tell what you're running is to move your cursor over the Dash button:




But that may change in future versions. A more reliable way is to type this command in terminal window:

echo $DESKTOP_SESSION

A return value of "ubuntu" means Unity (3D), while "ubuntu-2d" means Unity 2D.

You can select which version to run at login. Just click the gear icon before you enter your password.



Whatever you select will automatically become the default, so there's no need to repeat this process every login.



Unity's Launcher

The Launcher -- that icon bar on the left -- is Unity's most obvious feature. Click on a button and the application will start. Running apps get a little arrow head on the left, while the one currently in the foreground also scores an arrow on the right:



Left-clicking a Launcher button will bring an already open application to the foreground, but what if you want to open a separate copy? Easy, just click it with the middle button of your mouse instead. (If you only have a two-button mouse, right-click the Launcher button and choose New.)

Unity will track each separate opening of the same application by adding a check mark to the left ...



... so here I have three instances of Terminal running

The exception to all of the above is the Dash button at the top of the Launcher. This is the place you search for and start apps not already on the Launcher. Once an app is started, if you want to keep it there for easy access in future, just right-click it and tick Keep in Launcher:



To remove an item from the Launcher, right-click it and untick Keep in Launcher.

To re-order items, simply left-click the icon and drag it to where you want.

As the Launcher fills, items on the bottom will stack. Just move the cursor over them and they'll unpack.



With items unstacked, use the mouse's scroll wheel to move through the list, or left-click and drag to move quickly up and down the list.

Unity has a number of nifty screen-space saving features like hide-away scroll bars that only appear if you need them.



One initially confusing aspect for many new users is the apparent absence of menus. (This is even more disturbing if you maximise an app because the Exit, Maximise and Window buttons disappear too!) To find them again, just move the cursor to the Status Bar at the top of the screen ...



... or press the <Alt> key.


Unity has a heap of keyboard shortcuts built-in. Here are some of the most useful:
(Note: The Meta key is the one with the (shudder) Windows logo on it.)

Meta
Tap to open the Dash. Tap to close it again.
Meta
Hold it down to reveal the Launcher and number launchable applications. (See below.)
Meta + 1
thru to
Meta + 0
Start Launcher item number n or switch to it if it's already running.
(Hold down Shift to open a new window.)
Meta + A
Open the Application selector.
Meta + F
Open Files and Folders.
Meta + T
Open Trash.
Ctrl + Alt + T
Open a Terminal window.
Alt
Reveal the Application menu.
Alt + Tab
Switch between windows.


Hidden Linuxy Goodness

There are a few other things you may not be aware of -- what I like to call hidden Linuxy goodness. For example, you actually have four separate workspaces available by default. That means, for example, you could do word processing in workspace #1, email and web browsing in space #2, programming in space #3, etc. and simply switch between them.



This is where the next set of shortcut keys kick in:

Ctrl + Alt + Arrow keys
Shift between workspaces
Meta + S
Activate the workspace switcher, zooming out on all of them.
Meta + W
Show all windows from all workspaces.
Ctrl + Alt + Shift + Arrow keys
Move the current window to a different workspace.


Another way of performing that last command is to right-click in an application's Title Bar and choose Move to Another Workspace.

Perhaps you're now thinking that Unity's not so scary after all. Personally, I rather like it. But if you'd like to try something more conventional, tune in next time. Complete reconfiguration is only a few commands away ...






Follow Geoff Palmer on Twitter

January 20, 2012

Beginning Linux : Part 3 - Adding hidden extras

Now you've got Ubuntu installed and running, you'll have probably noticed there are one or two things missing. Things like MP3 playback and decoding, support for certain audio formats, Microsoft fonts, Java runtime playback, Adobe Flash, and the ability to play (and rip) DVDs.

The reason this stuff's missed out from the default install is that it's either proprietary -- meaning the source code is controlled by a third party and you have to agree to their terms and conditions in order to use it -- or it's subject to copyright restrictions, or, in some countries (notably the US), there may be legal issues surrounding its use. (You can find more about this stuff here.)

Some users have philosophical reasons for not using closed-source software too -- but many don't, and if you're one of them, read on ...

Getting extras

We need to install more software, and to do so you'll want to start Ubuntu's Software Centre. There are two ways to do this;
The graphical way is as follows:

Click the Dashboard Home button (on the top left),



choose More Apps,



select System,



click on Installed (See more results),



then scroll down and click Ubuntu Software.




Alternatively, you can hit <Alt + F2> to open the Run a command dialog box and start typing "software". Various options will filter out underneath, and you can click on Software Centre from there.





Once Ubuntu Software Centre is running, type "restricted" in the search pane,



select Ubuntu Restricted Extras and click Install.



You may get a dialog box warning that a couple of existing packages will need to be removed. That's fine. They'll be replaced with different versions. Just click Install Anyway.



Of course, Linux doesn't allow any old user to install any old software. You'll have to supply your root ("system admin")  password first.



And now you'll get a blast from the past: license agreements. Remember them? Trust me, they're a rarity in the free software world!

Installation progress is shown in a little bar above the Install button.


And that's it. Your first program (actually, multiple-program) installation. Pretty easy, eh? (Yes, all new installations are that simple.)


The CSS secret

But we're not quite done yet. While you can now play unencrypted DVDs, you still won't be able to play most commercial ones due to their use of the Content Scramble System (or CSS), a proprietary encryption system that was cracked over a decade ago. In some countries it's still not legal to possess a copy of DeCSS (the unencryption program), and that's why it has to be installed separately.

To do that, we're going to look at another way to install software: directly from the command line.

Click the Dash Home button and type "terminal" in the search line. Click the Terminal icon and you're ready.


The necessary library (libdvdread4) should already have been installed as part of the Restricted Extras package, but it does no harm to check. Type in this command and press <Enter>:

sudo apt-get install libdvdread4

You'll be asked to supply the root password, and you should then get a message saying that it's already been installed. If you don't, go ahead and install it.

Now you need to install the CSS bit. You do so with this command:

sudo /usr/share/doc/libdvdread4/install-css.sh

Done! Close the terminal window -- <Ctrl + D> is a shortcut key for this -- and enjoy your DVDs.

If you still have problems, check out Playing DVDs on the Ubuntu site.





Follow Geoff Palmer on Twitter

January 12, 2012

Beginning Linux : Part 2 - Installation step-by-step

Linux downloads typically come as ISO images that will burn directly to a CD. You can also install them on a USB stick and boot them from there. But how do you get them to actually boot?

Most PCs are configured to boot from a removable disk first, a CD if no removable disk is found, then a hard disk drive if neither of the others are present, but you can't guarantee that! If your machine goes straight to hard disk, you'll need to change your BIOS settings, which can be accessed by pressing F2, F12, Delete, or ESC at boot. (The appropriate key differs with different BIOS makers.)

Note that you may need to change two settings in some BIOSes. Adding a USB stick to my American Megatrends BIOSed machines requires checking the Boot Device Priority and setting the Hard Disk Drives so that the first drive is the USB, not the hard disk.

And that's about as technical as it gets. With the boot disk booting, you're on your way. The rest is really straightforward.

(If you still have boot problems -- especially with older CD-ROM hardware -- check this link out.)



Installation: A graphical walk-through



I'm guessing you can figure out what to click here ...





You have two additional options here: if you're connected to the net and have a reasonably fast broadband connection, tick Download updates while installing, but note that the installation process may take quite a bit longer. (You'll be presented with automatic updates once you're up and running, so adding them now isn't essential -- especially as you're probably keen to Ubuntu going!)

The second option to Install third party software should be ticked. I'm not sure what hardware's on your machine, but you probably want it all to work!





Unless you're an advanced user or really know what you're doing with hard disk partitions, choose Install Ubuntu alongside your existing operating system(s).





If you're connected to the net, Ubuntu will take a stab at where you are. If it gets it wrong, just click the appropriate time zone.





Local (New Zealand) keyboard layouts are typically English (US) / English (US), but Linux can accommodate everyone.





Now for the tricky stuff: who are you? I'll leave you to figure that out.

There are two other options to consider: Log in automatically is fine if you're the only user of the machine. Personally, I prefer the default: Require my password to log in. It's just more secure.





It depends on your hardware, but a typical Linux installation (excluding automatic updates) will take 10-20 minutes. In the meantime, browse some slides of what you new OS can do, or just go and make a coffee.





That's it. Ready for a reboot.





At boot time, you'll now get a menu allowing you to choose which operating system to start. By default it's set to Ubuntu, and if you do nothing for 10 seconds Ubuntu will start automatically. But of course, this is Linux. All this is configurable -- and I'll show you how in coming blogs.





In the meantime, check out Ubuntu and the new Unity desktop.

Next time, we'll have a quick look at what's there (and what's missing). And how to add the missing stuff!





Follow Geoff Palmer on Twitter
Subscribe
Newsletter & SubscriptionsPC World is New Zealand’s top selling computing and technology magazine.

It provides up-to-the-minute editorial, insight and buying advice for personal computing, cell phones, game consoles, digital entertainment and broadband.
SIGN UP
PCWorldUpdate
PC World's weekly round-up of tech news, gear and game reviews, software selections, and handy How Tos.