Monthly Archives: May 2013

Bluetooth mouse on Tiny Core Linux

Here is how I connect my bluetooth mouse on Tiny Core Linux:

1. From “Apps” install “bluez”, “dbus”, “python”, “dbus-python-2.7” and “pygobject-2.7”:

bluez

dbus

python

dbus-python

pygobject

2. Check local bluetooth device:

hcitool dev

hcitooldev

3. Press button to make the mouse discoverable and type:

hcitool scan

hcitoolscan

4. Check if we can create connection to the mouse:

sudo hidd --connect 00:02:76:16:14:5C

5. Now we should get connection to the mouse, but we want to automate the connection. Using “simple-agent” we create a new device for the mouse. PIN Code is 0000.

simple-agent hci0 00:02:76:16:14:5C

simple-agent

6. Make the mouse “Trusted”:

dbus-send --system --type=method_call --print-reply --dest=org.bluez "/org/bluez/4506/hci0/dev_00_02_76_16_14_5C" org.bluez.Device.SetProperty string:Trusted variant:boolean:true

dbus-send

After step 6, please check to make sure that file “trusts” in the device folder exists and mouse address is written in that file. This is important for the automatic connection.

7. At this point if the mouse has lost connection it should be reconnected automatically (for example turn the mouse off and turn it on again). Next step is to make this connection persistent across boots. Install “squashfs-tools-4.x” if it’s not already installed:

squashfs-tools

8. Create device folder for mybluetooth extension:

mkdir mybluetooth
mkdir mybluetooth/var
mkdir mybluetooth/var/lib
mkdir mybluetooth/var/lib/bluetooth

9. Copy folder 00:15:83:12:3E:23 and its content to mybluetooth folder:

cp -R /var/lib/bluetooth/00\:15\:83\:12\:3E\:23/ mybluetooth/var/lib/bluetooth/.

10. Create “mybluetooth” extension:

mksquashfs mybluetooth mybluetooth.tcz

11. Copy extension to tce folder:

cp mybluetooth.tcz /mnt/sda1/tce/optional/.

12. Edit onboot.lst file:

echo mybluetooth.tcz >> /mnt/sda1/tce/onboot.lst

13. Now bluetooth mouse should automatically connected to Tiny Core Linux at boot time. Happy bluetoothing!

Update Firefox 17 esr on Tiny Core Linux

If you install Firefox 17 from “Apps”, you can see that firefox version is not the current version from mozilla.

firefox17appsAnd if you use that version, you’ll get annoying pop-up window saying that you need to update your firefox. Fortunately, it is easy to update firefox in Tiny Core Linux. Here is what I have done:

1. Download the current firefox version (in this example version 17.0.6):

wget ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/17.0.6esr/linux-i686/en-US/firefox-17.0.6esr.tar.bz2

2. Extract the newly downloaded firefox:

tar xjvf firefox-17.0.6.esr.tar.bz2

3. Move the original firefox tcz file to the current directory:

mv /mnt/sda1/tce/optional/firefox17.tcz .

4. Extract the tcz file:

unsquashfs firefox17.tcz

5. Delete all of the files and directories under “squashfs-root/usr/local/firefox17”:

