Stories
Slash Boxes
Comments

News for nerds, stuff that matters

Slashdot Log In

Log In

Create Account  |  Retrieve Password

Ubuntu Hacks

Posted by samzenpus on Wed Jun 21, 2006 03:01 PM
from the 101-things-to-do dept.
Ravi writes "I recently got hold of a very nice book on Ubuntu called Ubuntu Hacks co-authored by three authors - Kyle Rankin, Jonathan Oxer and Bill Childers. This is the latest of the hack series of books published by O'Reilly. They have made available a rough cut version of the book online ahead of schedule which was how I got hold of the book but as of now you can also buy the book in print. Put in a nutshell, this book is a collection of around 100 tips and tricks which the authors choose to call hacks, which explain how to accomplish various tasks in Ubuntu Linux. The so called hacks range from down right ordinary to the other end of the spectrum of doing specialised things." Read on for the rest of Ravi's review.


The book is divided into 10 chapters each containing a collection of hacks on a particular topic.

In the first chapter titled - Getting Started, the authors explains how to install Ubuntu on a Mac and Windows PC, moving data like mail from windows Outlook express to Ubuntu, setting up a printer and more. This chapter contains a total of 14 hacks. And my favorite hack is the one where the authors explains how to create a customized version of Ubuntu Live CD containing ones favourite applications.

The second chapter dwells on the topics related to customizing the Ubuntu desktop. Here the authors give tips to install Java, customize Ubuntu desktop, install additional window managers, synchronizing ones PDA and Pocket PC, just to name a few. This chapter contains around 27 tips. My favourite one here would be how to create PDF files by using the print command from any application in Ubuntu.

Ubuntu like other main stream GNU/Linux distributions is encumbered by the patent restrictions related to various popular multimedia file formats. The net result is one cannot play multimedia files like mp3, wmv or quick time in a default Ubuntu installation. In the chapter titled "Multimedia", one gets to know how to enable audio and video applications bundled with Ubuntu to play these restricted media files.Topics like CD ripping, playing encrypted DVDs and playing any media formats using the all time popular mplayer are also explained in simple detail. But the one hack which takes the prize is that which explains how to buy songs at the iTunes music store and download the music on Linux.

Laptop users have some advantages as well as disadvantages over people using the desktop. And considering that the number of laptop users are ever increasing, there is a need to explain how to configure and take care of ones laptop running Ubuntu - like prolonging the battery life, configuring the wireless card on the laptop, hibernating, setting up bluetooth connection and so on. The 4th chapter contains around 8 detailed tips which deals with these interesting topics related to a laptop. I really liked the tip explaining how to make ones laptop settings roam with ones network which could be quite useful for people who are always on the move.

Chapter five of this well structured book deals exclusively with configuring and fine tuning X11 - the X Windows System. Here one gets to know how to configure ones mouse the old fashioned way by editing the requisite section in the X configuration file.As an example, the authors elaborate on a special case of configuring a seven button mouse with a tilted scroll wheel to work properly in Ubuntu. This chapter additionally contain a slew of tips to configure different difficult to configure hardware like the touch pad, setting up dual head displays, installing and configuring Nvidia, ATI and Matrox proprietary graphics drivers to work in Ubuntu and more.

The next chapter titled "Package Management" has a collection of tips in managing packages. Over and above explaining how to install, remove and update packages using apt-get, synaptic and Adept, this chapter also contain tips on creating ones own Ubuntu package from source, cache packages locally from source and more. I especially found the hack where the authors explain how to create ones own Ubuntu package repository really informative.

The seventh chapter dwells exclusively on Security. Usually Ubuntu for the desktop comes with all the ports closed by default which makes it relatively secure. But in these times of cheap high speed Internet access when a home network is connected to the Internet at all times, it is always prudent to run a firewall on ones machine. In this chapter, the authors explain how to setup a robust firewall using iptables and firewallbuilder and then manage it from the Ubuntu desktop. But that is not all, there are tips on configuring SUDO to limit permissions to different users where one gets to know how to do it the command line way. But my favourite tip in this chapter is the one which explains how to encrypt the file system to protect important data. This chapter contains a total of six in-depth hacks all related to enhancing the security of the machine running Ubuntu.

