<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://commons.oreilly.com/wiki/skins/common/feed.css?97"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;action=history&amp;feed=atom</id>
		<title>Ubuntu Hacks/Mobile Ubuntu - Revision history</title>
		<link rel="self" type="application/atom+xml" href="http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;action=history&amp;feed=atom"/>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;action=history"/>
		<updated>2013-05-24T21:41:17Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.11.0</generator>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;diff=7772&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;diff=7772&amp;oldid=prev"/>
				<updated>2008-03-07T13:49:43Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:49, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 8:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Close the lid and save some power.'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Close the lid and save some power.'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Part of proper power management is the ability to put your laptop to sleep. ACPI sleep is defined as a state where the system is still technically powered on, but the screen and hard disk are powered down and the computer is using just enough power to keep the contents of RAM alive. The Ubuntu development team has devoted an immense amount of effort toward getting ACPI power management working properly. As it stands, Ubuntu is power-management-friendly right out of the box, thanks to the recent addition of the gnome-power-manager package. It turns out there's not much required to get most modern laptops to sleep and wake up correctly.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Part of proper power management is the ability to put your laptop to sleep. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;ACPI sleep&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;is defined as a state where the system is still technically powered on, but the screen and hard disk are powered down and the computer is using just enough power to keep the contents of RAM alive. The Ubuntu development team has devoted an immense amount of effort toward getting ACPI power management working properly. As it stands, Ubuntu is power-management-friendly right out of the box, thanks to the recent addition of the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;package. It turns out there's not much required to get most modern laptops to sleep and wake up correctly.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Getting Some Sleep ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Getting Some Sleep ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The Dapper Drake release of Ubuntu Linux includes the new gnome-power-manager package, which enables ACPI sleep much like the system-tray power applet in Windows. Finally, sleep &amp;quot;just works&amp;quot; in Linux. The gnome-power-manager applet is configured to start automatically, and it lives in GNOME's panel notification area. If you right-click on the little battery icon, you'll see a menu pop up, as shown in [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-1|Figure 4-1]].&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The Dapper Drake release of Ubuntu Linux includes the new &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;package, which enables ACPI sleep much like the system-tray power applet in Windows. Finally, sleep &amp;quot;just works&amp;quot; in Linux. The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;applet is configured to start automatically, and it lives in GNOME's panel notification area. If you right-click on the little battery icon, you'll see a menu pop up, as shown in [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-1|Figure 4-1]].&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;IDFigure4-1&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;div id=&amp;quot;IDFigure4-1&amp;quot;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 72:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Configuring Hibernation ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Configuring Hibernation ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since hibernation and sleep are similar and use the underlying Linux ACPI subsystem, they both use gnome-power-manager to configure and control their settings. You can adjust the default type of sleep to be hibernation from within the preferences of gnome-power-manager, but keeping the default set to Suspend makes sense due to the time involved in entering and exiting a hibernated state. If you do decide to adjust this setting, you can right-click on the gnome-power-manager icon, select Preferences, and click on the Options tab (see [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-3|Figure 4-3]] in [[Ubuntu Hacks/Mobile Ubuntu#Put Your Laptop to Sleep|&amp;quot;Put Your Laptop to Sleep&amp;quot; [Hack #38]&amp;quot;&amp;gt;Figure 4-3]] in [[Ubuntu Hacks/Mobile Ubuntu#Put Your Laptop to Sleep|&amp;quot;Put Your Laptop to Sleep&amp;quot; [Hack #38]]]).&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since hibernation and sleep are similar and use the underlying Linux ACPI subsystem, they both use &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;to configure and control their settings. You can adjust the default type of sleep to be hibernation from within the preferences of &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, but keeping the default set to Suspend makes sense due to the time involved in entering and exiting a hibernated state. If you do decide to adjust this setting, you can right-click on the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;icon, select Preferences, and click on the Options tab (see [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-3|Figure 4-3]] in [[Ubuntu Hacks/Mobile Ubuntu#Put Your Laptop to Sleep|&amp;quot;Put Your Laptop to Sleep&amp;quot; [Hack #38]&amp;quot;&amp;gt;Figure 4-3]] in [[Ubuntu Hacks/Mobile Ubuntu#Put Your Laptop to Sleep|&amp;quot;Put Your Laptop to Sleep&amp;quot; [Hack #38]]]).&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Using Hibernation ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Using Hibernation ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Now that you have your preferences set how you like them, it's time to test hibernation. Assuming you're using the stock Ubuntu preferences for gnome-power-manager, you'll need to engage hibernation by right-clicking on the gnome-power-manager applet and selecting Hibernate. Once you do, the system will immediately dim the screen, and you should hear a good deal of hard-disk activity. Once the disk stops churning, the system will power off. At this point, the system is in hibernate mode and can be left in this state indefinitely without using any battery power. To exit the hibernated state, simply power on the system normally. The bootloader will come up, and the kernel will boot normally, until it detects a RAM image on the swap partition. At that point, the system will load up the RAM image and should return to where you left it. Typical times to enter hibernation run between 30 seconds and 1 minute, and times to exit hibernation (including the BIOS test) run about the same.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Now that you have your preferences set how you like them, it's time to test hibernation. Assuming you're using the stock Ubuntu preferences for &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, you'll need to engage hibernation by right-clicking on the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;gnome-power-manager&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;applet and selecting Hibernate. Once you do, the system will immediately dim the screen, and you should hear a good deal of hard-disk activity. Once the disk stops churning, the system will power off. At this point, the system is in hibernate mode and can be left in this state indefinitely without using any battery power. To exit the hibernated state, simply power on the system normally. The bootloader will come up, and the kernel will boot normally, until it detects a RAM image on the swap partition. At that point, the system will load up the RAM image and should return to where you left it. Typical times to enter hibernation run between 30 seconds and 1 minute, and times to exit hibernation (including the BIOS test) run about the same.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Between sleep and hibernation, you have all the great power management capabilities at your disposal.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Between sleep and hibernation, you have all the great power management capabilities at your disposal.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 95:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Tip'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Tip'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This hack does not work for Transmeta-equipped CPUs with LongRun technology. However, Ubuntu does have ''longrun'' and other tools available via apt-get for these processors.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This hack does not work for Transmeta-equipped CPUs with LongRun technology. However, Ubuntu does have ''longrun'' and other tools available via &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;apt-get&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;for these processors.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;To be able to switch CPU speeds, you must set the cpufreq-selector program to be ''suid root'':&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;To be able to switch CPU speeds, you must set the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;cpufreq-selector&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;program to be ''suid root'':&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; bill@defiant:~$ '''sudo chmod +s /usr/bin/cpufreq-selector'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; bill@defiant:~$ '''sudo chmod +s /usr/bin/cpufreq-selector'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 106:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 106:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Warning'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Warning'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This may be a slight security issue. If there is a vulnerability in cpufreq-selector, anyone who exploits it has the potential to get ''root'' access on the machine. See [[Ubuntu Hacks/Security#Manage Security Updates|&amp;quot;Manage Security Updates&amp;quot; [Hack #68]]] for information on keeping up-to-date with the latest security fixes.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;This may be a slight security issue. If there is a vulnerability in &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;cpufreq-selector&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;, anyone who exploits it has the potential to get ''root'' access on the machine. See [[Ubuntu Hacks/Security#Manage Security Updates|&amp;quot;Manage Security Updates&amp;quot; [Hack #68]]] for information on keeping up-to-date with the latest security fixes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 117:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Your choice of Governor puts some constraints on your CPU speed choices. If you want to be able to specify the CPU speed yourself, choose the userspace governor, and then select the desired speed from the Frequencies menu. The ondemand and conservative governors adjust the speed based on demand, but conservative won't raise the CPU speed as quickly as ondemand. The performance and powersave governors will keep the CPU speed at either the maximum or minimum.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Your choice of Governor puts some constraints on your CPU speed choices. If you want to be able to specify the CPU speed yourself, choose the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;userspace&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;governor, and then select the desired speed from the Frequencies menu. The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;ondemand&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;conservative&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;governors adjust the speed based on demand, but &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;conservative&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;won't raise the CPU speed as quickly as &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;ondemand&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;. The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;performance&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;powersave&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;governors will keep the CPU speed at either the maximum or minimum.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Get Proprietary Wireless Cards Working ==&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;== Get Proprietary Wireless Cards Working ==&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 135:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 135:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Installing ndiswrapper and ndisgtk ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Installing ndiswrapper and ndisgtk ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Start by installing the ndisgtk package, which is a GUI installation program for ndiswrapper. You can open a terminal window and install it from the command line or use your favorite package-management tool. Please ensure you have the universe repository enabled [[Ubuntu Hacks/Package Management#Modify the List of Package Repositories|[Hack #60]]]. (Aptitude will automatically get ''ndiswrapper-utils'', since it's a dependency for ''ndisgtk''.) Also, make sure you have the Windows drivers for your particular wireless adapter ready, since ''ndisgtk'' will prompt you for them later on. If you find that the Windows drivers are trapped in a ''.cab'' file, try installing cabextract and unshield and using those to get at the precious drivers trapped within (both of these are available in the ''universe'' repository):&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Start by installing the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;ndisgtk&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;package, which is a GUI installation program for ndiswrapper. You can open a terminal window and install it from the command line or use your favorite package-management tool. Please ensure you have the universe repository enabled [[Ubuntu Hacks/Package Management#Modify the List of Package Repositories|[Hack #60]]]. (Aptitude will automatically get ''ndiswrapper-utils'', since it's a dependency for ''ndisgtk''.) Also, make sure you have the Windows drivers for your particular wireless adapter ready, since ''ndisgtk'' will prompt you for them later on. If you find that the Windows drivers are trapped in a ''.cab'' file, try installing &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;cabextract&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;unshield&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and using those to get at the precious drivers trapped within (both of these are available in the ''universe'' repository):&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; conner@firetruck:$ '''sudo aptitude install ndisgtk'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; conner@firetruck:$ '''sudo aptitude install ndisgtk'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 202:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 202:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Tip'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Tip'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There is one flaw with ndiswrapper. Due to the way it operates, signal strength meters (such as those provided by NetworkManager [[Ubuntu Hacks/Mobile Ubuntu#Roam Wirelessly|[Hack #42]]] and the command-line iwconfig tool) do not work properly. Those tools will always report 100-percent signal strength.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;There is one flaw with ndiswrapper. Due to the way it operates, signal strength meters (such as those provided by NetworkManager [[Ubuntu Hacks/Mobile Ubuntu#Roam Wirelessly|[Hack #42]]] and the command-line &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;iwconfig&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;tool) do not work properly. Those tools will always report 100-percent signal strength.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;lt;/div&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 283:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 283:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Use the laptop-net program to configure settings that change as you connect to different networks. Make your work settings follow you to work, and your home settings follow you home.'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;'''Use the laptop-net program to configure settings that change as you connect to different networks. Make your work settings follow you to work, and your home settings follow you home.'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you use a laptop, particularly as your primary system, you start to notice some of the ways most systems are biased toward a desktop computer. Primarily, the assumption is that all of your settings will stay the same no matter where you are. Yet, if you take your laptop to and from work you know this simply isn't the case. Not only do network settings often change, but printers, file shares, and all sorts of other aspects of the system are different depending on where you are. As a laptop user, it would certainly be nice if there were a way to have classes of settings that applied based on where you were. Lucky for you, the laptop-net package takes care of these basic needs and more.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;When you use a laptop, particularly as your primary system, you start to notice some of the ways most systems are biased toward a desktop computer. Primarily, the assumption is that all of your settings will stay the same no matter where you are. Yet, if you take your laptop to and from work you know this simply isn't the case. Not only do network settings often change, but printers, file shares, and all sorts of other aspects of the system are different depending on where you are. As a laptop user, it would certainly be nice if there were a way to have classes of settings that applied based on where you were. Lucky for you, the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;laptop-net&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;package takes care of these basic needs and more.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ''laptop-net'' program does a number of things, but the primary thing it allows you to do is to run particular scripts and apply particular settings based on which IP an interface currently has. Even though your home, work, and friend's house may all use private IP address ranges, they all probably use slightly different schemes, and, more importantly, you probably get assigned a particular IP or range of IPs depending on which network you are on. With ''laptop-net'', you can say &amp;quot;Whenever I have this IP, run these programs and enable these settings.&amp;quot; Because of the way ''laptop-net'' is designed, what you can do is limited only by your scripting ability. In this hack, we will describe how to integrate ''laptop-net'' into an Ubuntu system and walk you through some common configuration schemes.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ''laptop-net'' program does a number of things, but the primary thing it allows you to do is to run particular scripts and apply particular settings based on which IP an interface currently has. Even though your home, work, and friend's house may all use private IP address ranges, they all probably use slightly different schemes, and, more importantly, you probably get assigned a particular IP or range of IPs depending on which network you are on. With ''laptop-net'', you can say &amp;quot;Whenever I have this IP, run these programs and enable these settings.&amp;quot; Because of the way ''laptop-net'' is designed, what you can do is limited only by your scripting ability. In this hack, we will describe how to integrate ''laptop-net'' into an Ubuntu system and walk you through some common configuration schemes.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 289:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 289:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Install laptop-net ===&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;=== Install laptop-net ===&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The first step is to install ''laptop-net''. Using your preferred package manager install the laptop-net and laptop-net-doc packages. Once everything is installed, you will want to reconfigure ''laptop-net'':&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The first step is to install ''laptop-net''. Using your preferred package manager install the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;laptop-net&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;laptop-net-doc&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;packages. Once everything is installed, you will want to reconfigure ''laptop-net'':&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; $ '''sudo dpkg-reconfigure laptop-net'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; $ '''sudo dpkg-reconfigure laptop-net'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 298:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 298:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;As the ''laptop-net'' configuration program runs, be sure to tell it that you are going to use DHCP for your network and that your Ethernet adapter does not support MII, even if it does.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;As the ''laptop-net'' configuration program runs, be sure to tell it that you are going to use DHCP for your network and that your Ethernet adapter does not support MII, even if it does.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since ''laptop-net'' won't automatically engage when every interface is brought up, you must add a special script to ''/etc/dhcp3/dhclient-exit-hooks.d''. Scripts in this directory are executed when changes occur in dhclient (specifically, when the ''/etc/dhcp3/dhclient-script'' runs and executes the &amp;lt;tt&amp;gt;exit_with_hooks&amp;lt;/tt&amp;gt; function). Name the following file ''/etc/dhcp3/dhclient-exit-hooks.d/laptop-net'':&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Since ''laptop-net'' won't automatically engage when every interface is brought up, you must add a special script to ''/etc/dhcp3/dhclient-exit-hooks.d''. Scripts in this directory are executed when changes occur in &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;dhclient&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;(specifically, when the ''/etc/dhcp3/dhclient-script'' runs and executes the &amp;lt;tt&amp;gt;exit_with_hooks&amp;lt;/tt&amp;gt; function). Name the following file ''/etc/dhcp3/dhclient-exit-hooks.d/laptop-net'':&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; if [ $reason = 'BOUND' ]; then&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; if [ $reason = 'BOUND' ]; then&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 712:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 712:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;If you've purchased a laptop within the last couple of years, your machine most likely has an optical drive that's in a removable caddy or drive bay. Typically, these type of drives are enabled under Windows to be removed and replugged with the system power on, but the drivers that allow this haven't been available in Linux until recently.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;If you've purchased a laptop within the last couple of years, your machine most likely has an optical drive that's in a removable caddy or drive bay. Typically, these type of drives are enabled under Windows to be removed and replugged with the system power on, but the drivers that allow this haven't been available in Linux until recently.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The hotswap package included in the universe repository [[Ubuntu Hacks/Package Management#Modify the List of Package Repositories|[Hack #60]]] provides the ability for you to hotswap an optical drive out and insert a battery or other module, and then reinsert the optical drive back into the bay, all without putting the laptop to sleep or shutting it down. To install ''hotswap'', first you must have the ''universe'' repository enabled in your ''/etc/apt/sources.list''; then you can install hotswap by using the following command:&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;hotswap&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;package included in the universe repository [[Ubuntu Hacks/Package Management#Modify the List of Package Repositories|[Hack #60]]] provides the ability for you to hotswap an optical drive out and insert a battery or other module, and then reinsert the optical drive back into the bay, all without putting the laptop to sleep or shutting it down. To install ''hotswap'', first you must have the ''universe'' repository enabled in your ''/etc/apt/sources.list''; then you can install &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;hotswap&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'' &lt;/ins&gt;by using the following command:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; gooley@falcon:~$ '''sudo apt-get install hotswap'''&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt; gooley@falcon:~$ '''sudo apt-get install hotswap'''&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;diff=7598&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;diff=7598&amp;oldid=prev"/>
				<updated>2008-03-07T13:45:25Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:45, 7 March 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	<entry>
		<id>http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;diff=4671&amp;oldid=prev</id>
		<title>Docbook2Wiki: Initial conversion from Docbook</title>
		<link rel="alternate" type="text/html" href="http://commons.oreilly.com/wiki/index.php?title=Ubuntu_Hacks/Mobile_Ubuntu&amp;diff=4671&amp;oldid=prev"/>
				<updated>2008-03-07T00:39:29Z</updated>
		
		<summary type="html">&lt;p&gt;Initial conversion from Docbook&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Ubuntu Hacks/TOC}}&lt;br /&gt;
