Thursday, September 9, 2010

Record sound playing on the computer

Such a perfect timing, I was exactly looking for how to record sound playing on the computer. I tried gnome-sound-recorder, but it didn't show sound input drop-down, so all I can record was from the internal mic. Not anymore! I found the information at Ubuntu Weekly Recipe 技術評論社: "第137回 PulseAudioを活用する". The solution is using PulseAudio.

Steps:
1. Install pavucontrol. (aptitude or synaptics) This is GUI PulseAudio volume control frontend.
2. Run gnome-sound-recorder.
3. Push the record button. Now go to pavucontrol, and see the Playback tab. You will see "Record stream from". Choose "Monitor from analog stereo" from the drop-down menu on the right.
4. Good to go!
PulseAudio Volume ControlでのRecording tab (image from the same page)
図2 PulseAudio Volume ControlでのRecordingタブ

Install Epson GT-S620 scanner driver

from Ubuntu Weekly Recipe:第125回 Simple ScanとXournalで電子書類を扱う|gihyo.jp … 技術評論社: "GT-S620を接続する":

SANEプロジェクトのページを見るとわかるように,GT-S620はAVASYSが公開しているドライバを別途インストールしておく必要があります。しかし,GT-S620は一般ユーザ権限でデバイスを使用することができません。これはAVASYSのドライバがサポートしているスキャナが接続された場合に,/lib/udev/rules.d/40-iscan.rulesの中で,以下の設定がなされることに起因します。
ENV{iscan_matched}="yes"
通常のlibsaneがサポートしているスキャナであれば,/lib/udev/rules.d/40-libsane.rulesの中で以下の設定がなされます。
ENV{libsane_matched}="yes"
iscan_matchedとlibsane_matchedの違いがどこに影響するかというと,/lib/udev/rules.d/70-acl.rulesの中の以下の部分です。
# USB scanners
ENV{libsane_matched}=="yes", ENV{ACL_MANAGE}="1"
このように,libsane_matchedがyesになっていればACL_MANAGEが1になり,結果として /dev 以下に作成されるキャラクタスペシャルファイルに一般ユーザでアクセスができるのですが,AVASYSのドライバによって認識されたスキャナはこの部分にマッチしないため,一般ユーザでの使用ができなくなっています。そこで上記該当部分に
ENV{iscan_matched}=="yes", ENV{ACL_MANAGE}="1"
などと追記することで,一般ユーザ権限でAVASYSのドライバを経由したスキャンが可能になります。

Upgrade / Downgrade your Dell Bios On Ubuntu by bigbrovar

A very simple guide to Dell laptop Bios upgrade from:
Upgrade / Downgrade your Dell Bios On Ubuntu by bigbrovar

Updating or Downgrading your Bios is pretty straight forward on Ubuntu. Ok maybe not as straight forward as double clinking to install. But not that difficult all the same.

for this guide we will be using the commandline. But that should not scare you, i have tried to make the guide as easy as possible. first we open Terminal/Application/Accessories/Terminal
Now since we will be running every command as root(as administrator), we sould need to become an admin. so that we wont need to been adding sudo infront of every command. so first copy and paste this in terminal

sudo bash
hit enter and give your passwd.
you will see your prompts change from
this :~$ to :~#
Then we need to install Libsmbios a linux package in the Ubuntu repositories.
apt-get install libsmbios-bin
once installed we need to get the system ID to get hat run this in terminal
getSystemId
you should get an output that looks like this
System ID: 0x0209
Service Tag: 4MV9HH1
Express Service Code: 10089895861
Product Name: XPS M1330
BIOS Version: A14
Vendor: Dell Inc.
Is Dell: 1
from the above output my system ID is 0×0209. Armed with this information you now need to get the BIOS version want to upgrade / downgrade. you can get it from here.http://linux.dell.com/repo/firmware/bios-hdrs
Scroll down the list to find a directory matching the System ID from the previous step. and look for the bios version that you want to upgrade/downgrade to In my case my directory is named: system_bios_ven_0x1028_dev_0x0209_version_a14/ my system ID IS0×0209 and the version of bios i wanted was A14.
Go into this directory and download the file, “bios.hdr” and save it in your desktop.
Now we load the load the dell_rbu driver
modprobe dell_rbu
For Updating
now to update the bios we move into the directory were we saved the bios.hdr file. if you saved it in your desktop. just do this
cd $HOME/Desktop
PLEASE MAKE SURE YOUR SYSTEM IS PLUGGED TO A POWER SOURCE AND NOT ON BATTERY.
Then we run the update command.
dellBiosUpdate -u -f ./bios.hdr
if all goes well you would see the following feedback
Supported RBU type for this system: (MONOLITHIC)
Using RBU v2 driver. Initializing Driver.
Setting RBU type in v2 driver to: MONOLITHIC
Prep driver for data load.
Writing RBU data (4096bytes/dot): ............................
..............................................................
.......................
Notify driver data is finished.
Activate CMOS bit to notify BIOS that update is ready on next boot.
Update staged sucessfully. BIOS update will occur on next reboot.

I also found this on linux.dell.com troubleshooting page:
make sure to do a soft reboot (not a power-cycle) after the update (shutdown -r 0)
Also, in my case, the upgrading message was very simple. It worked just fine anyway. (from A12 to A17)




If you are Downgrading
for downgrading to a previous BIOS version.
your downgrade command would be
dellBiosUpdate --override_bios_version -u -f ./bios.hdr
Now that you are done updating /downgrading
we would need to tell the system to do a cold reboot which is what is needed after doing a bios update.
to do this we would need to edit the kernel line in your menu.lst
run this in terminal
gksu gedit /boot/grub/menu.lst
look for the kernel line
title Ubuntu 8.10, kernel 2.6.27-9-generic
uuid f5e0a891-61ec-434a-b935-78bc25b1542e
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=f5e0a891-61ec-434a-b935-78bc25b1542e ro quiet splash
initrd /boot/initrd.img-2.6.27-9-generic
and add reboot=bios to the end of the kernel line to look like this
title Ubuntu 8.10, kernel 2.6.27-9-generic
uuid f5e0a891-61ec-434a-b935-78bc25b1542e
kernel /boot/vmlinuz-2.6.27-9-generic root=UUID=f5e0a891-61ec-434a-b935-78bc25b1542e ro quietreboot=bios splash
initrd /boot/initrd.img-2.6.27-9-generic
save and close the text editor
now you can reboot your machine
once the system restart it would display a white screen which some messages displaying what its doing. and your bios boot splash might take a while. but that is fine.
once restarted. be sure to remove the “reboot=bios” from your kernel line.


I haven't yet tried downgrading.

Thursday, September 2, 2010

Mount and Unmount ISO images

In the basic setting, ubuntu can browse iso files, but it doesn't mount them under /media. This can be a problem when install softwares, especially under wine. The following is quoted:

I am taking this tip from here first you need to download two scripts for mount iso images download from here for unmount iso images download from here

Once you have these two scripts you need to change the permissions using the following commands

sudo chmod +x /home/username/mount.sh

sudo chmod +x /home/username/unmount.sh

Now you need to copy them nautilus scripts

sudo mv /home/username/mount.sh ~/.gnome2/nautilus-scripts/

sudo mv /home/username/unmount.sh ~/.gnome2/nautilus-scripts/

That’s it now you are ready for mounting and unmounting your ISO images.

from Debian Admin

Then use script context menu in nautilus. If you have an error message, check your file name and folder names where your file is set. Make sure there is no space in the names!