Ubuntu developers have always persevered in providing easy to use front-ends for conducting the most common system administration tasks - be it creating additional user accounts or managing the services running on ones machine. But at times the user is forced to do system administration tasks the command line way. In this chapter titled "Administration", the authors explain for instance how to compile a kernel from source the Ubuntu way and also ways of installing multiple copies of one kernel version on the same machine which could be useful for testing purpose. There are tips for taking backups as well as restoring them. I found the hack titled "Rescuing an unbootable system" really useful. This hack is in fact a collection of tips where common rescue scenarios are elaborated. I found this chapter full of very useful tips as varied as ways of synchronizing files between different machines, mounting a remote filesystem and even a tip on creating videos by capturing what is done on the desktop which could be really useful when shared with others while seeking help on a particular error.

A virtual machine is a simulated computer-inside-another-computer, allowing one to boot an extra operating system inside the primary environment. The next chapter titled "Virtualization and Emulation" explains the different virtualization and emulation technologies available which allow one to run windows/Dos applications and games in Ubuntu, running Ubuntu inside Windows and so on. Here the authors gives in-depth step-by-step walkthroughs in configuring and running virtualization and emulation technologies such as Xen, VMWare server and Wine which imparts a lot of importance to this chapter.

The final chapter of this excellent book which is also the 10th chapter deals with setting up a small home/office server. Here one gets to know how to install and configure a Ubuntu server from scratch. All the topics like setting up quotas to control disk space usage among users, setting up an SSH server, configuring Apache web server, building an email server, DHCP server, DNS server and so on which are a part and parcel of an office server setup have been given due importance in this chapter.

All the ten chapters combined, there are a total of 100 tips (Oops! hacks) in this unique book which are based on the latest version of Ubuntu - Dapper Drake. What is worth noting is that one is not expected to read the book from cover-to-cover rather, you can flip to the hack you are interested in and carry on from there which makes this book a very good reference for setting up and configuring all things related to Ubuntu. At this point, one might have questions in ones mind whether many of the solutions listed in this book aren't already available on the net in popular Linux/Ubuntu forums. True, with some searching one might be able to get what one is looking for. But if you ask me, it is always nice to have something tangible in ones hands while reading instead of having to stare at the monitor for hours on end. More over, each and every tip in this book has been tested by the authors on the latest version of Ubuntu (Dapper Drake) and is guaranteed to work. In writing this book, it is clear that the authors have put in a lot of hard work in covering all facets of configuring this popular Linux distribution which makes this book a worth while buy.


