Saturday, May 11, 2013

10 Things To Do After Installing elementary OS Luna

1.  Update xorg using xorg-edgers PPA

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

2.  Install Propietary Graphics Driver

    sudo apt-get install nvidia-current

3.  Install Propietary Graphics Driver

     If using open source video drivers (fglrx, nouveau) generate xorg.conf
     to  improve performance.

     ctrl+alt+F1
     sudo service lightdm stop
     sudo Xorg -configure
     sudo mv xorg.conf /etc/X11/

4.  Update kernel using pre-built packages from Ubuntu Mainline  http://kernel.ubuntu.com/~kernel-ppa/mainline/

    sudo dpkg -i *.deb

5.  Install Ubuntu Restricted Extras

    sudo apt-get install ubuntu-restricted-extras

6.  Enable all Startup Applications

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

7.  Install a Firewall Application

    sudo apt-get install gufw 

8.  Install 32-bit Libraries

    sudo apt-get install ia32-libs

9.  Optimize SSD Performance


    sudo nano /etc/fstab

    noatime,nodiratime,discard

10.  Enable DVD Playback


    sudo apt-get install libdvdread4

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

11.  Add PPA's

    Openshot

    sudo add-apt-repository ppa:openshot.developers/ppa
    sudo apt-get update && sudo apt-get install openshot openshot-doc

    Gimp

    sudo add-apt-repository ppa:otto-kesselgulasch/gimp
    sudo apt-get update && sudo apt-get install gimp

    Handbrake

    sudo add-apt-repository ppa:stebbins/handbrake-releases
    sudo apt-get update && sudo apt-get install handbrake-gtk

Sunday, October 28, 2012

How to 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

Sunday, August 5, 2012

Make Your Own Custom Ubuntu/Gnome Remix


-->

Ubuntu 12.04/12.10

Step 1. Install required packages...

sudo apt-get install gdm gnome-shell gnome-tweak-tool synaptic deborphan

(During installation you will be asked to select a display manager make sure to select GDM "Gnome Display Manager" I have not tested this using Light DM)

Step 2.  Restart & Login to Gnome-Shell

Step 3.  Start removing Unity...

sudo apt-get remove unity unity-2d unity-2d-common unity-2d-panel unity-2d-shell unity-2d-spread unity-asset-pool unity-common unity-lens-applications unity-lens-files unity-lens-music unity-lens-video unity-scope-musicstores unity-scope-video-remote unity-services indicator-messages indicator-status-provider-mc5 appmenu-qt appmenu-gtk appmenu-gtk3 lightdm unity-greeter overlay-scrollbar zeitgeist zeitgeist-core zeitgeist-datahub activity-log-manager-common activity-log-manager-control-center

Step 4.  Begin removing dependencies...

sudo apt-get autoremove

Step 5.  Clean up...

sudo apt-get purge `deborphan`

(This command will need to be performed multiple times until there are no more dependencies to be removed)

Step 6.   Remove Unity config files

sudo dpkg --purge `dpkg -l | egrep "^rc" | cut -d' ' -f3`

Step 7.  Add the Gnome3Team PPA to update Precise to the latest Gnome packages that have been left out of the 12.04 LTS repositories

sudo apt-add-repository ppa:gnome3-team/gnome3

Step 8.  Update your system and install/upgrade packages

sudo apt-get update && sudo apt-get dist-upgrade

Step 9.  (Optional) Clean up your “apt” cache

sudo apt-get clean

Step 10.  Smile, Unity is gone!

:)

Saturday, March 10, 2012

How to Transfer Files to and from your Galaxy Nexus




Add ADB to your PATH

# Ubuntu Users:

sudo gedit .bashrc

# Linux Mint Users:

sudo gedit /etc/bash.bashrc

# Make the appropriate changes ie. your username and path to where you keep the Android SDK add it to the bottom of your bashrc file save and close.

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

# Restart bashrc Ubuntu Users:

source .bashrc

# Restart bashrc Linux Mint Users:

source /etc/bash.bashrc

# Push files to Galaxy Nexus using ADB

adb push /pathtoyourfile(s) /sdcard/directory/

# Pull files from Galaxy Nexus using ADB

