Mobil Mewah

Salah satu sumber Inspirasi.

Mobil Sport terbaik

Anda pasti bisa memilikinya.

Bermain dengan pesawat

Salah satu ide yang gila, Balapan di udara.

Bermain di angkasa

Apakah ini salah satu Goals dalam hidup anda? anda pasti bisa mencapainya

Showing posts with label Debian. Show all posts
Showing posts with label Debian. Show all posts

Tuesday, 2 December 2014

Lightweight Battery Monitoring in Debian

I use Fluxbox in my desktop laptop with Debian 7 OS. I need a battery status monitor which is easy to spot the battery status.

So i found this small application, xbattbar which can monitor battery status via acpi which many laptop support nowdays.

Just install and run it with the startup of the fluxbox.

To run it call the application with :

$xbattbar

To run with acpi :

$xbattbar -c

Here are some preview of my desktop. The green bar below is the battery status.

Xbattbar Status in desktop



Friday, 18 April 2014

The Best Compression available

When working with files, especially large files and need to be transfered over the network, one optimization can be done is with the file size. We can compress the file to the smallest size, but how small is small ?

So i look up for some comparison about the file compression to be used in linux system. For usual compression in linux, the compression used was .tar.gz or .tar.bz2 . I prefer use .tar.bz2 because better than .tar.gz .

But you know what, there are other compression that is better which is .rar and .7z .

I look for some data and got the comparison chart. You can see the chart below.
Surely the result is compelling, and look to use .7z . In linux there are 7zip package which called p7zip , in debian linux.

I also tested with my current file, which use bz2, and compress it using 7z, I got around 20Mb - 100 Mb more disk space with 7z compression, even with mp4 video files.

So more disk space left for storage when using 7z compression. No worries with the compatibility, because 7zip also available in any Operating System like linux, windows, MacOS.

Here are some how to use 7z compression.

To install :

$ sudo apt-get install p7zip-full

To compress :

$ 7za a big-bang-theory.7z  big-bang-theory/

To test compression :

$ 7za t big-bang-theory.7z

To uncompress :

$ 7za x big-bang-theory.7z

So happy Compressing.


Monday, 7 April 2014

Text To Speech in Linux Debian

Do you know that in linux, you can enjoy a good quality of text to speech application with good quality like the one available in Windows.

And just like other high quality open source software, these application are free to use.

The one i found out and used it is quite easy to use.

I will share it in here so you can benefit with the application.

First you need libreOffice, which will become the GUI. Neat right, because we usually use libreOffice to word processing office like apps.

Then we combine SVOX tools (pico) with LibreOffice.

To install in linux debian :

$sudo apt-get install libttspico0 libttspico-utils libttspico-utils 

And how to run the tts? well, we can use the LibreOffice extension.

Install the readtext extension of LibreOffice.

To install the readtext extension, just download the extension, then in LibreOffice, go to Tools - Extension Manager , and add the extension file.

After that you must reload LibreOffice. It will show up as a small smiling icon in the left side of the toolbar.


And to use it, just select the text, and click the readtext extension icon (a Happy face with a ballon) , a pop up will be shown, and setup the command line options to use PICO_READ_TEXT_PY .


Then you get a working text-to-speech system with the beauty of Open Source program.

Enjoy the text to speech system.

Tuesday, 1 April 2014

Debian linux Routing configuration

In Debian linux, i need to add some IP specific routing config. I have a default route for internet, and have other gateway for other services to access.

So i need to be able make the routing configuration is injected when the network services loaded.

How to do this are, in your /etc/network/interfaces add this :

auto eth0

iface eth0 inet static
  hwaddress 00:1b:24:b0:b7:8f
  address 192.168.113.109
  netmask 255.255.255.0
  broadcast 192.168.113.255
  gateway 192.168.113.224
  up route add -net 172.16.0.0 netmask 255.255.0.0 gw 192.168.113.204
  up route add -net 172.30.0.0 netmask 255.255.0.0 gw 192.168.113.205
  up route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.113.206
  up route add -net 10.0.0.0 netmask 255.255.0.0 gw 192.168.113.104


So the result are like this :

Default traffic going to 192.168.113.224 , and traffic going to network 172.16.x.x going through gateway 192.168.113.204 , and same rule apply to the next network destination.

You can add more route according your needs.



Sunday, 26 January 2014

Resize LVM partition in Debian Linux

I have my Lenovo T430 laptop with Debian Wheezy installed. My setup was a root partition / with 5Gb size, and 70Gb /home partition.  I use Fluxbox desktop in my laptop and happy with the customization i can do.

The problem now is the root partition is getting full as the application installed under root partition. So i need to extend the size. Lucky i use LVM in linux. so i can just resize it. Always keep your installation CD because it is needed now.

Some step i make i documented here so i can refer back to the procedure. here we go the step i was done :

1. Boot using the install CD.
2. Choose advanced - rescue mode
3. Do not select any mount partition, use installation shell mode.
4. Scan the pv using pvscan , then lvscan until you see your LVM partition on disk.
5. Now we got the lvm partition, in my case /dev/HG/root . Then do vgchange -ay.
6. Before resize, do disk checking by e2fsck -f /dev/HG/root
7. Because i want to extend the lvm size do : lvextend -L +5G /dev/HG/root
8. Then we extend the partition : resize2fs -p /dev/HG/root  

Let say we want to reduce the root partition from 5G to 4G, we do the same step until step 7.
If we want to reduce the step different from step 7 which is :
7. Because want to reduce, we reduce the partition first :
     resize2fs /dev/HG/root 3G
8. Then we reduce the lvm partition :
    lvreduce -L 4G /dev/HG/root
9. Then we make the Fs use all the lvm partition prepared :
    resize2fs /dev/HG/root

Well this was my experience with LVM partition resize and extend.

Thanks for reading and hope its helpful to others.

Tuesday, 21 January 2014

Install Node JS in Debian Squeeze

Using my debian 6.0 squeeze, i need to set node js machine.

Debian Squeeze currently don't have any package for node js. So we need to install it manually using the source code.

The node version are v0.10.24 , you can download from www.nodejs.org the source code.

The to prepare the compilation make sure you have the curl package, openssl and SSL lib.

$ sudo apt-get install curl openssl libssl-dev

Then start install node js :

$ sudo ./configure --openssl-libpath=/usr/lib/ssl
$ sudo make
$ sudo make test
$ sudo make install

$node -v  

You will get the node version. And start install node package using NPM, which is included in the source and installed already.


Twitter Delicious Facebook Digg Stumbleupon Favorites More