Setup Ubuntu 12.04

Introduction

In this tutorial, I will try to list things you can do during Ubuntu LTS installation to make the experience little better. This tutorial will have specific settings for dell laptop, however I will mention when it comes in this tutorial, so that you can differentiate your setup. If you want to play with more cutting edge distro try my Arch Linux Tutorial.

1. Partition

If you have used Linux for quite some time now, it is time to experience with keeping a separate /home partition.

During installation, at disk management screen, go to advanced partition window and create separate / (root) and /home partitions. It is also a good idea to create a swap partition as big as the RAM size (if it is greater than 2GB).

advanced_partition

If you re-install or upgrade Ubuntu, go to the same window, select your /home partition, and press Change, select partition type as it is (e.g ext4) and mount it under /home. Don’t tick the Format option.

You can use same method to mount other drives as well e.g ntfs partitions (under /media e.g. /media/C, /media/D etc).

Warning: Don’t tick the Format option for anything other than the root (/).

During each subsequent installations, edit swap space too, because sometimes it does not get picked up the operating system automatically.

2. Username

If this is your first Ubuntu installation (I mean before separate /home partiton), use whatever username you prefer. From second installation onward, use the same username as you used in your previous installations. This will help you restore all your files as it was in your last installation.

If for some reasons you want to get a fresh look, you can remove some of the files using following command.

cd ~/.config
rm -rf compiz-1 dconf evolution gnome-session gtk-3.0 ibus libaccounts-glib nautilus Trolltech.conf ubuntuone update-notifier user-dirs.dirs user-dirs.locale

3. Locked Settings

If you find that you can’t change the wallpaper or wallpaper gets reset if you logout and log back in, you have to reassign all hidden files to your new username and usergroup.

sudo chown username:usergroup -R .*

Note: Here username is your own login username, and often usergroup is same as your username.

If you use groups and whoami commands, you will know your group and username.

4. Enable canonical partners

Go to Ubuntu Software Center -> Edit -> Software Sources -> Other Software and enable Canonical Partners (both). This will enable third party software like skype.

5. Additional packages

In Software Sources -> Other Software tab (from step 4) add following ppas.

a. For dell laptop add ppa:canonical-hwe-team/sputnik-kernel in the APT line textbox.

b. For Android MTP add ppa:langdalepl/gvfs-mtp ppa.

c. For Sandy bridge and newer architecture add ppa:glasen/intel-driver.

d. For newer graphics drivers add ppa:ubuntu-x-swat/x-updates

6. Update

Run following command to update the meta-data of software sources

sudo apt-get update

Next, install synaptic

sudo apt-get install synaptic

Note: If you don’t want to be bothered all the time for update (update is good thing) you can set Automatically check for updates to Never in software sources.

7. Sputnik for dell (optional)

To install sputnik kernel, go to synaptic and press Origin button located on bottom left. Go to LP-PPA-canonical-hwe-team-sputnik-kernel/precise link and install latest versions of following packages.

linux-headers-version-no
linux-headers-version-no-generic
linux-image-version-no-generic

E.g At the time of this writing, those packages were

 linux-headers-3.2.0-48
 linux-headers-3.2.0-48-generic
 linux-image-3.2.0-48-generic

8. Updating Ubuntu

Run following command to update packages to its latest versions

sudo apt-get dist-upgrade

Note: This command will upgrade gvfs packages too, that we added previously.

9. Install some software

sudo apt-get install ubuntu-restricted-extras ia32-libs-multiarch:i386 vlc artha chromium-browser vim audacity chmsee clementine youtube-dl cryptkeeper dosbox smplayer feh xchat compizconfig-settings-manager bum easytag gimp meld openshot ghex pavucontrol mupen64plus soundconverter ffmpeg aria2 uget laptop-mode-tools samba smbclient nautilus-share fbreader skype gufw keepass2 nautilus-open-terminal

Note: Remove the ones you won’t use from above line.

10. Brightness and Battery

Change GRUB_CMDLINE_LINUX in /etc/default/grub to look this following

GRUB_CMDLINE_LINUX="acpi_backlight=vendor dell_laptop.backlight=0"

And run following command to add it to boot options.

sudo update-grub

This should set the brightness level to an acceptable level, but if you want to play more with the brightness, try changing values inside sub-folders of /sys/class/backlight like

echo 2294 > /sys/class/backlight/intel_backlight/brightness

You can add this text inside /etc/rc.local or edit /etc/laptop-mode/conf.d/lcd-brightness.conf, if that works better.

If you want to increase battery life of your laptop, you can change GRUB_CMDLINE_LINUX to following setting as well (If your laptop hangs too much, change rc6 value to 1).

GRUB_CMDLINE_LINUX="acpi_osi=Linux drm.vblankoffdelay=1 i915.i915_enable_rc6=7 i915.lvds_downclock=1 i915.i915_enable_fbc=1 acpi_backlight=vendor dell_laptop.backlight=0"

11. Bluetooth vs wireless problem (optional)

If your wireless turns off while you disable bluetooth add following line at the end of /etc/modprobe.d/blacklist.conf.

blacklist dell-laptop

12. Hide mounted drives

For some people, having the mounted drives in the launcher is a good thing, but not for all. In some cases you can remove those icons just by choosing “Unlock from Launcher”, but it might not work in all cases. If you remember, we have installed a software called compizconfig-settings-manager above.

Open that software and go to Ubuntu Unity Plugin -> Experimental and Change Show Devices to “Never“.

13. Enable SNA

We have already installed the sna packages (sandy bridge and newer processor), when we did the upgrade (Section 8, above). Now, all you have to do is add some text to /etc/X11/xorg.conf

$ sudo gedit /etc/X11/xorg.conf
 Section "Device"
  Identifier "intel"
  Driver "intel"
  Option "AccelMethod" "sna"
 EndSection

After reboot, run following command to find out, if sna is enabled.

$ cat /var/log/Xorg.0.log | grep -i sna
SNA initialized with Sandybridge backend

14. Tips

For a stable experience, make note of following tips.

  • Depending upon your target audience, you can remove synaptic and compizconfig-settings-manager, so that they don’t accidentally break the system. Use following command to remove these packages
    sudo apt-get remove synaptic compizconfig-settings-manager
  • Use Ubuntu Software Center to install and remove applications, so that you won’t break packages.
  • Don’t play with ppas.

Conclusion

This was like a note to me, while installing different packages in Ubuntu. I hope it helps you too.

Cheers !!

About these ads

Leave a comment

Filed under Uncategorized

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s