adb pull /sdcard/directory/file/ /home/username/directory/

Thursday, March 8, 2012

How to Optimize SSD Drives in Linux




1.  First make sure that you have your SATA mode set to "AHCI" in your motherboard's BIOS this is a necessary step for Trim support.

2.  Next you must edit your fstab file to include "noatime" & "discard" mounting options for your file system we do this be executing the following:

sudo gedit /etc/fstab

Enter the following options:

noatime,discard,

You do not need to do anything to your "/boot" partition just the root file system "/" or any other partition layout you have such as "/home" it should look something like this when you're finished....




After entering the above text Save & Close the file.

3.  Next we should change your I/O scheduler.  Assuming you haven't compiled your own custom kernel you're probably using the "CFQ" I/O scheduler.  For optimal performance we want to use either "Deadline" or "Noop".  To check which scheduler you're using enter the following into Terminal:

cat /sys/block/sda/queue/scheduler

The output should look something like this:

noop [deadline]

As indicate by the brackets I'm running the Deadline I/O scheduler.  To change your I/O Scheduler you can either compile your own custom kernel if you're unsure how to do that I have multiple videos covering the topic or you can do it in userspace by editing your /etc/rc.local file.

In Terminal enter the following:

sudo gedit /etc/rc.local

Next you will add the following to this file:

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

It should look like this when you're finished...



After entering the above text Save & Close the file.

4.  For changes to take effect reboot your computer and enjoy!

Tuesday, February 28, 2012

How to Benchmark Hard Drive Read Speeds in Linux

First as root clear the buffer-cache to accurately measure read speeds directly from the device:
echo 3 > /proc/sys/vm/drop_caches
Next run the test:

sudo hdparm -Tt /dev/sda

NOTE: In the code above "/dev/sda" is the hard drive I wanted to benchmark you will have to change the hard drive identifier "/dev/sxx" to whatever hard drive you would like to benchmark.

Sample Output: (Crucial m4 128gb SATA III SSD)

/dev/sda:
Timing cached reads: 26764 MB in 2.00 seconds = 13397.24 MB/sec
Timing buffered disk reads: 1216 MB in 3.01 seconds = 404.64 MB/sec
root@ubuntu rizzo # sudo hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads: 26976 MB in 2.00 seconds = 13503.76 MB/sec
Timing buffered disk reads: 1356 MB in 3.00 seconds = 451.66 MB/sec
root@ubuntu rizzo # sudo hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads: 27148 MB in 2.00 seconds = 13589.38 MB/sec
Timing buffered disk reads: 1358 MB in 3.00 seconds = 452.58 MB/sec
root@ubuntu rizzo # sudo hdparm -Tt /dev/sda

/dev/sda:
Timing cached reads: 26458 MB in 2.00 seconds = 13243.58 MB/sec
Timing buffered disk reads: 1352 MB in 3.00 seconds = 450.17 MB/sec

Sample Output: (Seagate 1Tb 7200rpm Mechanical Drive)

/dev/sdb:
 Timing cached reads:   27010 MB in  2.00 seconds = 13520.18 MB/sec
 Timing buffered disk reads: 352 MB in  3.00 seconds = 117.33 MB/sec
rizzo@ubuntu ~ $ sudo hdparm -Tt /dev/sdb

/dev/sdb:
 Timing cached reads:   27248 MB in  2.00 seconds = 13639.73 MB/sec
 Timing buffered disk reads: 354 MB in  3.02 seconds = 117.41 MB/sec
rizzo@ubuntu ~ $ sudo hdparm -Tt /dev/sdb

/dev/sdb:
 Timing cached reads:   27700 MB in  2.00 seconds = 13866.26 MB/sec
 Timing buffered disk reads: 352 MB in  3.00 seconds = 117.33 MB/sec
rizzo@ubuntu ~ $ sudo hdparm -Tt /dev/sdb

/dev/sdb:
 Timing cached reads:   26386 MB in  2.00 seconds = 13208.40 MB/sec
 Timing buffered disk reads: 354 MB in  3.01 seconds = 117.42 MB/sec


NOTEThis test should be run at least three or four times to get an accurate average reading.


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