Ubuntu Kung Fu
Total Page:16
File Type:pdf, Size:1020Kb
Prepared exclusively for Alison Tyler Download at Boykma.Com What readers are saying about Ubuntu Kung Fu Ubuntu Kung Fu is excellent. The tips are fun and the hope of discov- ering hidden gems makes it a worthwhile task. John Southern Former editor of Linux Magazine I enjoyed Ubuntu Kung Fu and learned some new things. I would rec- ommend this book—nice tips and a lot of fun to be had. Carthik Sharma Creator of the Ubuntu Blog (http://ubuntu.wordpress.com) Wow! There are some great tips here! I have used Ubuntu since April 2005, starting with version 5.04. I found much in this book to inspire me and to teach me, and it answered lingering questions I didn’t know I had. The book is a good resource that I will gladly recommend to both newcomers and veteran users. Matthew Helmke Administrator, Ubuntu Forums Ubuntu Kung Fu is a fantastic compendium of useful, uncommon Ubuntu knowledge. Eric Hewitt Consultant, LiveLogic, LLC Prepared exclusively for Alison Tyler Download at Boykma.Com Ubuntu Kung Fu Tips, Tricks, Hints, and Hacks Keir Thomas The Pragmatic Bookshelf Raleigh, North Carolina Dallas, Texas Prepared exclusively for Alison Tyler Download at Boykma.Com Many of the designations used by manufacturers and sellers to distinguish their prod- ucts are claimed as trademarks. Where those designations appear in this book, and The Pragmatic Programmers, LLC was aware of a trademark claim, the designations have been printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, The Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. The Ubuntu logo is a regis- tered trademark of Canonical, Ltd. Every precaution was taken in the preparation of this book. However, the publisher assumes no responsibility for errors or omissions, or for damages that may result from the use of information (including program listings) contained herein. Our Pragmatic courses, workshops, and other products can help you and your team create better software and have more fun. For more information, as well as the latest Pragmatic titles, please visit us at http://www.pragprog.com Copyright © 2008 Keir Thomas. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmit- ted, in any form, or by any means, electronic, mechanical, photocopying, recording, or otherwise, without the prior consent of the publisher. Printed in the United States of America. ISBN-10: 1-934356-22-0 ISBN-13: 978-1-934356-22-7 Printed on acid-free paper. P2.0 printing, February 2009 Version: 2009-4-20 Prepared exclusively for Alison Tyler Download at Boykma.Com Contents 1 Introduction 15 1.1 How to Read This Book ................... 16 1.2 Acknowledgments ...................... 17 1.3 Sharing ............................ 18 2 An Ubuntu Administration Crash Course 19 2.1 The Ubuntu Desktop .................... 20 2.2 Users, Passwords, and Files ................ 22 2.3 Command Line or GUI? .................. 25 2.4 Software Installation and Management ......... 36 2.5 Using gconf-editor ...................... 50 2.6 Editing Configuration Files ................ 51 2.7 Making and Keeping Backups ............... 53 2.8 Rescue Me! What to Do If It All Goes Wrong . 55 2.9 Miscellaneous Things You Ought to Know . 57 3 The Tips 62 1. Set Any Picture as Wallpaper with a Single Click . 63 2. See (and Reuse) the Most Recently Typed Commands . 64 3. Add Cool New Visualizations to Totem/RhythmBox . 65 4. Switch Monitor Resolutions with a Single Mouse Click 65 5. Closely Monitor the Power Consumption of a Laptop . 66 6. Stop the Cursor from Blinking .............. 66 7. Scroll Without the Mouse in Firefox and Evolution Mail Windows ........................ 67 8. Optimize Startup for Faster Boot Times ......... 67 9. Graph the System Bootup Performance ......... 71 10. Change Gedit’s Printing Font ............... 72 11. Shrink or Enlarge Images at the Command Line . 73 12. View All a Digital Photo’s Technical Information . 74 13. Have Ubuntu Speak to You ................ 74 14. Instantly Search for Files in Nautilus .......... 75 Prepared exclusively for Alison Tyler Download at Boykma.Com CONTENTS 6 15. Take Photos or Record Videos with Your Webcam . 75 16. Add RAR File Compression Support to Ubuntu . 76 17. Add a Swap File or Expand Existing Swap Space . 76 18. Get Rid of the Virtual Console Legal Boilerplate . 78 19. Make Wubi Installations of Ubuntu Run Faster . 78 20. Make Website or Email Links Automatically Install Software ........................... 79 21. Make Fonts Look Superb .................. 80 22. Download Updates Faster ................. 81 23. Slow Down a Touchpad’s Scrolling ............ 82 24. Ensure Your Windows Partition Is Always Available Under Ubuntu ........................ 83 25. Improve the GNOME Terminal Look and Feel . 84 26. Ensure Ubuntu Always Knows the Time ......... 85 27. Get More Data onto CD-R Discs .............. 85 28. Share Files Across the Network (Without Tearing Your Hair Out) ........................... 86 29. Save Ink When Printing .................. 88 30. Browse the Web from the Command Line . 89 31. Create an “Ubuntu Install” USB Stick .......... 90 32. Add a Menu Entry for Ubuntu’s Compression Tool . 91 33. Quickly Run Applications Without Opening a Termi- nal Window .......................... 92 34. Instantly Search Google for Any Word or Phrase . 92 35. Ensure You’re Informed About the Newest Releases of Ubuntu ............................ 94 36. Create a File Delete Command That Uses the Trash . 94 37. Configure Ubuntu’s Firewall ................ 95 38. Repair Windows from Within Ubuntu .......... 100 39. Empty the Trash Even If Told You Can’t ......... 100 40. Log On Automatically After Bootup ............ 101 41. Use an Alternative Wifi Connection Manager . 101 42. Make Evolution More Like Outlook (Just a Little Bit) . 103 43. Give Ubuntu a Static IP Address ............. 104 44. Format a USB Memory Stick (or Camera Memory Card) 106 45. Protect Ubuntu So It Can’t Be Booted Without a Pass- word .............................. 108 46. Dump the Text on a Virtual Console to a File . 111 47. Eliminate the Time Period During Which sudo/gksu Powers Hang Around .................... 112 48. Access Ubuntu Files from Windows ........... 113 Report erratum Prepared exclusively for Alison Tyler this copy is (P2.0 printing, February 2009) Download at Boykma.Com CONTENTS 7 49. Kill a Crashed GUI ..................... 114 50. Make Ubuntu Safe for Children to Use .......... 115 51. Run Two (or More) Desktops at the Same Time . 118 52. Go Completely Full-Screen in Virtually Any Application 119 53. Make Calculator Round Up (or Down) to Two Digits . 120 54. Follow the Moon’s Phases ................. 120 55. Import Internet Explorer Settings into Firefox . 121 56. Drag and Drop Files onto the Terminal Window . 121 57. Use Older Digital Cameras with Ubuntu ......... 121 58. Use the Ultra-quick xterm to Bash Out Commands . 123 59. Install All the Program Compilation Tools You’ll Need . 123 60. Avoid Network Slowdowns and Incompatibilities . 124 61. Print at the Command Line ................ 125 62. Find the Ubuntu Version and Code Name ........ 125 63. Get Your Webcam Working in Ubuntu .......... 126 64. Downgrade to Firefox 2 ................... 126 65. Install All the Multimedia Playback Codecs You’ll Ever Need .............................. 127 66. Get Better DVD Movie Playback .............. 128 67. Run the Terminal with a Single Keypress ........ 129 68. See the APT Cow ....................... 129 69. See What Firefox Plug-ins Are Installed ......... 130 70. Kill the Network Connection Instantly .......... 130 71. Post Blog Entries from your Ubuntu Desktop . 130 72. Intelligently Select Only the Files You Want . 131 73. Temporarily Disable a User Account ........... 132 74. Take Complete Control of Desktop Effects and Anima- tions .............................. 133 75. Do Some Desktop Publishing ............... 135 76. Control Volume Levels at the Command Prompt . 135 77. Search the Ubuntu File System .............. 136 78. Remove the “Bad Password” Wait Period ......... 139 79. Make Desktop Icons Really Big .............. 140 80. Run Ubuntu...Without the Linux Components! . 140 81. Instantly Hide a File or Folder ............... 141 82. Scan for Viruses ....................... 141 83. Temporarily Log In as the Root User at the Command Line .............................. 144 84. Start the Screensaver from the Command Line . 145 85. Get the Most Out of (or into) a Nautilus Window . 145 86. View Images at the Command Line ............ 145 Report erratum Prepared exclusively for Alison Tyler this copy is (P2.0 printing, February 2009) Download at Boykma.Com CONTENTS 8 87. Administer the Printer from a Web Browser . 146 88. Move a Window Without Clicking the Title Bar . 146 89. Connect to Shared Folders from the Command Line . 147 90. Deactivate Caps Lock .................... 148 91. Format Floppies ....................... 149 92. Switch to a Lightweight File Manager .......... 149 93. Use Syntax Highlighting in Gedit ............. 151 94. Stop ZIP Files That Are Emailed to Colleagues from Getting Lost ......................... 152 95. Use an Alternative Email Client .............. 152 96. Ensure People Hear You When Using a Microphone . 154 97. Quickly Browse to a Location ............... 154 98. Turn Off the Beep ...................... 155 99. Add a Second Hard Disk .................. 155 100. Update Ubuntu in the