Вы находитесь на странице: 1из 12

Ubuntu 12.

04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

April 2, 2012

Ubuntu 12.04
Precise Pangolin
Note - Any time you see text in a grey box : This means you enter each line (one at a time) into the Terminal. To access the terminal open your dash and type "terminal" or just press Ctrl+Alt+T Any questions, comments, problems, suggestions? E-Mail them to rowan [at] mindseeder [dot] com Items missing from this page that were on the 11.10 page may be re-added in the future once Precise support is fully added. Please send me an e-mail about any suggestions or problems you run into.

Table of Contents
Desktop Environments Speed Up System/Boot
Gnome Shell and Gnome Classic KDE 4 XFCE Fluxbox LXDE Openbox Preload Optimize swap usage BleachBit ZRAM

Nautilus
Image Converter Mount Image Files (.iso)

Terminal
Aliases Apt-Fast Log out without root

Unity
Documentation Calculator in Dash MyUnity Toggle full/part size dash. Quicklists

Useful Programs
Activity Log Manager Clementine Gnome Tweak Tool (Change Font and Icons) Ubuntu Tweak

1 of 12

05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

Misc.
Disable Guest Session iFuse (iPod, iPod Touch, iPhone Libraries) Ubuntu Restricted Extras Use Chrome's PDF reader in Chromium

Desktop Environments
Don't like Unity? There are other options! You choose them from the login menu by clicking on the gear next to your name.

Gnome Shell and Gnome Classic


This will install the new Gnome 3 interface called Gnome Shell. If you preferred Gnome 2 (The environment Ubuntu used to come with before Unity): This will also install Gnome Classic. sudo apt-get install gnome-shell

KDE 4
This is a beautiful and interesting desktop environment. It is the default in Kubuntu Note: The following command will install KDE 4 without all the applications usually included with a full KDE install. sudo apt-get install kde-plasma-desktop

XFCE
This is a very lightweight and popular desktop environment. It is the default in Xubuntu. sudo apt-get install xfce4

2 of 12

05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

Fluxbox
This is a very lightweight desktop environment. sudo apt-get install uxbox

LXDE
This is a very lightweight desktop environment. sudo apt-get install lxde

Openbox
This is a very lightweight desktop environment. sudo apt-get install openbox

Speed Up System/Boot Preload


Preload is nice little application that could make your linux system a lot more snappier. Preload is an adaptive readahead daemon. It monitors applications that users run, and by analyzing this data, predicts what applications users might run, and fetches those binaries and their dependencies into memory for faster startup times. Preload packages are available for almost all linux distributions. And it is available by default in the Synaptic Package Manager in Ubuntu. Alternatively, you can install it via Terminal. sudo apt-get install preload Thats it. Preload will run silently in the background. If you want to further tweak Preload, conf le is available at /etc/preload.conf. Source

Optimize swap usage


3 of 12 05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

As we know, swap is the area on a hard disk as part of the Virtual Memory. Swap temporarily holds memory pages that are inactive. Swap space is used when your system decides that it needs physical memory(RAM) for active processes and there is insucient unused physical memory available. If the system happens to need more memory resources or space, inactive pages in physical memory are then moved to the swap space therefore freeing up that physical memory for other uses. Because disks are much slower than RAM, this can lead to slower response times for system and applications if processes are too aggressively moved out of memory. So we can control the usage of swap area to speed up Ubuntu if theres a large enough RAM. Theres a swappiness parameter controls the tendency of the kernel to move processes out of physical memory and onto the swap disk. It ranges from 0 to 100, and when swappiness=0 it tells the kernel to avoid swapping processes out of physical memory for as long as possible, when swappiness=100 it tells the kernel to aggressively swap processes out of physical memory and move them to swap cache. The default value of swappiness in Ubuntu is 60, and it recommends swappiness=10 for Ubuntu Desktop to improve overall performance. First, check the value of swappiness in Applications -> Accessories -> Terminal with this command: cat /proc/sys/vm/swappiness Temporarily change swappiness value to 10 using following command, and it will be reverted in next restart. sudo sysctl vm.swappiness=10 To permanently change this value: gksudo gedit /etc/sysctl.conf Search for vm.swappiness and change its value as desired. If vm.swappiness does not exist, add it to the end of the le like so: vm.swappiness=10 Finally, save the le and reboot. Source

BleachBit
BleachBit quickly frees disk space and tirelessly guards your privacy.

4 of 12

05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