Ubuntu is a mobile-friendly Linux distribution. It will detect and configure almost any wireless hardware you can throw at it. In some cases, you will run into some hardware that, because its maker won't provide open source developers the information they need, can't run on Ubuntu. However, you can usually fiddle with the proprietary Windows drivers to get it working. And once you do get your wireless adapter up and running, you'll need to configure it to work with the various Wi-Fi networks you use. The hacks in this chapter cover all these topics and more.&lt;br /&gt;
&lt;br /&gt;
For anyone who spends a lot of time away from a power source, power management is a major concern. This chapter also shows you how to put your computer into sleep and deep sleep, and provides some tricks on prolonging your battery life while you are away from a power source. You'll also learn how to work with notebook-specific peripherals, such as PC Cards and hotswappable optical drives.&lt;br /&gt;
&lt;br /&gt;
== Put Your Laptop to Sleep ==&lt;br /&gt;
&lt;br /&gt;
'''Close the lid and save some power.'''&lt;br /&gt;
&lt;br /&gt;
Part of proper power management is the ability to put your laptop to sleep. ACPI sleep is defined as a state where the system is still technically powered on, but the screen and hard disk are powered down and the computer is using just enough power to keep the contents of RAM alive. The Ubuntu development team has devoted an immense amount of effort toward getting ACPI power management working properly. As it stands, Ubuntu is power-management-friendly right out of the box, thanks to the recent addition of the gnome-power-manager package. It turns out there's not much required to get most modern laptops to sleep and wake up correctly.&lt;br /&gt;
&lt;br /&gt;
=== Getting Some Sleep ===&lt;br /&gt;
&lt;br /&gt;
The Dapper Drake release of Ubuntu Linux includes the new gnome-power-manager package, which enables ACPI sleep much like the system-tray power applet in Windows. Finally, sleep &amp;quot;just works&amp;quot; in Linux. The gnome-power-manager applet is configured to start automatically, and it lives in GNOME's panel notification area. If you right-click on the little battery icon, you'll see a menu pop up, as shown in [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-1|Figure 4-1]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-1&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-1. gnome-power-manager in action'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9247.png|gnome-power-manager in action]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This deceptively simple little application gives you a lot of control over your laptop's sleep behavior. If you click on Preferences, you'll see the Power Management Preferences dialog box shown in [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-2|Figure 4-2]]. In this dialog's Sleep tab, you can configure different behavior depending on whether you're plugged into AC power or running on battery. One of the most interesting features is your ability to control the backlight brightness of your laptop's screen depending on the machine's power state. It happens to work out that a large consumer of power in a laptop is the screen's backlight, so being able to automatically turn down that lamp while on battery will help squeeze more runtime out of the system while it's unplugged.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-2&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-2. The Sleep tab of gnome-power-manager'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9256.png|The Sleep tab of gnome-power-manager]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Options tab (see [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-3|Figure 4-3]]) is where you can set the default type of sleep you wish for the system to use, as well as what actions will engage the sleep mechanism. For this hack, the default sleep type is set to Suspend, which refers to ACPI sleep. (Hibernate [[Ubuntu Hacks/Mobile Ubuntu#Hibernate Your Laptop|[Hack #39]&amp;quot;&amp;gt;Figure 4-3]]) is where you can set the default type of sleep you wish for the system to use, as well as what actions will engage the sleep mechanism. For this hack, the default sleep type is set to Suspend, which refers to ACPI sleep. (Hibernate [[Ubuntu Hacks/Mobile Ubuntu#Hibernate Your Laptop|[Hack #39]]] is a totally different type of sleep mechanism.) If you wish, under the Actions section of the dialog box, you can set the system to automatically sleep when the laptop lid is closed. This is a very handy feature if you're on the go: simply shut the lid and run off to your next appointment; then open the lid later, and the machine will wake up without any intervention.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-3&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-3. gnome-power-manager's Options tab'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9271.png|gnome-power-manager's Options tab]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The Advanced tab of the dialog ([[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-4|Figure 4-4]]) controls the notification icon's behavior. If you want the icon to appear only when you're charging or discharging, or you want to turn off the icon altogether, here's where you change those settings.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-4&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-4. gnome-power-manager's Advanced dialog'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9280.png|gnome-power-manager's Advanced dialog]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
If you're not seeing the notification icon, perhaps it's because you're plugged into AC power. If you'd like to see the applet all the time, unplug your laptop for a moment and the icon should appear. You can then use the Advanced tab to change the notification icon settings.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When you have all your settings configured to your liking, simply click the Close button, and the dialog box will close, saving your configuration changes.&lt;br /&gt;
&lt;br /&gt;
=== Testing ACPI Sleep ===&lt;br /&gt;
&lt;br /&gt;
Your system is now ready for you to test sleep mode. Ensure that your system is running on battery; then simply shut the lid of the laptop and see what happens. You should hear the hard disk power down, and one of the power LEDs should indicate a power-state change by blinking or some other method. Hopefully, your machine went to sleep properly. Now you need to see if it wakes up correctly. Simply open the lid, and the computer should start waking up. When it's ready for use, you'll be prompted for your system password by ''gnome-screensaver''. Enter your password, and your system should be in the exact same state as it was when you powered it off.&lt;br /&gt;
&lt;br /&gt;
Thanks to the hard work of the Ubuntu developers, something that used to be extremely difficult to accomplish in Linux has been made very easy.&lt;br /&gt;
&lt;br /&gt;
== Hibernate Your Laptop ==&lt;br /&gt;
&lt;br /&gt;
'''Sleeping is a good way to pause, but it still uses power. Hibernate mode lets you save the contents of memory to disk so you can resume later on.'''&lt;br /&gt;
&lt;br /&gt;
In [[Ubuntu Hacks/Mobile Ubuntu#Put Your Laptop to Sleep|&amp;quot;Put Your Laptop to Sleep&amp;quot; [Hack #38]]], you learned how Ubuntu supports ACPI sleep. However, because ACPI sleep does require a trickle of power to keep the CPU and RAM alive, it may not be desirable in all situations. Hibernate has been designed as the complement to ACPI sleep. It takes the contents of RAM and saves them to the system's swap partition. As a result, it requires absolutely zero power to maintain that hibernated state. There is a downside to hibernating a machine, however. Due to the fact that the system saves the contents of RAM before powering off, and then loads the contents of RAM after the kernel loads on reboot, it does take a fair amount of time to enter and exit the hibernated state. However, hibernating is still faster than powering off and restarting your machine, and there's the added benefit of saving application state.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
Since hibernation saves the exact contents of RAM to your swap partition, the size of your swap partition ''must be'' ''larger'' than the amount of RAM you have in the machine. Ubuntu configures this automatically if you have done a default installation, but if you override the default partitioner during installation, you need to keep this point in mind.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring Hibernation ===&lt;br /&gt;
&lt;br /&gt;
Since hibernation and sleep are similar and use the underlying Linux ACPI subsystem, they both use gnome-power-manager to configure and control their settings. You can adjust the default type of sleep to be hibernation from within the preferences of gnome-power-manager, but keeping the default set to Suspend makes sense due to the time involved in entering and exiting a hibernated state. If you do decide to adjust this setting, you can right-click on the gnome-power-manager icon, select Preferences, and click on the Options tab (see [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-3|Figure 4-3]] in [[Ubuntu Hacks/Mobile Ubuntu#Put Your Laptop to Sleep|&amp;quot;Put Your Laptop to Sleep&amp;quot; [Hack #38]&amp;quot;&amp;gt;Figure 4-3]] in [[Ubuntu Hacks/Mobile Ubuntu#Put Your Laptop to Sleep|&amp;quot;Put Your Laptop to Sleep&amp;quot; [Hack #38]]]).&lt;br /&gt;
&lt;br /&gt;
=== Using Hibernation ===&lt;br /&gt;
&lt;br /&gt;
Now that you have your preferences set how you like them, it's time to test hibernation. Assuming you're using the stock Ubuntu preferences for gnome-power-manager, you'll need to engage hibernation by right-clicking on the gnome-power-manager applet and selecting Hibernate. Once you do, the system will immediately dim the screen, and you should hear a good deal of hard-disk activity. Once the disk stops churning, the system will power off. At this point, the system is in hibernate mode and can be left in this state indefinitely without using any battery power. To exit the hibernated state, simply power on the system normally. The bootloader will come up, and the kernel will boot normally, until it detects a RAM image on the swap partition. At that point, the system will load up the RAM image and should return to where you left it. Typical times to enter hibernation run between 30 seconds and 1 minute, and times to exit hibernation (including the BIOS test) run about the same.&lt;br /&gt;
&lt;br /&gt;
Between sleep and hibernation, you have all the great power management capabilities at your disposal.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
'''Warning'''&lt;br /&gt;
&lt;br /&gt;
If your system is configured to boot multiple operating systems, you need to be careful here. In theory, you should be able to hibernate your Ubuntu system and then boot into a different operating system. But this is fundamentally risky: if you change anything on the Ubuntu partition, you'll be in heaps of trouble. And if you're sharing a swap partition between Ubuntu and another Linux distribution, you'll be in a world of trouble if that other Linux distribution boots up, since it will erase your hibernated state (or may itself try to resume from that hibernated state). Play it safe: if you are hibernated, don't boot into anything except the system you hibernated from.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Prolong Your Battery Life ==&lt;br /&gt;
&lt;br /&gt;
'''Throttle your CPU, dim your display, and slow your hard drive to conserve precious battery power.'''&lt;br /&gt;
&lt;br /&gt;
GNOME has a built-in CPU-frequency-monitor applet that will show you the current speed of your processor. This is great for laptops that have CPUs that can support dynamic frequency scaling. Additionally, the same applet will also let you alter the processor-speed governors and/or lock in the speed at a fixed frequency. This will let you override the built-in processor-speed governors for maximum performance or maximum battery life, depending on your needs at the time. This isn't overclocking or anything that's possibly damaging to your CPU; rather, this will let you use the built-in SpeedStep or other CPU-throttling techniques to their maximum.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
This hack does not work for Transmeta-equipped CPUs with LongRun technology. However, Ubuntu does have ''longrun'' and other tools available via apt-get for these processors.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To be able to switch CPU speeds, you must set the cpufreq-selector program to be ''suid root'':&lt;br /&gt;
&lt;br /&gt;
 bill@defiant:~$ '''sudo chmod +s /usr/bin/cpufreq-selector'''&lt;br /&gt;
          &lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
'''Warning'''&lt;br /&gt;
&lt;br /&gt;
This may be a slight security issue. If there is a vulnerability in cpufreq-selector, anyone who exploits it has the potential to get ''root'' access on the machine. See [[Ubuntu Hacks/Security#Manage Security Updates|&amp;quot;Manage Security Updates&amp;quot; [Hack #68]]] for information on keeping up-to-date with the latest security fixes.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once you've done this, enable the CPU Frequency Monitor if you don't have it running already. Right-click on your top GNOME panel and select &amp;quot;Add to Panel.&amp;quot; Then select the CPU Frequency Monitor applet from the list and click on Add. The applet will appear in your panel. At this point, you can left-click on the applet and adjust the current CPU speed governor. If you right-click on the applet and select Preferences, you can change the menu that's displayed from Governors to &amp;quot;Frequencies and Governors.&amp;quot; After setting this, you'll be able to tailor your CPU speed for any situation you may encounter (see [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-5|Figure 4-5]]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-5&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-5. The CPU Frequency Monitor in action'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9521.png|The CPU Frequency Monitor in action]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Your choice of Governor puts some constraints on your CPU speed choices. If you want to be able to specify the CPU speed yourself, choose the userspace governor, and then select the desired speed from the Frequencies menu. The ondemand and conservative governors adjust the speed based on demand, but conservative won't raise the CPU speed as quickly as ondemand. The performance and powersave governors will keep the CPU speed at either the maximum or minimum.&lt;br /&gt;
&lt;br /&gt;
== Get Proprietary Wireless Cards Working ==&lt;br /&gt;
&lt;br /&gt;
'''If your computer has a Wi-Fi card that's not Linux-friendly, don't fret. Ndiswrapper and ndisgtk will let you use that card under Ubuntu by encapsulating the native Windows driver.'''&lt;br /&gt;
&lt;br /&gt;
In [[Ubuntu Hacks/Mobile Ubuntu#Roam Wirelessly|&amp;quot;Roam Wirelessly&amp;quot; [Hack #42]]], you'll see that Ubuntu ships with built-in drivers for a good deal of the wireless network cards on the market today, such as the Intel &amp;quot;ipw&amp;quot; line of miniPCI adapters and the Prism 2/3-based PCMCIA network adapters. If you happen to use a computer that's equipped with such hardware, Ubuntu's wireless networking will likely &amp;quot;just work&amp;quot; right out of the box. However, systems equipped with Broadcom-based Wi-Fi adapters and the like traditionally don't work with Ubuntu or other Linux distributions. The primary cause for this is usually that the manufacturer doesn't release specifications for their hardware, which keeps open source developers from writing drivers for it.&lt;br /&gt;
&lt;br /&gt;
Recently, however, there's been a development that enables almost any Wi-Fi adapter to work in Linux. It's known as ndiswrapper, and it works by &amp;quot;wrapping&amp;quot; the manufacturer's own drivers with a Linux driver layer that the OS can utilize. It's not ideal, but for obscure and difficult wireless hardware, ndiswrapper is often the way to go.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
If you're using Linux on a platform other than x86 (such as on a Mac), then ndiswrapper won't work for you because it uses drivers that are compiled for x86 CPUs. However, there is an open source driver available for some Broadcom chipsets, including the one used in Apple's AirPort Extreme (802.11g). You'll still need native drivers for your chipset, though, but only to extract the firmware needed to operate the card correctly. See ''http://bcm43xx.berlios.de/'' for more information.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Installing ndiswrapper and ndisgtk ===&lt;br /&gt;
&lt;br /&gt;
Start by installing the ndisgtk package, which is a GUI installation program for ndiswrapper. You can open a terminal window and install it from the command line or use your favorite package-management tool. Please ensure you have the universe repository enabled [[Ubuntu Hacks/Package Management#Modify the List of Package Repositories|[Hack #60]]]. (Aptitude will automatically get ''ndiswrapper-utils'', since it's a dependency for ''ndisgtk''.) Also, make sure you have the Windows drivers for your particular wireless adapter ready, since ''ndisgtk'' will prompt you for them later on. If you find that the Windows drivers are trapped in a ''.cab'' file, try installing cabextract and unshield and using those to get at the precious drivers trapped within (both of these are available in the ''universe'' repository):&lt;br /&gt;
&lt;br /&gt;
 conner@firetruck:$ '''sudo aptitude install ndisgtk'''&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
=== Wrapping the Windows Drivers ===&lt;br /&gt;
&lt;br /&gt;
Once that is done, insert or enable your wireless adapter and run ''ndisgtk'' from a terminal:&lt;br /&gt;
&lt;br /&gt;
 conner@firetruck:$ '''sudo ndisgtk'''&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
''ndisgtk'' will present you with a window (see [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-6|Figure 4-6]]), allowing you to install a new driver.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-6&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-6. Ndisgtk's main window'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9667.png|Ndisgtk's main window]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Click on &amp;quot;Install new driver,&amp;quot; and ''ndisgtk'' will ask you for the location of your Windows drivers, as shown in [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-7|Figure 4-7]]. Choose your Windows drivers in the Location field and click Install.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-7&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-7. Where are your drivers?'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9679.png|Where are your drivers?]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once ''ndisgtk'' is finished copying your drivers and setting up the files, you will see the first window again, but ''ndisgtk'' will have populated it with your driver, as shown in [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-8|Figure 4-8]].&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-8&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-8. Windows-only hardware? I think not...'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9694.png|Windows-only hardware? I think not...]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Configuring the Adapter ===&lt;br /&gt;
&lt;br /&gt;
At this point, the wireless adapter is just another piece of Linux-enabled hardware. You can use the standard Ubuntu tools, such as the network wizard in the System menu or NetworkManager [[Ubuntu Hacks/Mobile Ubuntu#Roam Wirelessly|[Hack #42]]], to manage the connection. As a sanity check, you can run ''dmesg'' and see if ndiswrapper picked up your adapter:&lt;br /&gt;
&lt;br /&gt;
 conner@firetruck:$ '''dmesg'''&lt;br /&gt;
 [4295357.170000] pccard: CardBus card inserted into slot 0&lt;br /&gt;
 [4295357.181000] ndiswrapper: driver tnet1130 (Texas Instruments,06/17/2004,6.0.5.30) loaded&lt;br /&gt;
 [4295357.182000] PCI: Enabling device 0000:02:00.0 (0000 -&amp;gt; 0002)&lt;br /&gt;
 [4295357.182000] ACPI: PCI Interrupt 0000:02:00.0[A] -&amp;gt; Link [LNKD] -&amp;gt; GSI 11 (level, low) -&amp;gt; IRQ 11&lt;br /&gt;
 [4295357.183000] PCI: Setting latency timer of device 0000:02:00.0 to 64&lt;br /&gt;
 [4295357.876000] ndiswrapper (IoCreateUnprotectedSymbolicLink:744): --UNIMPLEMENTED--&lt;br /&gt;
 [4295357.876000] ndiswrapper: using irq 11&lt;br /&gt;
 [4295358.916000] wlan0: vendor: 'TNET1130'&lt;br /&gt;
 [4295358.916000] wlan0: ndiswrapper ethernet device 00:12:0e:0d:3c:38 using driver tnet1130, 104C:9066:13D1:AB80.5.conf&lt;br /&gt;
 [4295358.916000] wlan0: encryption modes supported: WEP; TKIP with WPA&lt;br /&gt;
&lt;br /&gt;
Also, the standard ''iwconfig'' command-line tool can be used to configure your adapter, if you're comfortable with that:&lt;br /&gt;
&lt;br /&gt;
 conner@firetruck:~$ '''iwconfig wlan0'''&lt;br /&gt;
 wlan0     IEEE 802.11g  ESSID:&amp;quot;NullDevice.Net&amp;quot; &lt;br /&gt;
           Mode:Managed  Frequency:2.462 GHz Access Point: 00:0C:41:6E:98:8E&lt;br /&gt;
           Bit Rate:54 Mb/s   Tx-Power:10 dBm  Sensitivity=0/3&lt;br /&gt;
           RTS thr:4096 B   Fragment thr:4096 B&lt;br /&gt;
           Power Management:off&lt;br /&gt;
           Link Quality:100/100  Signal level:-42 dBm  Noise level:-256 dBm&lt;br /&gt;
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
           Tx excessive retries:0  Invalid misc:0   Missed beacon:0&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
There is one flaw with ndiswrapper. Due to the way it operates, signal strength meters (such as those provided by NetworkManager [[Ubuntu Hacks/Mobile Ubuntu#Roam Wirelessly|[Hack #42]]] and the command-line iwconfig tool) do not work properly. Those tools will always report 100-percent signal strength.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Don't let the fear of incompatible wireless network cards keep you from using Ubuntu on your computer. Now you can free yourself and your operating system by using ndiswrapper on Ubuntu!&lt;br /&gt;
&lt;br /&gt;
== Roam Wirelessly ==&lt;br /&gt;
&lt;br /&gt;
'''Moving from one wireless network to another has traditionally been a pain under Linux. Here's how you can simplify this aspect of mobile computing using your wireless adapter and NetworkManager.'''&lt;br /&gt;
&lt;br /&gt;
One of the coolest things about having a laptop that's Wi-Fi-enabled is being able to go from place to place and freely associate with any hotspots that may be around. If you do this often, it really changes the way you work, as places like your local coffee shop have the potential to become your office. If you use a Windows or Mac OS-equipped laptop, bouncing from place to place isn't much of a challenge: you simply open up your computer, it tells you what access points are around, you click on one to associate with that network, and you're off and running. Under Linux, however, that's been problematic, as there haven't been any tools that make Wi-Fi easy...until now.&lt;br /&gt;
&lt;br /&gt;
=== Using Your Wireless Network Card ===&lt;br /&gt;
&lt;br /&gt;
Ubuntu supports a good number of wireless cards and adapters out of the box; simply plug in your adapter and it should be recognized automatically (if not, see [[Ubuntu Hacks/Mobile Ubuntu#Get Proprietary Wireless Cards Working|&amp;quot;Get Proprietary Wireless Cards Working&amp;quot; [Hack #41]]]). To verify your adapter is recognized, open a terminal window and issue the following command:&lt;br /&gt;
&lt;br /&gt;
 bill@defiant:~$ '''iwconfig'''&lt;br /&gt;
 lo        no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth0 no wireless extensions.&lt;br /&gt;
 &lt;br /&gt;
 eth1      IEEE 802.11g  ESSID:&amp;quot;Its A Grind&amp;quot; &lt;br /&gt;
           Mode:Managed  Frequency:2.412 GHz  Access Point: 00:06:B1:14:C7:49&lt;br /&gt;
           Bit Rate=24 Mb/s   Tx-Power=20 dBm&lt;br /&gt;
           Retry limit:7   RTS thr:off   Fragment thr:off&lt;br /&gt;
           Power Management:off&lt;br /&gt;
           Link Quality=53/100  Signal level=-69 dBm  Noise level=-87 dBm&lt;br /&gt;
           Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0&lt;br /&gt;
           Tx excessive retries:41  Invalid misc:0   Missed beacon:16&lt;br /&gt;
&lt;br /&gt;
If you see output similar to what's above mentioning an IEEE interface, then your card is recognized by Ubuntu and you can either use the built-in networking tools (System→Administration→Networking) to manage it, or proceed on with this hack to install NetworkManager. If you don't see a wireless card listed there, then you'll need to follow the instructions in [[Ubuntu Hacks/Mobile Ubuntu#Get Proprietary Wireless Cards Working|&amp;quot;Get Proprietary Wireless Cards Working&amp;quot; [Hack #41]]] to get your card working using ndiswrapper.&lt;br /&gt;
&lt;br /&gt;
=== NetworkManager and You ===&lt;br /&gt;
&lt;br /&gt;
The folks over at Red Hat have come up with a tool that makes Wi-Fi management as easy as a couple of mouse clicks. The tool's called NetworkManager (see [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-9|Figure 4-9]]), and it's a GNOME applet that sits in your notification area. NetworkManager will not only manage Wi-Fi connections, it'll automatically hook up your laptop with a wired connection when you plug in an Ethernet cable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-9&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-9. NetworkManager in action'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9807.png|NetworkManager in action]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
'''Warning'''&lt;br /&gt;
&lt;br /&gt;
NetworkManager cannot manage any cards that have entries in ''/etc/network/interfaces''. If you've added your network card to that file, make sure you remove it before you start working with NetworkManager.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
From the NetworkManager web site:&lt;br /&gt;
&lt;br /&gt;
A laptop user should never need to use the command line or configuration files to manage their network; it should &amp;quot;Just Work&amp;quot; as automatically as possible and intrude as little as possible into the user's workflow. NetworkManager attempts to make networking invisible. When moving into areas you've been before, NetworkManager automatically connects to the last network the user chose to connect to. Likewise, when back at the desk, NetworkManager will switch to the faster, more reliable wired network connection.&lt;br /&gt;
&lt;br /&gt;
So, now that we've whetted your appetite, let's get NetworkManager installed. First, you've got to meet a couple prerequisites:&lt;br /&gt;
&lt;br /&gt;
* You must have a wireless Ethernet adapter, either built-in or PCMCIA.&lt;br /&gt;
* NetworkManager works only with DHCP-assigned addresses. If you ''must'' have a static IP address, work with your DHCP administrator to get a unique DHCP reservation, or you'll need to use another tool (such as System→Administration→Networking).&lt;br /&gt;
&lt;br /&gt;
Let's get NetworkManager installed and working. It's surprisingly easy.&lt;br /&gt;
&lt;br /&gt;
First, ''apt-get'' the packages. From a terminal, run:&lt;br /&gt;
&lt;br /&gt;
   bill@defiant:~$ '''sudo apt-get install network-manager-gnome'''&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
This will install both the NetworkManager daemon (as a dependency) and the ''nm-applet'' that sits in the GNOME notification area. You'll notice that the NetworkManger service gets started when the installation completes. All that remains is to verify that ''nm-applet'' has been added to your session and to reboot the system, since changes to HAL (the hardware abstraction layer) were made when the packages installed.&lt;br /&gt;
&lt;br /&gt;
To verify that NetworkManager's ''nm-applet'' program has been added to your autostartup sessions, click on the System Menu in your menu bar, select Preferences, and then click on Sessions. Click on Startup Programs, as shown in [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-10|Figure 4-10]]. You should see an ''nm-applet'' listing there. If there isn't one, you can add it by clicking on Add and then by filling out the dialog.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-10&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-10. The sessions dialog showing Startup Programs'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e9873.png|The sessions dialog showing Startup Programs]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now all that remains for you to do is to reboot. Once you've rebooted and logged in to your machine, you'll see the NetworkManager icon in your notification area. If you're plugged into Ethernet, you should see a little &amp;quot;plug&amp;quot; icon. To use Wi-Fi, click on the NetworkManager icon and select the access point with which you want to associate. If the Wi-Fi access point requires an encryption code, you'll be prompted to enter it. Also, if this is your first time using the GNOME keyring services, you'll be prompted to select a keyring password. The GNOME keyring caches all the WEP keys for you, so all you need to remember is your GNOME keyring password.&lt;br /&gt;
&lt;br /&gt;
That's all you need to get wireless roaming working, thanks to NetworkManager!&lt;br /&gt;
&lt;br /&gt;
== Make Laptop Settings Roam with Your Network ==&lt;br /&gt;
&lt;br /&gt;
'''Use the laptop-net program to configure settings that change as you connect to different networks. Make your work settings follow you to work, and your home settings follow you home.'''&lt;br /&gt;
&lt;br /&gt;
When you use a laptop, particularly as your primary system, you start to notice some of the ways most systems are biased toward a desktop computer. Primarily, the assumption is that all of your settings will stay the same no matter where you are. Yet, if you take your laptop to and from work you know this simply isn't the case. Not only do network settings often change, but printers, file shares, and all sorts of other aspects of the system are different depending on where you are. As a laptop user, it would certainly be nice if there were a way to have classes of settings that applied based on where you were. Lucky for you, the laptop-net package takes care of these basic needs and more.&lt;br /&gt;
&lt;br /&gt;
The ''laptop-net'' program does a number of things, but the primary thing it allows you to do is to run particular scripts and apply particular settings based on which IP an interface currently has. Even though your home, work, and friend's house may all use private IP address ranges, they all probably use slightly different schemes, and, more importantly, you probably get assigned a particular IP or range of IPs depending on which network you are on. With ''laptop-net'', you can say &amp;quot;Whenever I have this IP, run these programs and enable these settings.&amp;quot; Because of the way ''laptop-net'' is designed, what you can do is limited only by your scripting ability. In this hack, we will describe how to integrate ''laptop-net'' into an Ubuntu system and walk you through some common configuration schemes.&lt;br /&gt;
&lt;br /&gt;
=== Install laptop-net ===&lt;br /&gt;
&lt;br /&gt;
The first step is to install ''laptop-net''. Using your preferred package manager install the laptop-net and laptop-net-doc packages. Once everything is installed, you will want to reconfigure ''laptop-net'':&lt;br /&gt;
&lt;br /&gt;
 $ '''sudo dpkg-reconfigure laptop-net'''&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
Now, by default, ''laptop-net'' can do a number of nice things such as detect cable insertion and automatically bring up and take down interfaces. We've noticed, however, that these automatic functions can sometimes interfere with the way Ubuntu wants to configure the network—especially if you are using a package like NetworkManager—so you need to disable some of this functionality in ''laptop-net''.&lt;br /&gt;
&lt;br /&gt;
As the ''laptop-net'' configuration program runs, be sure to tell it that you are going to use DHCP for your network and that your Ethernet adapter does not support MII, even if it does.&lt;br /&gt;
&lt;br /&gt;
Since ''laptop-net'' won't automatically engage when every interface is brought up, you must add a special script to ''/etc/dhcp3/dhclient-exit-hooks.d''. Scripts in this directory are executed when changes occur in dhclient (specifically, when the ''/etc/dhcp3/dhclient-script'' runs and executes the &amp;lt;tt&amp;gt;exit_with_hooks&amp;lt;/tt&amp;gt; function). Name the following file ''/etc/dhcp3/dhclient-exit-hooks.d/laptop-net'':&lt;br /&gt;
&lt;br /&gt;
 if [ $reason = 'BOUND' ]; then&lt;br /&gt;
    /usr/share/laptop-net/profile-change $interface&lt;br /&gt;
 fi&lt;br /&gt;
 if [ $reason = 'RELEASE' ]; then&lt;br /&gt;
    /usr/share/laptop-net/profile-change $interface down&lt;br /&gt;
 fi&lt;br /&gt;
&lt;br /&gt;
This script will tell ''laptop-net'' to change the profile based on the current interface when a new interface gets a lease, and when the DHCP lease is released, it will take that interface down.&lt;br /&gt;
&lt;br /&gt;
We noticed a bug in our version of the package where the ''/var/run/laptop-net'' directory was not created, so profiles weren't being changed. To fix this, we added an extra line to ''/etc/init.d/laptop-net''. Locate the following section in the file:&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${1}&amp;quot; in&lt;br /&gt;
     (&amp;quot;start&amp;quot;)&lt;br /&gt;
         [ $# -eq 1 ] || usage&lt;br /&gt;
         clean_state&lt;br /&gt;
         start_ifd&lt;br /&gt;
     ;;&lt;br /&gt;
&lt;br /&gt;
and change it to:&lt;br /&gt;
&lt;br /&gt;
 case &amp;quot;${1}&amp;quot; in&lt;br /&gt;
     (&amp;quot;start&amp;quot;)&lt;br /&gt;
         [ $# -eq 1 ] || usage&lt;br /&gt;
         '''mkdir -p /var/run/laptop-net'''&lt;br /&gt;
         clean_state&lt;br /&gt;
         start_ifd&lt;br /&gt;
     ;;&lt;br /&gt;
&lt;br /&gt;
Now restart ''laptop-net'':&lt;br /&gt;
&lt;br /&gt;
 $ '''sudo /etc/init.d/laptop-net restart'''&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
=== Configure laptop-net Profiles ===&lt;br /&gt;
&lt;br /&gt;
''laptop-net'' does most of its configuration work through different profiles that you need to configure. These profiles reside within the ''/etc/laptop-net/profiles'' directory and contain the configuration information for specific modes and networks that you might want to connect to. The ''/etc/laptop-net/profiles'' directory will end up containing one directory for each new profile you want to configure. A ''laptop-net'' profile itself can contain a number of different configuration files and scripts (check ''/usr/share/laptop-net-doc/'' for more details), but here is a list of the main files:&lt;br /&gt;
&lt;br /&gt;
;patterns&lt;br /&gt;
: This file contains a list of IP or state patterns to match. If ''laptop-net'' matches a pattern in this file, it will then select this particular profile.&lt;br /&gt;
;files.d/&lt;br /&gt;
: This directory contains a subset of your root filesystem. When this profile is selected, ''laptop-net'' will copy any files it finds here to the corresponding system directory, overwriting existing files with the same name. For instance, if you add a file in ''files.d/etc/fstab'', when this profile is selected, that file will be copied over the top of the system ''/etc/fstab''.&lt;br /&gt;
;after-select&lt;br /&gt;
: This is an optional shell script that ''laptop-net'' will execute after a profile has been selected. If there are any fancy tweaks or service restarts that you want to make, you can put them in this file.&lt;br /&gt;
;before-deselect&lt;br /&gt;
: This script is also optional and is like the ''after-select'' script, only it is executed before a particular profile is deselected. You might use this script to undo particular changes you have made to a system before the network interface is taken down.&lt;br /&gt;
&lt;br /&gt;
No matter what networks you want to configure for yourself, there are a couple of default profiles you should set up first: one for when the network is offline and one for when you are on some unknown network.&lt;br /&gt;
&lt;br /&gt;
==== Configure the offline profile ====&lt;br /&gt;
&lt;br /&gt;
To configure the offline profile, create a new directory called ''offline'' in ''/etc/laptop-net/profiles'' and change to that directory:&lt;br /&gt;
&lt;br /&gt;
 greenfly@ubuntu:~$ '''sudo mkdir /etc/laptop-net/profiles/offline'''&lt;br /&gt;
 greenfly@ubuntu:~$ '''cd /etc/laptop-net/profiles/offline'''&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/offline$&lt;br /&gt;
&lt;br /&gt;
Now create a file in this directory called ''patterns'' and have it contain the following lines:&lt;br /&gt;
&lt;br /&gt;
 down&lt;br /&gt;
 unknown&lt;br /&gt;
&lt;br /&gt;
Next, create a ''files.d'' directory here. Whenever you change system files with other profiles, it's a good idea to store the original default version of the file in the offline profile; that way, everything will go back to normal when the network is offline, and you won't risk overwriting a file for good:&lt;br /&gt;
&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/offline$ '''sudo mkdir files.d'''&lt;br /&gt;
                &lt;br /&gt;
&lt;br /&gt;
The next step is to create a file called ''after-select'' and make it executable:&lt;br /&gt;
&lt;br /&gt;
 /etc/laptop-net/profiles/offline$ '''sudo touch after-select'''&lt;br /&gt;
 /etc/laptop-net/profiles/offline$ '''sudo chmod a+x after-select'''&lt;br /&gt;
                &lt;br /&gt;
&lt;br /&gt;
This file will run any programs or restart any scripts that you tell it to, but for now you can have it do something basic to give you diagnostic information when it is selected. Add the following lines to the file:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;offline&amp;quot; &amp;gt; /tmp/laptop-net-state&lt;br /&gt;
&lt;br /&gt;
==== Configure the default network profile ====&lt;br /&gt;
&lt;br /&gt;
The next step is to create a &amp;quot;catch-all&amp;quot; default network profile. This profile will execute any network-based operations you want to perform whenever you have a network connection but don't quite know which network you are connected to. First, create the profile directory and name it ''zzz-default''. The reason you start with the ''zzz'' is that ''laptop-net'' goes through the profiles sequentially. Since this profile will match all IP addresses, you want to give your other profiles a chance to be selected first:&lt;br /&gt;
&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/$ '''sudo mkdir zzz-default'''&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/$ '''cd zzz-default'''&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/zzz-default$&lt;br /&gt;
&lt;br /&gt;
Now create the same ''files.d'' directory and ''patterns'' file. If there are any configuration settings you want to always have whenever you are connected to a strange network, you can copy them to the ''files.d'' directory:&lt;br /&gt;
&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/zzz-default$ '''sudo mkdir files.d'''&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/zzz-default$ '''sudo touch patterns'''&lt;br /&gt;
                &lt;br /&gt;
&lt;br /&gt;
Place the following line in the patterns file:&lt;br /&gt;
&lt;br /&gt;
 *.*.*.*&lt;br /&gt;
&lt;br /&gt;
This line will match any possible IP address.&lt;br /&gt;
&lt;br /&gt;
The final step is to create the ''after-select'' script that is run when this profile is selected and to put the following lines in it for diagnostics:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 &lt;br /&gt;
 echo &amp;quot;zzz-default&amp;quot; &amp;gt; /tmp/laptop-net-state&lt;br /&gt;
&lt;br /&gt;
Don't forget to run:&lt;br /&gt;
&lt;br /&gt;
 $ '''sudo chmod a+x after-select'''&lt;br /&gt;
                &lt;br /&gt;
&lt;br /&gt;
to ensure the script is executable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
One thing we like to do when our ''zzz-default'' profiles are selected is to throw up a very restrictive firewall. Since we're connected to a presumably unknown network, this ensures that all the shields are up. You could also perform a number of other security-tightening measures in this script.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Test your configuration ====&lt;br /&gt;
&lt;br /&gt;
With this new configuration in place, restart ''laptop-net'':&lt;br /&gt;
&lt;br /&gt;
 $ '''sudo /etc/init.d/laptop-net restart'''&lt;br /&gt;
                &lt;br /&gt;
&lt;br /&gt;
Now click System→Administration→Networking and deactivate your Ethernet connection (or wireless if that is what you are using). Now check ''/tmp/laptop-net-state'':&lt;br /&gt;
&lt;br /&gt;
 $ '''cat /tmp/laptop-net-state'''&lt;br /&gt;
 offline&lt;br /&gt;
&lt;br /&gt;
Now activate your network connection and check again once it comes up:&lt;br /&gt;
&lt;br /&gt;
 $ '''cat /tmp/laptop-net-state'''&lt;br /&gt;
 zzz-default&lt;br /&gt;
&lt;br /&gt;
You can also verify what ''laptop-net'' is doing by examining the ''syslog'' file. ''laptop-net'' will log there when it changes network settings, so you can ''grep'' the file for ''laptop-net'', which will show you only its log information:&lt;br /&gt;
&lt;br /&gt;
 $ '''grep laptop-net /var/log/syslog'''&lt;br /&gt;
 ...&lt;br /&gt;
 Mar  4 16:12:56 ubuntu laptop-net: Selecting network profile &amp;quot;zzz-default&amp;quot; &lt;br /&gt;
 Mar  4 15:19:42 ubuntu laptop-net: Deselecting network profile &amp;quot;zzz-default&amp;quot; &lt;br /&gt;
 Mar  4 15:19:42 ubuntu laptop-net: Selecting network profile &amp;quot;offline&amp;quot; &lt;br /&gt;
 Mar  4 15:24:06 ubuntu laptop-net: Deselecting network profile &amp;quot;offline&amp;quot; &lt;br /&gt;
 Mar  4 15:24:07 ubuntu laptop-net: Selecting network profile &amp;quot;zzz-default&amp;quot;&lt;br /&gt;
&lt;br /&gt;
=== Create Personal laptop-net Profiles ===&lt;br /&gt;
&lt;br /&gt;
Once you have confirmed ''laptop-net'' is functioning, it's time to create specific profiles for networks you commonly connect to. Let's assume you have two networks, one for home and one for work. To make things simple, you can just copy over the ''zzz-default'' profile and use it as a base template for new configurations:&lt;br /&gt;
&lt;br /&gt;
 greenfly@ubuntu:~$ '''cd /etc/laptop-net/profiles/'''&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/$ '''sudo cp -a zzz-default home'''&lt;br /&gt;
 greenfly@ubuntu:/etc/laptop-net/profiles/$ '''sudo cp -a zzz-default work'''&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
==== Configure the patterns file ====&lt;br /&gt;
&lt;br /&gt;
The first thing you will need to change is the ''patterns'' file for each of these new profiles. Let's assume your home network assigns you an IP address somewhere in the 192.168.0.1 network, no matter whether it is on your Ethernet or wireless card, and your work network always assigns you 10.1.1.50 on your Ethernet card and 10.1.1.100 on your wireless card. You would then edit the ''patterns'' file in your home profile and make it contain only the following line:&lt;br /&gt;
&lt;br /&gt;
 192.168.0.*&lt;br /&gt;
&lt;br /&gt;
This pattern will match any IP from 192.168.0.1 to 192.168.0.255. Next, you edit the ''patterns'' file in your work profile and make it contain two lines:&lt;br /&gt;
&lt;br /&gt;
 10.1.1.50&lt;br /&gt;
 10.1.1.100&lt;br /&gt;
&lt;br /&gt;
When you can, try to be as explicit as possible when defining patterns. That &amp;lt;tt&amp;gt;192.168.0.*&amp;lt;/tt&amp;gt; pattern will match a great number of home networks, so you might end up setting your home profile when you connect at a friend's house. Ideally, you will try to set up your networks so that you get assigned one or two static IP addresses.&lt;br /&gt;
&lt;br /&gt;
==== Configure the after-select script ====&lt;br /&gt;
&lt;br /&gt;
Once the pattern file is set up, edit the ''after-select'' script in both the home and work profiles. Change the diagnostic line in that script from:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;zzz-default&amp;quot; &amp;gt; /tmp/laptop-net-state&lt;br /&gt;
&lt;br /&gt;
to:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;home&amp;quot; &amp;gt; /tmp/laptop-net-state&lt;br /&gt;
&lt;br /&gt;
and:&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;work&amp;quot; &amp;gt; /tmp/laptop-net-state&lt;br /&gt;
&lt;br /&gt;
in your home and work scripts, respectively. Now add any particular programs you want to run or other things you would like to do in these ''after-select'' files.&lt;br /&gt;
&lt;br /&gt;
For instance, if you want your default printer to be set to your home printer when you are at home and your work printer when you are at work, configure your printer settings the way you want them for home, and then copy the ''/etc/cups/printers.conf'' file to ''/etc/laptop-net/profiles/home/files.d/etc/cups/printers.conf'' (you will need to create the ''etc'' and ''etc/cups'' directories within the ''files.d'' directory). Next, configure the printer settings to suit your work environment and copy the ''/etc/cups/printers.conf'' to ''/etc/laptop-net/profiles/work/files.d/etc/cups/printers.conf''. Finally, in the ''after-select'' scripts for both home and work profiles, add the line:&lt;br /&gt;
&lt;br /&gt;
 /etc/init.d/cupsys restart&lt;br /&gt;
&lt;br /&gt;
to refresh the settings when that profile is selected.&lt;br /&gt;
&lt;br /&gt;
Repeat this process for any other settings you want to change. Copy the relevant settings to the corresponding directory under ''files.d'', and if a change requires the service to be restarted, add the corresponding command to the end of your ''after-select'' script.&lt;br /&gt;
&lt;br /&gt;
For more information about configuration options in ''laptop-net'', check out the documentation that was installed under ''/usr/share/doc/laptop-net-doc/''.&lt;br /&gt;
&lt;br /&gt;
== Make Bluetooth Connections ==&lt;br /&gt;
&lt;br /&gt;
'''Create a personal-area Bluetooth network to exchange files, send messages, and share network connections.'''&lt;br /&gt;
&lt;br /&gt;
Bluetooth allows you to create short-range (usually 10-meter), low-bandwidth (1-2 megabits per second), ad hoc connections between devices. It's ideal for sending photos from your camera phone to your computer, or for using the wireless modem found in certain models of cell phones.&lt;br /&gt;
&lt;br /&gt;
To get started with Bluetooth, first make sure it's working. Some computers have built-in Bluetooth adapters. If you are using an external USB Bluetooth dongle, after you insert it you may need to run this command to reset the Bluetooth Host Controller Daemon:&lt;br /&gt;
&lt;br /&gt;
 $ '''sudo killall -HUP hcid'''&lt;br /&gt;
          &lt;br /&gt;
&lt;br /&gt;
Now, to make sure Bluetooth is really up and running, you need to make sure you have at least one device in the vicinity that is set as &amp;quot;discoverable&amp;quot; (this is a Bluetooth mode that allows devices to find one another). Check your device documentation for details on how to set discoverable mode.&lt;br /&gt;
&lt;br /&gt;
Some devices allow you turn on discoverable mode only for a limited time (for example, two minutes). So, make sure you execute the next command quickly. The ''hcitool'' utility lets you manage Bluetooth connections. Run the command &amp;lt;tt&amp;gt;hcitool&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;scan&amp;lt;/tt&amp;gt; to enumerate the discoverable devices in your vicinity. Here, ''hcitool'' has found three devices (my Nokia 3650 cell phone, my Mac, and my Palm Treo):&lt;br /&gt;
&lt;br /&gt;
 bjepson@scoobuntu:~$ '''hcitool scan'''&lt;br /&gt;
 Scanning ...&lt;br /&gt;
         00:60:57:50:AB:9C       BrianJ3650&lt;br /&gt;
         00:14:51:89:4D:C7       Jepstone&lt;br /&gt;
         00:07:E0:6A:FE:54       bjepson&lt;br /&gt;
&lt;br /&gt;
=== Pairing ===&lt;br /&gt;
&lt;br /&gt;
Now that you know Bluetooth is working, you can ''pair'' your Ubuntu system with one of the devices. Pairing creates a bond between the devices so that they can exchange data and connect to one another.&lt;br /&gt;
&lt;br /&gt;
First, initiate pairing from the device you want to use. Each device is different. On the Treo, for example, you need to tap the Bluetooth icon and click Setup Devices→Trusted Devices→Add Device. [[Ubuntu Hacks/Mobile Ubuntu#IDFigure4-11|Figure 4-11]] shows my Palm Treo discovering several computers, including ''scoobuntu-0'', my Ubuntu system. Select your Ubuntu system and tap OK. When prompted for your passkey, pick something at random. A dialog should pop up on your Ubuntu system asking for the passkey. Type the same thing into that dialog and click OK.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div id=&amp;quot;IDFigure4-11&amp;quot;&amp;gt;&lt;br /&gt;
'''Figure 4-11. Palm Treo discovering nearby Bluetooth devices'''&lt;br /&gt;
&lt;br /&gt;
[[Image:Ubuntu Hacks_d1e10485.png|Palm Treo discovering nearby Bluetooth devices]]&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Manual Pairing ===&lt;br /&gt;
&lt;br /&gt;
If that dialog doesn't appear, you will need to take matters into your own hands. Cancel the pairing procedure on your device (or wait for it to time out), and go back to your Ubuntu system. Edit ''/etc/bluetooth/pin'' (you need to use ''sudo'' to edit this, as in &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;vi&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;/etc/bluetooth/pin&amp;lt;/tt&amp;gt;) and change the PIN code there to the PIN you want to use as the one-time password for pairing devices (some devices allow only numeric PINs).&lt;br /&gt;
&lt;br /&gt;
Next, create a script called ''/usr/local/bin/bluepincat'' and make it executable:&lt;br /&gt;
&lt;br /&gt;
 #!/bin/sh&lt;br /&gt;
 # file: /usr/local/bin/bluepincat&lt;br /&gt;
 &lt;br /&gt;
 echo -n &amp;quot;PIN:&amp;quot; &lt;br /&gt;
 cat /etc/bluetooth/pin&lt;br /&gt;
&lt;br /&gt;
Comment out the existing &amp;lt;tt&amp;gt;pin_helper&amp;lt;/tt&amp;gt; line in ''/etc/bluetooth/hcid.conf'' (again, you need to use ''sudo'' to edit this file) and add the following:&lt;br /&gt;
&lt;br /&gt;
 pin_helper /usr/local/bin/bluepincat;&lt;br /&gt;
&lt;br /&gt;
Next, reset the ''hcid'' daemon with &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;killall&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;-HUP&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;hcid&amp;lt;/tt&amp;gt; and try to initiate pairing from your device again, this time using the PIN code that you put into ''/etc/bluetooth/pin'' as the passkey. Once you're done pairing devices, you should restore the original configuration and reset the ''hcid'' daemon again (this avoids the possibility of someone guessing your PIN and pairing with your computer without your knowledge or consent).&lt;br /&gt;
&lt;br /&gt;
=== Bluetooth File Transfer ===&lt;br /&gt;
&lt;br /&gt;
Suppose you have something on your cell phone, such as a photo you took, that you want to send to your computer. If you install the ''obexserver'' package, you can receive files sent over Bluetooth:&lt;br /&gt;
&lt;br /&gt;
 $ '''sudo apt-get install obexserver'''&lt;br /&gt;
             &lt;br /&gt;
&lt;br /&gt;
To receive files, you need to register the OBEX (Object Exchange) push service. This needs to be done each time you restart your computer (or the Bluetooth subsystem):&lt;br /&gt;
&lt;br /&gt;
 $ '''sdptool add --channel=10 OPUSH'''&lt;br /&gt;
 OBEX Object Push service registered&lt;br /&gt;
&lt;br /&gt;
Now, when you want to receive a file, start the obexserver and send the file from the other device. The obexserver will terminate after the transfer:&lt;br /&gt;
&lt;br /&gt;
 $ '''obexserver'''&lt;br /&gt;
 Waiting for connection...&lt;br /&gt;
 &lt;br /&gt;
 ...............................................................&lt;br /&gt;
 ...............................................................&lt;br /&gt;
 ...............................................................&lt;br /&gt;
 ...............................................................&lt;br /&gt;
 ...................................................HEADER_LENGTH = 307254&lt;br /&gt;
 put_done() Skipped header 05&lt;br /&gt;
 put_done() Skipped header 42&lt;br /&gt;
 put_done() Skipped header c0&lt;br /&gt;
 Filename = screenshot0000.bmp&lt;br /&gt;
 Wrote /tmp/screenshot0000.bmp (307254 bytes)&lt;br /&gt;
 &lt;br /&gt;
 $&lt;br /&gt;
&lt;br /&gt;
=== Connect to the Internet ===&lt;br /&gt;
&lt;br /&gt;
Many Bluetooth phones, including certain Treo models as well as many Nokia and Sony Ericsson phones, can act as a gateway between your computer and the Internet. In this configuration, the phone is commonly thought of as a &amp;quot;wireless modem,&amp;quot; but in fact, the connection between your computer and the Internet is digital all the way. Still, because this configuration uses the same protocol (PPP) as most dial-up connections, it's easy and sometimes helpful to just think of it as a modem.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;warning&amp;quot;&amp;gt;&lt;br /&gt;
'''Warning'''&lt;br /&gt;
&lt;br /&gt;
Before you try this, you need to contact your wireless provider to find out whether this service is supported and how much it will cost you. Some providers, such as T-Mobile in the U.S., have inexpensive flat-rate pricing of between $20 and $50 a month, depending on your level of service. But most providers will charge you ''by the kilobyte'' if you don't have a data plan on your account. If you're not totally clear on how much it will cost, be careful, since cellular bills of hundreds or even thousands of dollars are not unheard of, especially when you throw international roaming into the mix!&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To make the connection, you first need to set up a link between your Ubuntu system and the paired device. Edit (using ''sudo'') ''/etc/bluetooth/rfcomm.conf'' and add an entry for your device. You'll need to specify your phone's device ID (which you can get with &amp;lt;tt&amp;gt;hciutil&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;scan&amp;lt;/tt&amp;gt;, as shown earlier):&lt;br /&gt;
&lt;br /&gt;
 rfcomm0 {&lt;br /&gt;
   bind yes;&lt;br /&gt;
     # Bluetooth address of the device&lt;br /&gt;
     device ''00:07:E0:6A:FE:54'';&lt;br /&gt;
     # RFCOMM channel for the connection&lt;br /&gt;
     channel     1;&lt;br /&gt;
     # Description of the connection&lt;br /&gt;
     comment &amp;quot;My Treo&amp;quot;;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Next, edit ''/etc/bluetooth/hcid.conf'' (using ''sudo''), scroll to the bottom, and uncomment the &amp;lt;tt&amp;gt;auth&amp;lt;/tt&amp;gt; and &amp;lt;tt&amp;gt;encrypt&amp;lt;/tt&amp;gt; lines so they look like this:&lt;br /&gt;
&lt;br /&gt;
     # Authentication and Encryption (Security Mode 3)&lt;br /&gt;
     auth enable;&lt;br /&gt;
     encrypt enable;&lt;br /&gt;
&lt;br /&gt;
Then, run the command &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;killall&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;-HUP&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;hcid&amp;lt;/tt&amp;gt; to reset the ''hcid'' daemon.&lt;br /&gt;
&lt;br /&gt;
Next, use the command &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;rfcomm&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;bind&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;rfcomm0&amp;lt;/tt&amp;gt; to make the connection. Now you've got a modem you can use on ''/dev/rfcomm0''. Next, you need to create some PPP scripts. The first one is a ''chat script''. As ''root'', create ''/etc/chatscripts/BluetoothPhone''. You will need to replace &amp;lt;tt&amp;gt;''APN''&amp;lt;/tt&amp;gt; with the Access Point Name that your cellular provider uses (contact your cellular provider to get this information, or check Opera's list of APNs at ''http://www.opera.com/products/mobile/docs/connect/''):&lt;br /&gt;
&lt;br /&gt;
 TIMEOUT 10&lt;br /&gt;
 ABORT   'BUSY'&lt;br /&gt;
 ABORT   'NO ANSWER'&lt;br /&gt;
 ABORT   'ERROR'&lt;br /&gt;
 SAY     'Starting GPRS connect script\\n'&lt;br /&gt;
 &lt;br /&gt;
 # Get the modem's attention and reset it.&lt;br /&gt;
 &amp;quot;&amp;quot;      'ATZ'&lt;br /&gt;
 &lt;br /&gt;
 # E0=No echo, V1=English result codes&lt;br /&gt;
 OK      'ATE0V1'&lt;br /&gt;
 &lt;br /&gt;
 # Set Access Point Name (APN)&lt;br /&gt;
 SAY     'Setting APN\\n'&lt;br /&gt;
 OK  'AT+CGDCONT=1,&amp;quot;IP&amp;quot;,&amp;quot;''APN''&amp;lt;nowiki&amp;gt;&amp;quot;'&lt;br /&gt;
&lt;br /&gt;
# Dial the number&lt;br /&gt;
ABORT   'NO CARRIER'&lt;br /&gt;
SAY     'Dialing...\\n'&lt;br /&gt;
OK      'ATD*99***1#'&lt;br /&gt;
CONNECT ''&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The next is ''/etc/chatscripts/BluetoothPhone-Disconnect'':&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;&amp;quot;      &amp;quot;\\K&amp;quot; &lt;br /&gt;
 &amp;quot;&amp;quot;      &amp;quot;+++ATH0&amp;quot; &lt;br /&gt;
 SAY     &amp;quot;GPRS disconnected.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
Finally, you need a PPP peers script (''/etc/ppp/peers/BluetoothPhone''):&lt;br /&gt;
&lt;br /&gt;
 /dev/rfcomm0  # Bluetooth modem&lt;br /&gt;
 115200        # speed&lt;br /&gt;
 defaultroute  # use the cellular network for the default route&lt;br /&gt;
 usepeerdns    # use the DNS servers from the remote network&lt;br /&gt;
 nodetach      # keep pppd in the foreground&lt;br /&gt;
 crtscts       # hardware flow control&lt;br /&gt;
 lock          # lock the serial port&lt;br /&gt;
 noauth        # don't expect the modem to authenticate itself&lt;br /&gt;
 local         # don't use Carrier Detect or Data Terminal Ready&lt;br /&gt;
 replacedefaultroute&lt;br /&gt;
 debug&lt;br /&gt;
 &lt;br /&gt;
 # Use the next two lines if you receive the dreaded messages:&lt;br /&gt;
 #&lt;br /&gt;
 #    No response to n echo-requests&lt;br /&gt;
 #    Serial link appears to be disconnected.&lt;br /&gt;
 #    Connection terminated.&lt;br /&gt;
 #&lt;br /&gt;
 lcp-echo-failure 4&lt;br /&gt;
 lcp-echo-interval 65535&lt;br /&gt;
 &lt;br /&gt;
 connect &amp;quot;/usr/sbin/chat -V -f /etc/chatscripts/BluetoothPhone&amp;quot; &lt;br /&gt;
 disconnect &amp;quot;/usr/sbin/chat -V -f /etc/chatscripts/BluetoothPhone-Disconnect&amp;quot;&lt;br /&gt;
&lt;br /&gt;
With all these scripts in place and your rfcomm device connected using &amp;lt;tt&amp;gt;rfcomm&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;bind&amp;lt;/tt&amp;gt;, run the command &amp;lt;tt&amp;gt;sudo&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;pppd&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;call&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;BluetoothPhone&amp;lt;/tt&amp;gt; to connect to the Internet anywhere you have cellular service. When you are done, press Ctrl-C to terminate the connection.&lt;br /&gt;
&lt;br /&gt;
For more information on working with cellular data connections and Bluetooth, see ''Linux Unwired'' by Roger Weeks et al. (O'Reilly).&lt;br /&gt;
&lt;br /&gt;
Brian Jepson&lt;br /&gt;
&lt;br /&gt;
== Expand Your Laptop ==&lt;br /&gt;
&lt;br /&gt;
'''Expand your laptop's capabilities through the use of PCMCIA cards.'''&lt;br /&gt;
&lt;br /&gt;
Most laptops have PCMCIA (also called PC Card) slots for card-based expansion. Under Windows, before you install a PCMCIA card, you usually have to install a software driver in order for the card to operate. Under Ubuntu Linux, however, the drivers are typically built into the operating system, shipped as kernel modules. It's the job of the PCMCIA subsystem to load and unload these modules when a card is inserted.&lt;br /&gt;
&lt;br /&gt;
Usually, you don't need to do anything more than insert a card for the system to recognize it and load the proper driver. If you open a terminal window and examine the system log, you can see the card-insertion event and note what driver the PCMCIA subsystem loads. The system log will also show what new devices were created for that particular card. You can view the log with the command &amp;lt;tt&amp;gt;tail&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;-f&amp;lt;/tt&amp;gt; &amp;lt;tt&amp;gt;/var/log/messages&amp;lt;/tt&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
Here, we are inserting a 3Com 10/100 Ethernet adapter into our laptop's PCMCIA slot while monitoring the log:&lt;br /&gt;
&lt;br /&gt;
 Mar  8 23:54:19 localhost kernel: [4554419.074000] PCI: Enabling device 0000:02:00.0 (0000 -&amp;gt; 0003)&lt;br /&gt;
 Mar  8 23:54:19 localhost kernel: [4554419.074000] ACPI: PCI Interrupt 0000:02:00.0[A] -&amp;gt; Link [LNKA] -&amp;gt; GSI 11 (level, low) -&amp;gt; IRQ 11&lt;br /&gt;
 Mar  8 23:54:19 localhost kernel: [4554419.074000] 3c59x: Donald Becker and others. www.scyld.com/network/vortex.html&lt;br /&gt;
 Mar  8 23:54:19 localhost kernel: [4554419.074000] 0000:02:00.0: 3Com PCI 3CCFE575BT Cyclone CardBus at 0x4000. Vers LK1.1.19&lt;br /&gt;
 Mar  8 23:54:19 localhost pci.agent[17859]:      3c59x: loaded successfully&lt;br /&gt;
 Mar  8 23:54:19 localhost kernel: [4554419.155000] ACPI: PCI Interrupt 0000:02:00.0[A] -&amp;gt; Link [LNKA] -&amp;gt; GSI 11 (level, low) -&amp;gt; IRQ 11&lt;br /&gt;
&lt;br /&gt;
Once the driver is loaded, we can address this device via ''/dev/eth2''.&lt;br /&gt;
&lt;br /&gt;
Some combination cards are also supported. In this example, we're inserting a 10/100 Ethernet card and 56K modem combo card:&lt;br /&gt;
&lt;br /&gt;
 Mar  8 23:57:29 localhost kernel: [4554609.400000] eth2: NE2000 (DL10019 rev 05): io 0x300, irq 11, hw_addr 00:E0:98:90:D5:3C&lt;br /&gt;
 Mar  8 23:57:29 localhost kernel: [4554609.442000] ttyS1 at I/O 0x2f8 (irq = 11) is a 16550A&lt;br /&gt;
&lt;br /&gt;
The Ethernet portion of the card is addressable as ''/dev/eth2'' on this machine, and the 56K modem is addressable as ''/dev/ttyS1''.&lt;br /&gt;
&lt;br /&gt;
Some wireless cards, such as the classic Orinoco and Prism 2/3-based adapters, are also supported by the PCMCIA subsystem out of the box. In this case, we inserted an Orinoco adapter. It's also addressable as ''/dev/eth2'':&lt;br /&gt;
&lt;br /&gt;
 Mar  8 23:59:40 localhost kernel: [4554740.196000] eth2: New link status: Connected (0001)&lt;br /&gt;
&lt;br /&gt;
Ubuntu even supports pretty obscure devices. We own an old Iomega Clik PCMCIA 40 MB hard disk and a Socket Communications serial card. Both devices work great under Ubuntu. The Clik drive is mountable as ''/dev/hdc4'', and the serial card shows up as ''/dev/ttyS0''.&lt;br /&gt;
&lt;br /&gt;
 Mar  9 00:10:57 localhost kernel: [4555416.871000] hdc: IOMEGA Clik! 40 CZ ATAPI, ATAPI cdrom or floppy?, assuming FLOPPY drive&lt;br /&gt;
 Mar  9 00:10:57 localhost kernel: [4555417.177000] ide1 at 0x180-0x187,0x386 on irq 3&lt;br /&gt;
 Mar  9 00:10:57 localhost kernel: [4555417.182000] hdc: 39441kB, 78882 blocks, 512 sector size&lt;br /&gt;
 Mar  9 00:10:58 localhost kernel: [4555417.185000]  /dev/ide/host1/bus0/target0/lun0: p4&lt;br /&gt;
 Mar  9 00:10:58 localhost kernel: [4555418.047000] ide-cs: hdc: Vcc = 5.0, Vpp = 0.0&lt;br /&gt;
 Mar  9 00:11:29 localhost kernel: [4555449.006000] ttyS0 at I/O 0x3f8 (irq = 3) is a 16550A&lt;br /&gt;
&lt;br /&gt;
Just about any device you can put in a PCMCIA slot will work just great under Ubuntu (although some wireless cards need an extra configuration step [[Ubuntu Hacks/Mobile Ubuntu#Get Proprietary Wireless Cards Working|[Hack #41]]]). Give it a shot!&lt;br /&gt;
&lt;br /&gt;
== Hotswap Your Laptop's Optical Drive ==&lt;br /&gt;
&lt;br /&gt;
'''If you've got a laptop with a removable optical drive, you can use the hotswap utility to remove and reinstall it without rebooting.'''&lt;br /&gt;
&lt;br /&gt;
If you've purchased a laptop within the last couple of years, your machine most likely has an optical drive that's in a removable caddy or drive bay. Typically, these type of drives are enabled under Windows to be removed and replugged with the system power on, but the drivers that allow this haven't been available in Linux until recently.&lt;br /&gt;
&lt;br /&gt;
The hotswap package included in the universe repository [[Ubuntu Hacks/Package Management#Modify the List of Package Repositories|[Hack #60]]] provides the ability for you to hotswap an optical drive out and insert a battery or other module, and then reinsert the optical drive back into the bay, all without putting the laptop to sleep or shutting it down. To install ''hotswap'', first you must have the ''universe'' repository enabled in your ''/etc/apt/sources.list''; then you can install hotswap by using the following command:&lt;br /&gt;
&lt;br /&gt;
 gooley@falcon:~$ '''sudo apt-get install hotswap'''&lt;br /&gt;
          &lt;br /&gt;
&lt;br /&gt;
''apt-get'', as usual, will take care of all the dependencies and install all the software. Once ''apt'''s completed the download and installation of the software, you can institute a hotswap by running ''hotswap'' via ''sudo''. ''hotswap'' will autodetect your optical drive and ask you if you wish to remove it. Simply follow the prompts and do what the script says:&lt;br /&gt;
&lt;br /&gt;
 gooley@falcon:~$ '''sudo hotswap'''&lt;br /&gt;
 Password:&lt;br /&gt;
 I/O warning : failed to load external entity &amp;quot;/etc/hotswaprc&amp;quot; &lt;br /&gt;
 hotswap 0.4.0&lt;br /&gt;
 Copyright 2001 Tim Stadelmann&lt;br /&gt;
 This program is free software, licensed under the conditions of the&lt;br /&gt;
 GNU General Public License version 2, or (at your option), any later&lt;br /&gt;
 version.&lt;br /&gt;
 &lt;br /&gt;
 The following IDE device is currently configured:&lt;br /&gt;
 HL-DT-STCD-RW/DVD DRIVE GCC-4242N&lt;br /&gt;
 Do you want to remove this device? '''y'''&lt;br /&gt;
 You can now remove the device from the module bay.&lt;br /&gt;
 &lt;br /&gt;
 Would you like to insert an IDE device into the module bay? '''n'''&lt;br /&gt;
 Aborting&lt;br /&gt;
&lt;br /&gt;
At this point, you can eject and remove the optical drive. To reinsert the drive, simply run ''hotswap'' via ''sudo'' again (occasionally, ''hotswap'' will report an error, as shown here, but it will actually register the drive with the IDE subsystem):&lt;br /&gt;
&lt;br /&gt;
 gooley@falcon:~$ '''sudo hotswap'''&lt;br /&gt;
 I/O warning : failed to load external entity &amp;quot;/etc/hotswaprc&amp;quot; &lt;br /&gt;
 hotswap 0.4.0&lt;br /&gt;
 Copyright 2001 Tim Stadelmann&lt;br /&gt;
 This program is free software, licensed under the conditions of the&lt;br /&gt;
 GNU General Public License version 2, or (at your option), any later&lt;br /&gt;
 version.&lt;br /&gt;
 &lt;br /&gt;
 There is currently no IDE device configured.  (Floppy disk drives,&lt;br /&gt;
 batteries, and 'travel modules' are not managed by this utility.  If&lt;br /&gt;
 you want to swap such a module, you should remove it now.)&lt;br /&gt;
 &lt;br /&gt;
 Would you like to insert an IDE device into the module bay? '''y'''&lt;br /&gt;
 Please insert the new device into the module bay and press RETURN.&lt;br /&gt;
 &lt;br /&gt;
 No IDE device has been found in the module bay.  If you are sure that&lt;br /&gt;
 the device you want to configure connects to the IDE bus, make sure&lt;br /&gt;
 that the module is inserted completely.&lt;br /&gt;
 &lt;br /&gt;
 Do you want to try again? '''n'''&lt;br /&gt;
 Aborting&lt;br /&gt;
&lt;br /&gt;
A quick check of ''dmesg'' will confirm that the drive did indeed get re-registered with the system:&lt;br /&gt;
&lt;br /&gt;
 gooley@falcon:~$ '''dmesg | tail'''&lt;br /&gt;
 [4296527.332000] Probing IDE interface ide1...&lt;br /&gt;
 [4296527.698000] hdc: HL-DT-STCD-RW/DVD DRIVE GCC-4242N, ATAPI CD/DVD-ROM drive&lt;br /&gt;
 [4296528.004000] ide1 at 0x170-0x177,0x376 on irq 15&lt;br /&gt;
 [4296528.008000] hdc: ATAPI 24X DVD-ROM CD-R/RW drive, 2048kB Cache&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;tip&amp;quot;&amp;gt;&lt;br /&gt;
'''Tip'''&lt;br /&gt;
&lt;br /&gt;
Hotswapping the optical drive usually results in a loss of the drive's DMA settings. As of this writing, the only way to re-enable DMA is to reboot the system.&lt;br /&gt;
&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Hotswapping is one more capability Linux has recently gained on laptops and portable machines. Now you can enjoy another ability that's been a Windows-only feature!&lt;/div&gt;</summary>
		<author><name>Docbook2Wiki</name></author>	</entry>

	</feed>