You can purchase Ubuntu Hacks - Tips and Tools for Exploring, Using and Tuning Linux from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.
+ -
story
This discussion has been archived. No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More
Loading... please wait.
  • by Afrosheen (42464) on Wednesday June 21 2006, @03:03PM (#15578234)
    I totally agree with the author in that I like having a real book in my hands when I'm working on something new, difficult, etc. I don't think the value of a book can ever be underestimated.
    • by Rob T Firefly (844560) on Wednesday June 21 2006, @03:08PM (#15578263) Homepage Journal
      Very true. Besides the intangible benefits of having the "real" book, with computer stuff it's always nice to have some hard copy reference material. There will always come a time when the problem you need to fix is keeping you from getting onto the damned Internet to find the fix for your problem.
    • by Anonymous Coward on Wednesday June 21 2006, @03:50PM (#15578514)
      I like having a real book in my hands when I'm working on something new, difficult, etc.

      Exactly. Nothing better than having a book in your hands to read when taking a shit.
    • I have to agree there. The reason isn't generally about having a hard copy (although it is nice to have when a system goes tits up) but rather that most tech books are written as page-by-page textbooks. This makes them far easier to follow and learn from than a manual. This is because manual's are generally for reference or very brief introductions to whatever you're trying to learn, they rarely help in actually grokking the subject.

      Most of the time manual's simply outline what functions foo, bar and baz
    • So? Time to get over yourself. I found it pretty useful.

      There comes a point where you judge something on it's value rather than its definition. I couldn't give a flying fuck what slashdot calls it, and I'm not an Ubuntu user, but this looked like a pretty reasonable book for someone who was new.
  • by GonzoTech (613147) on Wednesday June 21 2006, @03:06PM (#15578254)
    ... tells a user how to post information on slashdot pertaining to the book itself. An advertisement hack, which is very similar to the wonderful people who write books on, "How to write a book and make a million dollars from it," collections.
  • and even a tip on creating videos by capturing what is done on the desktop which could be really useful when shared with others while seeking help on a particular error.
    Or could be very useful for showing $[RECENTEXWINDOWSUSERRELATIVE] what they did that was a no-no. Plus provide hundreds of chuckles to Linux maestros who get to laugh at the video of the silly user who smacked his system upside the head yet again.
  • distro fragmentation (Score:4, Interesting)

    by b17bmbr (608864) on Wednesday June 21 2006, @03:21PM (#15578333)
    shouldn't most distro hacks be more applicable to any distro, or has linux become too fragmented? every distro has different ways to handle packages, and ubuntu's (synaptic) is a good front end to apt-get. I really like it far better than the rpm methods. however, most "hacks", such as installing LAMP, tuning perforamnce, file sharing, etc., should be mostly the same for all linux distros. I liked the Knoppix hacks from a while ago which was cool in that you could do things like build your own specialty live CD. Things like that are truly hacks. Configuring X or getting DVD's to play in ubuntu are hardly hacks. Ubunut is a great distro and I use it now instead of Fedora or Mandr*.
    • Generally, a "hack" on one distro will work on another if they are related. For instance, I'm pretty sure most of these would work with Debian with minor adjustments. Of course, many such adjustments will also work just fine with Fedora/etc. if you change "apt-get" to "yum" and "sudo" to "su -c".

      In my experiences, one of the main factors tends to be package managment. Does the distro use .deb or .rpm?
      • In my experiences, one of the main factors tends to be package managment. Does the distro use .deb or .rpm?

        It does'nt make any difference. .deb and RPM are just package format; a way to carry files, meta-data and (de)installation scripts. Technically, they are both pretty close in term of functionnalities. The real difference between distro packaging is two-folds : high-level package manager (apt, yum, urpm, yast, emerge, etc), and quality of packaging.

        The two main high-level package manager are apt a

    • however, most "hacks", such as installing LAMP, tuning perforamnce, file sharing, etc., should be mostly the same for all linux distros.

      Hummmm ... no. SysV init management, configuration files localisation (layout of /etc), default configuration of various subsystem, etc vary greatly between distro. Example : Apache configuration. In RedHat and friends, the default config is pretty vanilla, and reside in /etc/httpd. In Debian, it's in /etc/apache2, and the way virtual hosts configuration is managed (s

  • Shouldn't it be "100-things-to-do" dept since it has 100 "hacks"? Just an observation...
  • Odd. This is the first story on Ubuntu I've seen without the Debian icon.
  • by Anonymous Coward
    Ubuntu Hacks - Tips and Tools for Exploring, Using and Tuning Linux

    This reminds me of another nice book I purchased recently:

    A Dozen Hacks - Tips and Tools for Exploring, Using and Tuning Your Mom. [wikipedia.org]

    I found it very useful last night. Although I'm not sure these were really hacks so much as just interesting ways of doing things with your mom.
  • Use ubuntuforums.org (Score:4, Informative)

    by Bleeblah (602029) on Wednesday June 21 2006, @03:35PM (#15578435) Homepage
    These sound like basic HOWTOs to me, instead of hacks. And if you need Ubuntu HOWTOs, look no further than www.ubuntuforums.org.
    • These sound like basic HOWTOs to me, instead of hacks. And if you need Ubuntu HOWTOs, look no further than www.ubuntuforums.org.

      Yup. Like so many other interesting concepts, the word hack has been all but destroyed by advertising-savvy editors.

      It may be a great book, and I'm all in favor of people writing and reading books about linux. (Can't say I've ever bought any myself, since I've always been able to find more than enough information online, but I have no objection to them in principle.) But the tit

  • by WildBill1941 (187641) on Wednesday June 21 2006, @03:46PM (#15578490) Homepage
    Thanks for the positive review of Ubuntu Hacks. As one of its authors, I'm very pleased to see that the book is well received so far. We geared the book for the Dapper Drake release, and doing that was no easy feat as it was a moving target the whole time. We'd write a hack, and then we'd have to continually revise things as the code changed and new features got rolled in. I believe I rewrote the Java hack at least three times, thanks to the fact that Sun relaxed their licensing.

    At any rate; I'm very pleased to see that the book is well accepted. Thanks again for the good review. I'd like to add that we're going to continue to update things at the http://www.ubuntuhacks.com/ [ubuntuhacks.com] blog - there's no real content there at the moment, but as we think of new things or there are new developments in the Ubuntu world we'll keep that site up to date.

    - Bill

  • by PCM2 (4486) on Wednesday June 21 2006, @04:04PM (#15578623) Homepage
    Ubuntu like other main stream GNU/Linux distributions is encumbered by the patent restrictions related to various popular multimedia file formats.

    Actually, what you mean to say is that Ubuntu is not encumbered by the patent restrictions on certain multimedia formats, because it does not include support for those formats.

    • I'd agree most any forum other than Slashdot. If a slashdoter is fooled by a link or
      fails to do their own research they should be reading zdnet...
    • Of course it could be because Amazon has patented the rather obvious idea of one-click shopping. That's why I don't buy from Amazon but that's probably not the case here.

      G
    • by NineNine (235196) on Wednesday June 21 2006, @03:22PM (#15578338) Homepage
      Thanks, but I buy locally. I like the few independent bookstores that we have left.
      • Yep, you, me and that other guy. Seriously, the next 10 years or so will tell if they survive, and I'm even more concerned about the mom and pop indie music shops; I can't buy stuff from Best Buy or Amazon and have the same experience.
          • by Anonymous Coward
            How is Powells any more "independent" than Amazon? Both Amazon.com and Powells have multiple large warehouses in various parts of the country, both sell most of their stock online, both get their special orders from the same providers... People think Powells is "independent" because they have a northwest hipster attitude about them, but they're really not any different from Amazon.
      • Local mass retail is a dying business model whether you realize it or not. Retail is going to be an extremely niche business as the world goes forward. It just doesn't make sense to store stock all over the country when it can be centralized and shipped as needed, for less energy input. I understand your desire to stop the clock, but it can't be done.
    • Re:The Linux Flaw (Score:5, Insightful)

      by chrismcdirty (677039) on Wednesday June 21 2006, @03:22PM (#15578340) Homepage
      You act like these types of books/articles don't exist for Windows. Look at digg on any given week. You'll likely see at least one "How to do $x in Windows to speed up $y" or "How to unlock $z in Windows" article.
      • True, but these books don't usually have to have things like "How to upgrade Firefox" and "How to make your DVD software actually play DVDs". As annoying as Windows is, the stuff that requires "hacks" are normally things that the average user is not interested in anyhow. I like ubuntu, I use Dapper Drake and love it so far. However, to get Totem to actually play DVDs, for example, is beyond what a normal user is capable of doing. Try upgrading from Firefox 1.0.8 in Badger without using the CLI. Good lu
        • You're right. Instead you get "How to use firefox to access windows update from your pirated Windows install" or "How to schedule nightly defrags," or "how to optimize your internet settings." Not to mention that Sun's Java is now installable from multiverse / non-free (or will be eventually if the current Sun PR is to believed, I'm not sure where Debian + java currently stands).

          Saying that nobody is busy addressing the "stuff like this" is a lie. The FSF and plenty of other OSS organizations join up to fig
    • Re:The Linux Flaw (Score:5, Interesting)

      by Penguin Programmer (241752) <awolfego@telusplanet.net> on Wednesday June 21 2006, @03:25PM (#15578372) Homepage
      Have you tried Ubuntu? You absolutely do _not_ need any hacks to use it as a normal desktop system. In fact, I would venture to say that it's easier to install and configure than Windows XP is. Of course, most normal users never have to install and configure Windows because it comes with their computers, so maybe that is a moot point. Still, in the 60ish Ubuntu installs I've done (mostly at installfests for average Joe users with laptops), I've had very few Ubuntu installs that didn't detect and configure all the hardware on the machine correctly. Windows XP almost never detects new hardware on a machine correctly. The default Ubuntu setup is very clean and easy to use. It's _different_ from Windows (as it should be - Windows has an ass interface), but not harder to use.

      The need-to-know-hacks-to-use-Linux argument no longer holds. It was completely valid when I started using Linux (circa 1998), but today it is 100% myth.
      • Re:The Linux Flaw (Score:5, Insightful)

        by FinchWorld (845331) <finchworld&gmail,com> on Wednesday June 21 2006, @03:35PM (#15578432) Homepage
        Unless theres a piece of hardware that doesn't work out of the box.
        • That's true. But I've tried a bunch of different Linux distros, and based on what I've tried, Ubuntu offers the best out-of-the-box functionality of all of them, as someone has posted. But you're right, it gets ugly when you have to manually install and configure hardware. Graphics cards, touchpads, and dare I say....wifi cards? A wifi card that is not automagically supported (cough, Broadcom-based prior to Ubuntu Dapper) is pretty difficult for someone who has no idea about Linux.
        • Of which I have encountered very few. I mean, I installed Ubuntu on my girlfriend's brand new HP laptop and even the volume control soft keys worked out of the box. There's hardly anything common that Ubuntu won't detect and configure, and chances are that if you're using something uncommon enough that it doesn't work, you have enough expertise to make it work anyway.

          Compare to Windows XP where damn near _nothing_ works out of the box (note that I define out of the box as I plug it in and it works, not I
      • On the other hand, finding the usual nonfree stuff is nonintuitive. You have to add repositories and install packages with obscure names to get a full set of codecs and whatnot. Of course, you can use EasyUbuntu (I think that's what it was called anyway) to get all that stuff done for you - but if you want flash, acrobat (necessary for some PDFs, and in any case, the included pdf viewer is garbage) microsoft fonts, and the like, there's some slightly hackish things you have to do.
    • In other words, "there's lots of cool stuff you can do if you know how, but it's not always immediately obvious how". So... you want it spelled out for you or what? Except... wait... that's just what's already been done in this book. Except... wait... apparently the simple fact that this book is potentially useful is "what's wrong with Linux". Linux should make it blindingly obvious how to handle the "special case of configuring a seven button mouse with a tilted scroll wheel to work properly". (Does W
    • Re:The Linux Flaw (Score:5, Insightful)

      by Braino420 (896819) on Wednesday June 21 2006, @03:35PM (#15578433)
      What [amazon.com] about [amazon.com] the [amazon.com] Microsoft [amazon.com] hacks [amazon.com]? And yes, most of those books talk about "getting updated",installing drivers, web browsing and changing themes. Oh ya, there is even something included in there that isn't in the Ubuntu one: controlling spyware.
      I think I've just been trolled.
    • Such books exist for every mainstream OS. Including MacOS X.
    • I love linux ... but sadly this statement sums up it's flaw ... in order to do oridinary tasks, you must know "hacks". Non-techy users just can't understand, let alone perform such "hacks".

      Ah - so if "Ubuntu Hacks" gives a bad impression, what do you think of "Windows Annoyances" [annoyances.org] available from all good booksellers?

      Cheers,
      Toby Haynes

    • I've been using the current Ubuntu at home in a fairly complex environment, and the amount of normal computing tasks that require hacks seem minimal. There were a few thing that required some googline like installing JRE, pptp, and flash but on the whole it's workable. Photo management (simple red eye / crop / slideshow like Picassa, not photo editing with beefy complex apps like Gimp or Photoshop) is still a little rough. Even Picassa for Linux has some major issues to work out. I tried to print severa
    • in order to do oridinary[sic] tasks, you must know "hacks"

      With MS-Windows [google.com] you don't need to know any hacks. There are books [annoyances.org] about MS-Windows [amazon.com] but they aren't about hacks.

      BTW, doesn't your browser do spell checking? The one I use, in a standard Ubuntu installation without any hacks, shows your "oridinary" in red, it's easy to find typos that way.

    • I'm interested in how to buy music and play music from iTunes Music Store(ITMS) from within Linux. Is this for real or is this iTunes on Wine and a lot of pain?

      Use Firefox or Opera to buy music.

      There is some software you can use (combined with VLC) to decrypt Apple's DRM files into raw AAC streams, and stick them into .mp4 containers.

      However, why would you want to buy from iTunes when you can buy unencrypted (no DRM) high quality files from All of mp3 [allofmp3.com]? Which can come in higher quality.

      If you want iTunes on

    • DVD Jon has a program called Sharp(#) Musique that allows you to buy from the iTMS in Linux, and without DRM too. Unfortionatly, if you've used iTunes v6 it does not work for purchasing. However, there is a 3rd party patch floating arround that fixes this. #Musique is availible from http://nanocrew.net/ [nanocrew.net]
    • Re:One.. (Score:5, Interesting)

      by jimmyfergus (726978) on Wednesday June 21 2006, @04:47PM (#15578855)
      Actually, it's completely appropriate. It seems you, like the British aristocracy, don't understand how to use it. They say "one" when they mean a specific person, usually themselves, too, or at least they used to. In your post, "Such as one did", is nonsense.

      It's sad that such useful usage has become passe, usually inappropriately replaced with 'you'. The aforementioned royalty and their hangers-on probably had a lot to do with its fall from grace.

      Think about it - to express, for instance, that people should generally be polite, people now usually say "you should be polite", which strictly speaking arrogantly excludes the speaker. Much better to say "one should be polite" ...it's more polite ;).

      But then, sadly, ignorant people think you are affected.

      • Re:One.. (Score:5, Funny)

        by gardyloo (512791) on Wednesday June 21 2006, @04:00PM (#15578584)
        Seriously though, who writes like that anymore?

        People that write correctly, that's who.


              Ahem. People WHO write correctly, that's who.
            • ..or for those who like it in terms of case.

              "Who" is only inflected to "whom" in the accusative and dative cases. In the nomanative it remains "who" and in the genetive it becomes "whose". THose who've learned german or latin will know that the verb "to be" always causes the nominative case.

              N: That is who.
              A: You hit whom?
              D: To whom did you give the book?
              G: Whose book is this?
      • Re:One.. (Score:4, Funny)

        by gardyloo (512791) on Wednesday June 21 2006, @09:09PM (#15580018)
        Imagine what Chaucer or Shakespeare would think should he happen to find himself in modern company.

            They would both think "RTFM".
    • by Cal Paterson (881180) on Wednesday June 21 2006, @04:26PM (#15578737)
      Well, at least you got to plug your blog either way. Thank god for that.

      I mean, if I hadn't discovered you blog (which is automatically linked as part of your user comment header, by the way; hows that for redundancy?) with it's gnome tips, funny pictures and flash animations (that obviously won't work on any real linux-users machine) I would have been seriously intellectually impoverished.

      Either way, I think the word I'm looking for is thankyou.