Saturday, September 22, 2012

How To Do Screen Casts In Linux




If you have an rpm-based OS, do :


else if you have a debian based OS, do:



After the packages are installed,

Run the the following command for a screen cast (without audio):


-f           ==  force format
x11grab ==  Grab the X11 display
-s          ==  size

 wxga    == 1366x768
-r          == set frame rate
-i           == in file

-sameq  == same quality

This will create a file out.mpg in the directory /tmp.

Run the the following command for a screen cast (with audio):


-y   == Overwrite output files
alsa ==  ALSA (Advanced Linux Sound Architecture) input device
-ac  == set number of audio channels
-i    == pulse [Refers to pulseaudio]

`xdpyinfo | grep 'dimensions:'|awk '{print $2}'` == get the max resolution of your screen
-acodec == foce audio codec
-an == Disable audio recording
-video == foce video codec

This will create two files my_output.wav and my_output.mp4 in the current directory.

This correspond to the audio and video recorded.

To join combine the audio and video in a single file, just type:


The required video will be stored in Output.mp4

Update: In fedora, Ctrl + Shift + Alt + R -- Records a Screencast of your entire desktop and saves it to your Videos folder.

To detect crop dimensions:
ffmpeg -i in.mpg -vf "cropdetect=24:16:0" out.mpg
To crop video:
ffmpeg -i input.mpg -vf "crop=1280:768:43:0" -qscale 0 output.mpg
To change aspect ratio:
ffmpeg -i input.mpg -s 1366x768 -aspect 16:9 -qscale 0 output.mpg
To concatenate media files:
ffmpeg -f concat -i mylist.txt -c copy -qscale 0 out_.mpg
cat mylist.txt
file out1.mpg
file out2.mpg

Wednesday, September 19, 2012

How To Install ATI Catalyst Drivers In Fedora 16

Execute the following series of commands:



If you get any of the following error(s) while booting:


Then you should type:



If you are ever stuck at the start-up screen at "Starting Display Manager":

It means that either you have installed the wrong packages or fiddled wrongly with config files. In order to correct this, you have to re-install the drivers. But in order to do so, you'll need to either boot into recovery mode or at the boot screen press 'e' and type 3 at the end of rhgb quiet and press 'b' to boot. Then plugin your ethernet cable and re-install the drivers.

Tuesday, September 18, 2012

How To Install Ethernet/Wireless/Bluetooth Drivers In LinuxMint

How To Install Ethernet/Wireless/Bluetooth Drivers In LinuxMint

Step 1:  First open terminal and type:


Step 2: Download https://docs.google.com/open?id=0B8d4Lb_KJbfdNjluVHBucHV3d1E




Wednesday, September 12, 2012

How To Dual Boot Windows & Ubuntu 12.04 In Sony Vaio/ HP dv6 Laptops With GPT-EFI Partition or Dynamic Partition

How To Dual Boot Windows & Ubuntu 12.04 In Sony Vaio/ HP dv6 Laptops With GPT-EFI Partition or Dynamic Partition

How To Convert Dynamic to Basic Partition Without Loss Of Data

This is a common issue in most of the latest HP and Vaio Laptops. These guys have the following issue:

(i) Vaio guys have used GPT-EFI configuration for their hard drives whereas the old and friendly used to be MBR-BIOS configuration.
(ii) HP guys already have enough number of primary partitions and Linux can't be installed easily (as long as you don't want wubi). So naturally, while shrinking your hard disk in Windows 7, you generally get an option to change to Dynamic Configuration. There you go! Once clicked, it is very difficult to revert back. But this is where the important use of two awesome tools gdisk and testdisk chips in.

I'll be focusing on correcting or rather 'suitableizing' your hard disk configuration for easy Linux installations and get rid of crappy partitions of which there is no need at all. I'll provide the links for the rest of the steps as we go.

The process:

Part 1: Converting GPT-EFI to MBR-BIOS. For this method, you can perform the required set of operations in windows itself. But changing hex-values of a partition while it is mounted, puff! Therefore, I'll use the live-mode of Ubuntu.

(i) Creating Live Mode USB: To use Live Mode of Ubuntu, all you need is a USB Drive having enough space to hold a 700MB file. Go through this: http://www.ubuntu.com/download/help/create-a-usb-stick-on-windows Now, that you have a bootable USB, reboot your system (Yeah, by reboot I mean shutdown and then boot, not hibernate and boot!)

(ii) Booting From USB: Now usually, one can boot from USB in Laptops easily. In Vaio Laptops, you'll have to go to the BIOS options by pressing F2. Then, you have to switch from UEFI Mode to Legacy Mode and Enable Booting From External Drives. In HP, one can boot from USB just by pressing F9 and going to Boot Menu.

(iii) Installing gdisk: Note, you should have a working internet connection in order to perform this, otherwise, you can download the required packages before-hand and store them somewhere.

Open pkgs.org

Photobucket

Search for gdisk

Photobucket

Click on Ubuntu 12.04.1 LTS

