Saturday, February 11, 2012

Lou's Ubuntu Cheat Sheet


# Gnome 3 Auto Login

sudo /usr/lib/lightdm/lightdm-set-defaults -s gnome-shell

# Unity Auto Login

sudo /usr/lib/lightdm/lightdm-set-defaults -s ubuntu

# Change LightDM Wallpaper

gksu gedit /etc/lightdm/unity-greeter.conf

# My Commonly Installed Apps

sudo apt-get install build-essential kernel-package libncurses5-dev bzip2 fakeroot git git-core git-gui msr-tools ruby filezilla openshot vlc minitube audacity soundconverter easytag arista gimp dconf-tools transmission trimage guvcview meld blender gparted screenkey dkms empathy shotwell aptitude hardinfo gufw brasero

# Compile ffmpeg,libvpx
 and x264

Make sure you don't have ffmpeg or x264 installed:

sudo apt-get remove ffmpeg x264 libx264-dev

Update your system:

sudo apt-get update

Install all of the packages required for compilation & Installation:


sudo apt-get -y install build-essential checkinstall git libfaac-dev libgpac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev libxfixes-dev texi2html yasm zlib1g-dev

x264

cd

git clone git://git.videolan.org/x264

cd x264

./configure --enable-static

make -j 32

sudo checkinstall --pkgname=x264 --pkgversion="3:$(./version.sh | awk -F'[" ]' '/POINT/{print $4"+git"$5}')" --backup=no --deldoc=yes --fstrans=no --default

libvpx

cd

git clone http://git.chromium.org/webm/libvpx.git

cd libvpx

./configure

make -j 32

sudo checkinstall --pkgname=libvpx --pkgversion="1:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default

ffmpeg

cd

git clone --depth 1 git://source.ffmpeg.org/ffmpeg

cd ffmpeg

./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-x11grab

make -j 32

sudo checkinstall --pkgname=ffmpeg --pkgversion="5:$(date +%Y%m%d%H%M)-git" --backup=no --deldoc=yes --fstrans=no --default

hash x264 ffmpeg ffplay ffprobe

# Android AOSP packages

sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev libc6-dev lib32ncurses5-dev ia32-libs x11proto-core-dev libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev g++-multilib mingw32 tofrodos python-markdown libxml2-utils xsltproc

# AOSP Package - install last

sudo apt-get install libx11-dev:i386

# Java 1.6