sudo rm -R squashfs-root/usr/local/firefox17/*

6. Move all the files and directories in firefox folder:

mv firefox/* squashfs-root/usr/local/firefox17/.

7. Rename folder “squashfs-root” to “firefox17”:

mv squashfs-root firefox17

8. Create firefox17.tcz file:

mksquashfs firefox17 firefox17.tcz

9. Move the newly created tcz file to tce folder:

mv firefox17.tcz /mnt/sda1/tce/optional/.

10. Don’t forget to delete firefox folders:

rmdir firefox
sudo rm -R firefox17

11. Update the md5 checksum file:

cd /mnt/sda1/tce/optional
md5sum firefox17.tcz > firefox17.tcz.md5.txt

12. Restart computer, open firefox and check the version.

firefox17version

13. Enjoy!

Set or change mp3 Tag on Linux

Some time ago I was asked by a friend of how to change the information of mp3 file. After a little bit of googling, I found a tool called “id3tool” in debian squeeze. To use it just install using apt:

apt-get install id3tool

To see the functionality of this tool, just type:

id3tool -h

id3tool

Happy Tagging!

CD burning from command line

This is how I burn ISO image using command line on Debian Squeeze:

1. Install “wodim” if it’s not already installed:

apt-get install wodim

2. Check available device:

wodim --devices

wodim_devices

3. Burn ISO image (in this example CorePlus-4.7.7.iso from folder Downloads):

wodim -v dev=/dev/scd0 Downloads/CorePlus-4.7.7.iso

screenshot-20130520@043532

4. That’s it. Happy CD burning!

Install flash player on Tiny Core Linux

Here is how I install flash player on Tiny Core Linux:

1. Download Adobe Flash Player version 11.1.102.63 from Macromedia archive server:

wget http://fpdownload.macromedia.com/get/flashplayer/installers/archive/fp_11.1.102.63_archive.zip

2. Extract the downloaded file:

unzip fp_11.1.102.63_archive.zip

3. Create directories:

mkdir myflash
mkdir myflash/usr
mkdir myflash/usr/local
mkdir myflash/usr/local/firefox-official
mkdir myflash/usr/local/firefox-official/plugins

4. Copy “libflashplayer.so” to “plugins” directory:

cp fp_11.1.102.63_archive/11_1r102_63_32bit/libflashplayer.so myflash/usr/local/firefox-official/plugins/.

5. Install “squashfs-tools-4.x.tcz” using “Apps”:

squashfs-tools

6. Create “myflash.tcz” extension:

mksquashfs myflash myflash.tcz

7. Copy “myflash.tcz” into tce directory:

cp myflash.tcz /mnt/sda1/tce/optional/.

8. Append “myflash.tcz” in “onboot.lst” file:

echo myflash.tcz >> /mnt/sda1/tce/onboot.lst

9. Restart computer, start Firefox and open a website with flash.

flashplayer

10. Enjoy!

LTSP Client

Here are some pictures of LTSP client that I have built for demonstration purpose. It has AMD Athlon 1000MHz processor, 128MB RAM and doesn’t have any drive at all.100_1749100_1745 100_1746 100_1752 100_1754

Ignition Booster

Some time ago I built an ignition booster for gasoline engine which gives very big sparks. It uses simple components and performs better than “Crane-Cams” or “MSD”. I think this kind of booster is very promising in drag racing scene.

Here is the normal sparks from ignition coil:

100_1596

Here is the beginning of sparks with ignition booster on:

100_1594

Here is the big ball of plasma:

100_1595

This is the installation on my car:

100_1572

And here is the result of ca. 300 km driving with booster on:

100_1600

Compare to a new spark plug:

100_1604

Rename multiple files on Linux

“rename” is a very handy tool that we can use to rename multiple files on Linux. To change all upper case filenames to lower case just use:

rename 'y/A-Z/a-z/' *

To change filename img_0001.jpg .. img_XXXX.jpg to Urlaub_0001.jpg .. Urlaub_XXXX.jpg just do:

rename 's/^/Urlaub/' img*

To display the manual just type:

man rename

For more “rename” information click here.

TeamViewer on Linux

Here’s how I install TeamViewer on Debian Squeeze.

1. In shell console, type:

wget http://download.teamviewer.com/download/teamviewer_linux.deb

teamviewer1

2. Then install it using:

sudo dpkg -i teamviewer_linux.deb

3. And start TeamViewer from start menu.

teamviewer2

4. Enjoy!

Resize multiple image on Linux

I think we all know how to resize image or photo. But this job can be very tedious if we want to resize multiple photos, say hundreds of photos.

Fortunately it is very easy to do this kind of thing in Linux. I will show you how to do it on Debian Squeeze.

First install “imagemagick”:

sudo apt-get install imagemagick

And then go to photo’s folder (for example: ~/Bilder):

cd ~/Bilder

If you want to resize all the image width to 800 pixel and keep the aspect ratio just do:

mogrify -resize 800 *.jpg

If you want to set new aspect ratio (for example 800×600 pixel):

mogrify -resize 800x600! *.jpg

That’s it!