Showing posts with label linux. Show all posts
Showing posts with label linux. Show all posts

Friday, February 1, 2013

Nvidia Optimus support in Ubuntu


If you have a laptop with nVidia Optimus and you run Linux (in my case Ubuntu) it will drain your battery very fast (in my case 2-3 times faster than on Windows).

In order to counter this, I install Bumblebee on my laptop. This will allow you to use the discrete graphics card when you need it and turn it off when you don't.
Bumblebee 3.0 is supported up to Ubuntu version 12.10.


In order to install Bumblebee enter the following commands in a terminal:
  1. sudo add-apt-repository ppa:bumblebee/stable
  2. sudo apt-get update
  3. sudo apt-get install bumblebee bumblebee-nvidia linux-headers-generic
  4. Reboot
To run a program using the nVidia card run:
optirun firefox
If you have problems please check the references.

References:
https://wiki.ubuntu.com/Bumblebee
http://bumblebee-project.org/
https://github.com/Bumblebee-Project/Bumblebee

Monday, January 28, 2013

Reset linux root password

This post will show you how to reset a linux root password. I assume that you are using GRUB 2 as the bootloader.
  1. Select the linux boot option from the grub menu for which you want to reset the password.
  2. Press e to edit your boot option entry. Note that the editing is not persistent, the next time you boot all these changes will be lost so you don't have to worry about reverting them.
  3. In the line starting with something like this: linux /boot/vmlinux-3.5.0-22-generic ... ro quiet slpash replace ro with wr. This will give you write access instead of read only.
  4. Also add init=/bin/bash at the end of the line. This will start a bash process instead of your desktop environment.
  5. When the line looks like this: linux /boot/vmlinux-3.5.0-22-generic ... rw quiet slpash init=/bin/boot press Ctrl+X to boot.
  6. The system will boot and will give a terminal with root access. You can use this terminal to change the password of any users or run any command you want with root access.
  7. To change the password for user gulyan type: passwd gulyan
  8. After you type the new password 2 times, you need to reboot.
Done :)