Free cache, delete cookies, clear Internet history, shred temporary les, delete logs, and discard junk you didn't know was there. Designed for Linux and Windows systems, it wipes clean 90 applications including Firefox, Internet Explorer, Adobe Flash, Google Chrome, Opera, Safari,and more. Beyond simply deleting les, BleachBit includes advanced features such as shredding les to prevent recovery, wiping free disk space to hide traces of les deleted by other applications, and vacuuming Firefox to make it faster. Better than free, BleachBit is open source. sudo apt-get install bleachbit Source

ZRAM
ZRAM creates a RAM based block device which acts as a swap disk, but is compressed and stored in memory instead of swap disk (which is slow), allowing very fast I/O and increasing the amount of memory available before the system starts swapping to disk. This gives amazing performance improvements on systems with low RAM. Especially netbooks! However it is not known if this gives a benecial eect to Solid State Drives (SSDs.) sudo add-apt-repository ppa:shnatsel/zram sudo apt-get update sudo apt-get install zramswap-enabler Source (It's recommended you read this if you would like a little more information on ZRAM.) *Special thanks to Reddit user Reddickk for submitting this.

Nautilus Image Converter


This patch for Nautilus allows you to resize images by right clicking on them. sudo apt-get install nautilus-image-converter sudo killall nautilus Source

5 of 12

05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

Mount Image Files


This patch for Nautilus allows you mount image (.iso) les by right clicking on them. Just download and install this .deb le. Then restart Nautilus sudo killall nautilus Source

Terminal Aliases
First of all create this le and open it in your favorite editor touch ~/.bash_aliases; gedit ~/.bash_aliases Add your aliases in this le. One on each line. Here's an example with a few of my favorites: alias update='sudo apt-get update' alias upgrade='sudo apt-get upgrade' alias upgradef='sudo apt-get update; sudo apt-get upgrade' alias ins='sudo apt-get install' alias rem='sudo apt-get remove' alias search='apt-cache search' alias autoremove='sudo apt-get autoremove' Note: These will not work in any terminal windows/tabs you had open before adding the new aliases. Simply close the old ones or open new ones. Source

Apt-Fast
Apt-fast is a simple command line utility that can make installation and upgrading of softwares in Ubuntu/Debian much faster. Apt-fast make use of Axel app which accelerates HTTP/FTP downloads by using multiple sources for one le. Author claims that, apt-fast could make your installations and upgrades up to 26x faster! Do the following in Terminal to install it.

6 of 12

05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

sudo add-apt-repository ppa:tldm217/tahutek.net Unfortunately we are not quite done yet. As of April 2, 2012 apt-fast doesn't have a Precise repository. We'll have to edit our Software Sources. Once again, unfortunately Canonical has decided to remove that option from being readily available in the dash or alacarte... So we'll have to launch it from the terminal. gksudo software-properties-gtk Go to the Other Software tab and click on http://ppa.launchpad.net /tldm217/tahutek.net/ubuntu precise main. Then click Edit. Change the eld that says "precise" to "oneiric" and click OK. Also do this on the line that says (source code) Close Software Sources and put these lines in the terminal: sudo apt-get update sudo apt-get install apt-fast Close and re-open terminal once again and try to use 'apt-fast' instead of 'apt-get'. You will see the dierence. Source

Log out without root


This is a quick way to log out of your current session without needing root priviledges (no need for sudo.) Note: Most applications will probably not give you any chance to save your current projects when using this command. Don't blame me ;) Open the termianl and quickly type this: pkill -KILL -u $USER Tip: To make it easier to remember why not add alias logout='pkill -KILL -u $USER' to your bash aliases? Source

Unity Documentation
7 of 12 05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

The Raving Rick wrote some (slightly outdated) very simple yet fully informative information on the basic usage of Unity. You can read it here.

Calculator in Dash
The Unity Scope Calculator aims to provide you with a fast and convenient way to do simple math without leaving your desktop. To use it, hit the Super (Windows) key and type in your mathematical query. The scope will analyse the sum and present an answer. sudo add-apt-repository ppa:scopes-packagers/ppa sudo apt-get update sudo apt-get install unity-lens-utilities unity-scope-calculator Log out and then back in for the changes to take eect. Source

MyUnity
MyUnity is a tool similar to Ubuntu Tweak but is used for the main purpose of customizing the Unity interface without using CompizCong-Settings-Manager, which should be left for more advanced users. Some of its useful features are: Change Dash, Launcher and Panel transparency Adjust Dash blur Display Home, Trash, and mounted drives on the desktop Adjust launcher size, backlights and hiding preferences Tweak font settings, including size, RGBA and hinting MyUnity was so stable and useful that it has been accepted into the 12.04 repositories. You can get it with a single terminal command! sudo apt-get install myunity Source

Toggle full/part size dash.


Open up the dash and hit the square icon at the top left of the screen. (The third icon from the left.) Note: On much smaller resolutions, such as 1024x600, you may

8 of 12

05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

notice little to no dierence between these.

Quicklists
There is a nice collection of Unity quicklists on AskUbuntu.

Useful programs Activity Log Manager


Activity Log Manager is a graphical user interface which lets you easily control what gets logged by Zeitgeist. It supports setting up blacklists according to several criteria (such as application or le types), temporarily stopping all logging as well as deleting recent events/documents. It is now included with Ubuntu 12.04 by default. To access it, open your System Settings (from the Dash.) Click on the Privacy icon!

Clementine
Clementine is a multiplatform music player. It is inspired by Amarok 1.4, focusing on a fast and easy-to-use interface for searching and playing your music. sudo apt-get install clementine You can now also get a Unity music lens/scope for Clementine by getting it from the following PPA: sudo add-apt-repository ppa:markjtully/ppa sudo apt-get update sudo apt-get install clementine-scope Notes: You will have to log out before the scope will work. Also, the Clementine scope currently does not show album art. (Which is a bummer..) If you enjoy this music player, perhaps you'll want to remove Banshee and its music lens. sudo apt-get remove banshee

9 of 12

05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

Source 1: Clementine Home Page Source 2: Clementine Scope

Gnome Tweak Tool (Change Theme, Font, and Icons)


The option to change your font and icons was removed in Ubuntu 11.10 for whatever reason. There is a tool that can get the job done for you (and a lot more advanced options.) Note: This now also installs Gnome-Shell and Gnome Classic. sudo apt-get install gnome-tweak-tool Note: This program will be called "Advanced Settings" in your menu/dash,

Ubuntu Tweak
Ubuntu Tweak is a very useful application that allows you to easily congure many dierent parts of Ubuntu without having to deal with the terminal or gconf. sudo apt-add-repository ppa:tualatrix/ppa sudo apt-get update sudo apt-get install ubuntu-tweak Source

Misc. Disable Guest Session


There is currently no way to automatically disable the guest session. You can do so by editing your lightdm.conf le! gksudo gedit /etc/lightdm/lightdm.conf Add the following line to the end of the le: allow-guest=false Restart your system to see the changes. Note: To bring the guest account back just edit the lightdm.conf le
10 of 12 05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

again and remove the allow-guest=false line Source

Ubuntu Restricted Extras


Ubuntu Restricted Extras is a software package that allows you to install essential software which is not already included due to legal or copyright reasons. It installs support for: MP3 and unencrypted DVD playback, Microsoft TrueType core fonts, Flash, codecs for common audio and video les, and unRARing les. sudo apt-get install ubuntu-restricted-extras Note: If you're using Kubuntu or Xubuntu replace this command with kubuntu-restricted-extras or xubuntu-restricted-extras Source

iFuse (iPod, iPod Touch, iPhone Libraries)


Note: This was tested in 11.10 and not 12.04. Try this at your own risk, and please e-mail me your results. Okay, admittedly I'm not an iDevice user, and never will be. But from what I've looked into this is the proper way to get music programs like Rhythmbox to recognize your iDevice. If you have any useful information on this topic please email me at rowan [at] mindseeder [dot] com. sudo apt-get install ifuse libimobiledevice-utils idevicepair unpair && idevicepair pair Note: If you're getting a -5 Error, try this: sudo apt-get install libimobiledevice2-dbg libimobiledevice-dev libimobiledevice-doc libimobiledevice2 idevicepair unpair && idevicepair pair Source *Special thanks to Reddit user SpecialSause for submitting this.

Use Google Chrome's native PDF reader in Chromium


11 of 12 05/03/2012 05:29 PM

Ubuntu 12.04 Tips/Tricks

http://ubuntu.mindseeder.com/12.04/

Download the latest Google Chrome dev build: 32bit | 64bit Find where you downloaded the le. Right click it and click Extract. Enter the extracted folder and also extract the le data.tar.gz Navigate to data/opt/google/chrome and locate the le libpdf.so Copy the above le to /usr/lib/chromium-browser/ (You may need to run a root nautilus window for this. Press ALT+F2 and type gksu nautilus /usr/lib/chromium-browser/ ) Start Chromium and type about:plugins into the address bar. Search for Chrome PDF Viewer and click the Enable option. Source

12 of 12

05/03/2012 05:29 PM

Вам также может понравиться