Photobucket

Now, if you have a 32-bit image of Ubuntu, then click on the i386 file but if you have the 64-bit image of Ubuntu, then click on select mirror.

Photobucket

Download the binary package.

(iv) Installing testdisk:

Google testdisk :)

Photobucket

Open the download page of CGISecurity


Photobucket

Click on Linux, kernel 2.6.18 or later (again, 32-bit=i386 and 64-bit=x86_64) Let the download complete!

Photobucket

Alternatively, one can download gdisk from https://docs.google.com/open?id=0B8d4Lb_KJbfdd1Yxd25ObWxub0E
and testdisk from https://docs.google.com/open?id=0B8d4Lb_KJbfdTUNTZlpjc0Q3d0k

(v) Time to open a terminal: Press the Windows Key and type terminal

Photobucket

(vi) Time to write some commands:
We'll basically open gdisk, go into expert mode and delete GPT partition tables and write MBR.

(vii)Now that the disk has been converted to MBR, one needs to recover any partitions that have been lost and mark them as primary. For which, we'll use testdisk.

Select Create & Press Enter

Photobucket

Select the hard disk in which your Windows, Recovery, etc partitions are present. In most cases it will be /dev/sda. Select proceed and press Enter

Photobucket

Whatever the by-default option is, select it. (TestDisk automatically detects the Hard Disk and makes the appropriate option as default-highlighted). Since the EFI-GPT Combo data-structures have been deleted by gdisk, Intel is the by default highlighted option in this case.

Photobucket

Select Analyze and press Enter

Photobucket

OK, so in the case of Vaio (after using gdisk), Partition 1 and Partition 3 are no longer needed. Because these contain info about booting from GPT-EFI partitions. Select Quick Search and press Enter

Photobucket

Hit Stop when all the required partitions have been displayed.

Photobucket

Now select the Recovery Partition & press the side arrow key until * appears. Do the same for your C: Drive. But for the D: Drive (If you have any) choose P.

Photobucket

This will show the list of partitions that you actually want at last. Select write and press Enter.

Photobucket

Everything seems to be done. The partition Structure has been written into the hard disk.

Photobucket


Part 2:  Moving/Re-Sizing Hard Disk Partitions: This is required so that error like "This partition does not start at any physical boundary" don't occur while installing Linux.


(i) Download the GParted Live iso file: http://gparted.sourceforge.net/download.php

(ii) Download and install LinuxLive USB Creator http://www.linuxliveusb.com/ on your MS Windows computer.

(iii) From Windows, install then run the LinuxLive USB Creator program and follow the instructions in the GUI to install GParted Live on your USB flash drive

(iv) Boot From USB and follow the instructions:


Keep pressing enter until a screen similar to this appears. Now re-size the first partition and add the space before and after it. You'll get a warning message like this one, but its normal.

Photobucket

The layout should look like this. Then click on edit and then on "apply all actions".

Photobucket

Intermediary Process: First, The partition is expanded

Photobucket

Intermediary Process: Second, data is copied from later sectors to previous ones.

Photobucket

Intermediary Process: Still Copying

Photobucket

Intermediary Process: Almost finished copying files.

Photobucket

Copying finished! Hurray!

Photobucket

The final layout will look something like this.

Photobucket

Part 3: Recovering Master Boot Record of Windows. This is essential to boot Windows. The destruction of GPT-Partition tables destroys the boot info and hence it needs to be restored. In order to do this, there are many techniques available. But we'll follow the one mostly used and which is the safest. i.e. let Microsoft repair it's own product!

(i) Download the iso of the Windows 7 Version you have from :
http://forums.mydigitallife.info/threads/18769-Download-Windows-7-ISO-(Official-32-bit-and-64-bit-Direct-Download-Links)

(ii) Download and Install Windows 7 USB/DVD download tool from : http://images2.store.microsoft.com/prod/clustera/framework/w7udt/1.0/en-us/Windows7-USB-DVD-tool.exe

Run the program. Click browse to select the image file that you have downloaded.

Photobucket

Click on USB Device

Photobucket


Select Which USB Device you want to copy files to.

Photobucket


If there is not enough space on your USB Device, backup its data and click Erase USB Device

Photobucket

Wait for the process to finish.

Photobucket

Boot From USB. Select Install Now

Photobucket

Select your language & click next.

Photobucket

Click the button for "Use Recovery Tools"

Photobucket

Click on StartUp Repair

Photobucket

The system will automatically restart. If required, you'll have to repeat the process 2 times.

If that doesn't help, use: http://www.sevenforums.com/tutorials/20864-mbr-restore-windows-7-master-boot-record.html

Now you'll be able to log in to windows.

Part 4: Installing Linux:

Use the method on http://www.linuxbsdos.com/2012/05/17/how-to-dual-boot-ubuntu-12-04-and-windows-7/ to safely install Ubuntu. You may have to select /dev/sda3 instead of /dev/sda2 in case you have a D: Drive


Thanks you for your patient reading. If any questions, put a comment below!