Decompress
sh jdk-6u30-linux-x64.bin
Move
sudo mv jdk1.6.0_30 /usr/lib/jvm/
Run
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.6.0_30/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.6.0_30/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.6.0_30/bin/javaws" 1
Run
sudo update-alternatives --config java
Choose the Option
/usr/lib/jvm/jdk1.6.0_30/bin/java
Check Version
java -version
java version "1.6.0_30"
Java(TM) SE Runtime Environment (build 1.6.0_30-b12)
Java HotSpot(TM) 64-Bit Server VM (build 20.5-b03, mixed mode

Alternate Method if you have the Mint 12 Repository enabled:

sudo apt-get install sun-java6-jdk

# Faenza & Faience Icon Themes

sudo add-apt-repository ppa:tiheum/equinox
sudo apt-get update && sudo apt-get install faenza-icon-theme faience-icon-theme

# Kazam Screencaster Ubuntu 11.10

sudo add-apt-repository ppa:kazam-team/unstable-series
sudo apt-get update && sudo apt-get install kazam

# Chromium Daily PPA

sudo apt-add-repository ppa:chromium-daily/ppa

# Linux Mint Icons & Mint-z Theme

git clone https://github.com/linuxmint/mint-x-icons.git
git clone https://github.com/linuxmint/mint-z-theme.git

# Zen Kernel

git clone --depth 1 git://zen-kernel.org/kernel/zen-stable.git

# X.org Edgers

sudo apt-add-repository ppa:xorg-edgers/ppa
sudo apt-get update && sudo apt-get dist-upgrade

# Booting Issues - Add to /etc/default/grub

quiet splash irqpoll
quiet splash acpi=off
acpi_osi=Linux
acpi=force

# How to Blacklist “Radeon” Module

As root, create file /etc/modprobe.d/blacklist-radeon.conf

Add the following contents:

blacklist radeon

Save the file and reboot

# How to install Proprietary ATI Video Driver

1. Symbollically Link lib & lib64 to avoid lib64 error

cd /usr
sudo ln -s lib libx64

2. Make ATI installer executable

chmod +x amd-driver-installer-12-1-x86.x86_64.run

3. Install ATI Driver Manually DO NOT build deb packages

sudo sh ./amd-driver-installer-12-1-x86.x86_64.run

4. Update X.org

sudo aticonfig --initial -f

# xorg.conf “Radeon” driver

sudo gedit /etc/X11/xorg.conf

Section "Device"
Identifier "ATI Radeon"
Driver "radeon"
Option "AccelMethod" "EXA"
Option "MigrationHeuristic" "greedy"
Option "AccelDFS" "true"
Option "EnablePageFlip" "true"
Option "EnableDepthMoves" "true"
EndSection

# Improve Gnome-Shell Performance with Proprietary ATI Driver

sudo gedit /etc/environment

Add the following entry at the bottom of the file:

CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
# Enable DVD Playback

sudo apt-get install libdvdread4

sudo /usr/share/doc/libdvdread4/install-css.sh


# Fix Laptop Touchpad Not Working After Kernel Update

sudo su
echo options psmouse proto=exps > /etc/modprobe.d/psmouse.modprobe

# Enable all Startup Programs Ubuntu 11.10

cd /etc/xdg/autostart
sudo sed --in-place 's/NoDisplay=true/NoDisplay=false/g' *.desktop

# bashrc ADB & ccache

# Android ADB
export PATH=$PATH:/home/rizzo/sdk/platform-tools/

# Android ccache speeds up AOSP compile time
export USE_CCACHE=1

# Set ccache size within source directory

prebuilt/linux-x86/ccache/ccache -M 50G

# Restart bashrc
source .bashrc

# How to Change I/O Scheduler during run-time

Check to see what I/O Scheduler you're currently running:

cat /sys/block/sda/queue/scheduler

Change I/O Scheduler by entering the following into /etc/rc.local

echo noop > /sys/block/sda/queue/scheduler

# Add Linux Mint 12 repositories to your sources.list

Add the following to your /etc/apt/sources.list

deb http://packages.linuxmint.com/ lisa main upstream import

Then run:

sudo apt-get update

Finally install the following package:

sudo apt-get install linuxmint-keyring

1 comment:

  1. hey bro i am trying to make kernel for my sony phone,but unfortunately i m getting follwoing error:
    rohit@rohit:~$ cd android/
    rohit@rohit:~/android$ cd kernel/
    rohit@rohit:~/android/kernel$ export CROSS_COMPILE=/home/rohit/arm-eabi-4.4.3/bin/arm-eabi-
    rohit@rohit:~/android/kernel$ make clean && make mrproper
    make: execvp: /home/rohit/arm-eabi-4.4.3/bin/arm-eabi-gcc: Permission denied
    /home/rohit/android/kernel/scripts/gcc-version.sh: line 25: /home/rohit/arm-eabi-4.4.3/bin/arm-eabi-gcc: Permission denied
    /home/rohit/android/kernel/scripts/gcc-version.sh: line 26: /home/rohit/arm-eabi-4.4.3/bin/arm-eabi-gcc: Permission denied
    make: execvp: /home/rohit/arm-eabi-4.4.3/bin/arm-eabi-gcc: Permission denied
    /home/rohit/android/kernel/scripts/gcc-version.sh: line 25: /home/rohit/arm-eabi-4.4.3/bin/arm-eabi-gcc: Permission denied
    /home/rohit/android/kernel/scripts/gcc-version.sh: line 26: /home/rohit/arm-eabi-4.4.3/bin/arm-eabi-gcc: Permission denied
    rohit@rohit:~/android/kernel$

    please help to fix this problem

    ReplyDelete