February 17, 2010

List Debian installed packages by size

dpkg-query -W --showformat='${Installed-Size;10}\t${Package}\n' | sort -k1,1n

size is KBytes

February 12, 2010

Fix Mic for Skype on T61 Ubuntu 9.10

# In Skype’s Options / Sound Devices, change “Sound In” to the raw hardware device; mine was “HDA Intel (hw:Intel:0)”, but it will take some experimentation and some test calls to figure out the correct setting. Do NOT set it to “pulse”; there is a known bug in Ubuntu’s implementation of PulseAudio that causes delays of many seconds on microphone input.

# Also in Skype’s Options / Sound Devices, set both “Sound Out” and “Ringing” to “pulse”.

# Also in Skype’s Options / Sound Devices, it may be necessary to uncheck “Allow Skype to automatically adjust my mixer levels”.

# Right click on the task bar’s volume control (the speaker icon), and select Open Volume Control. Hit the Preferences button, and add the following two controls: Capture (Recording) and Input Source (Options). Then in the Volume Control dialog, in the Recording tab, bring up the Capture level to near full, and in the Options tab, set the Input Source to Internal Mic. On Xubuntu (XFCE), use the Mixer, and "select controls", and make sure you select the two "Input"s.

This should fix it. No reboot needed. I think the last line is the actual fix.

February 11, 2010

Two steps to install bootloader on your USB key

You can also use this to boot into Ubuntu Wubi installation while having your windows in Hibernation!

Install MBR on the USB stick


On windows:
  1. download grubutil for windows then extract all and run grubinst_gui.exe
  2. Select from the menu 'Disk' and click 'Disk Refresh' then choose your usb device.
  3. Select 'Part List Refresh' and choose 'Whole Disk (MBR)'
  4. Click 'Install', and that's it.
On Linux:
- Download the source of grubinst from SourceForge http://downloads.sourceforge.net/gru...7&big_mirror=0
- Uncompress the zip file to some directory (in your home partition for example)
- Open a terminal
- Go to that directory
- Compile grubinst using
Code:
make -f Makefile.lnx
- Get the proper device name of you USB key. It is IMPORTANT you do not do mistakes here otherwise you will destroy you hard disk regular MBR. So for example, type
Code:
sudo fdisk -l
and try to see how is your USB key named. For example, mine is /dev/sdc
- In case we got wrong (2 precautions), we are going to save the MBR we will overwrite, so that we should be able to put it back if there was a problem. So type:
Code:
sudo ./grubinst --save-mbr=USB.mbr /dev/sdX
(replace X by the proper letter of your USB)
- Now the MBR of you key has been saved next to grusint program.
- We can now write Grub4DOS MBR to the key (always replace X by relevant letter):
Code:
sudo ./grubinst /dev/sdX


Install a bootloader on a USB stick

To install wubi loader:
- Copy wubildr to the root of your key, and rename it grldr
- Make a ubuntu directory to the root of your key
- From your harddrive, copy /ubuntu/winboot to the /ubuntu on the key, so that you usb key will have the directory /ubuntu/winboot.
done.

To install regular grub4dos:

  1. download latest grub4dos here: http://download.gna.org/grub4dos/ and extract grldr and menu.lst to your usb flashdrive top directory.
  2. edit menu.1st as you wish.

Helpful links:
1. http://it.dennyhalim.com/2009/02/install-grub4dos-make-usb-bootable-from.html
2. http://ubuntuforums.org/showpost.php?p=5966083&postcount=7

Enable Windows Vista Hibernation

run "cmd" as administrator, and run the following command:

powercfg /hibernate on

February 9, 2010

Merge PDF file, FREE and EASY, NO acrobat needed

  1. Downloand pdftk at http://www.accesspdf.com/pdftk/, unzip it and put the pdftk.exe to c:\windows\system32
  2. Open cmd window by go to "Start -> Run, type cmd"
  3. On Vista and Windows 7, do "cd %APPDATA%\Microsoft\Windows\SendTo", On Windows XP, do "cd c:\documents and settings\YOUR_UESER_ID\sendto"
  4. use notepad to create a text file named MERGE-PDF.bat with the following one line in the file: pdftk %1 %2 %3 %4 %5 %6 %7 %8 %9 cat output pdftk-output.pdf
  5. done.
Now to merge two or multiple pdf files, simply select them in Windows File Exploerer, and right click, then "send to -> MERGE-PDF.bat", the new merged file will be called "pdftk-output.pdf" in your folder.

Now where is my beer?