Aario's blog about life and technology


Internet Connection Sharing on Kubuntu 11.04

Guys, This is the easiest how to:

I have one DSL modem and some computers connected together trough a HUB Switch. One of the computers with some some IP address connects to Internet trough DSL modem. For some reasons it uses pppoeconf for configuring and using DSL connection. It’s connected to HUB Switch using eth0 as ethernet card and with some static IP address.

By the way, I downloaded a package called ipmasq which had been removed from Ubuntu 11.04 synaptic repositories from here. After installing it using GDebi and by double clicking on it and entering my password, I ran these commands:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE

echo 1 > /proc/sys/net/ipv4/ip_forward

apt-get install dnsmasq

/etc/init.d/dnsmasq restart

dpkg-reconfigure ipmasq

Here I selected default answer for all questions, except that in the last question told it to bring it up after all network services started. Then:

iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
echo 1 > /proc/sys/net/ipv4/ip_forward
nano /etc/sysctl.conf

It opened some editor in terminal, and there I found a line like:


And removed the “#” sign at beginning of it to uncomment it. Saved the file with Ctrl+O and exited using Ctrl+X. Then simply rebooted my PC. After that, whenever this computer is connected to internet, others can connect as well using its IP as their DNS and Gateway address. Any question?

PS: And here is my desktop with Kubuntu 11.04

Eclipse SQl Explorer, Oracle 11g and Kubuntu 11.04

Hi Guys,
This is my long story about how I managed to connect my Kubuntu 11.04 to Oracle SQL to work with those tables in Oracle Database Server in our office. For accessing tables in the database and working with SQL queries, first I searched appdb.winehq.org to see whether TOAD is working on wine or not (As you may know, TOAD is a Tool for Oracle Advanced Database and Wine is a compatibility layer which enables Linux users run Windows applications). But I figured out that TOAD is not fully compatible with wine because all the scores there was gold or silver. Not platinium.
Then I decided to run Tora. An open-source alternative to TOAD. Tora for Kubuntu 11.04 won’t support Oracle. It’s only for mysql (And God knows how many hours I spend to try all ways of getting it to work with oracle but no success!).
Then I headed for SQL Explorer. But it needs several dependencies to run. As it needs oracle to connect to SQL databases, I downloaded these three packages:

  • oracle-instantclient11.2-basiclite-
  • oracle-instantclient11.2-devel-
  • oracle-instantclient11.2-sqlplus-

For links, I searched the first name in google, and it took me to Oracle Client download page. In the opened page I searched names and I found links to download them. But downloading them was another story!
Oracle site asked me for accepting the term mentioned above of the download links page to be able to click on links themselves! Then it requested me a user name and password. Scince I do not have it, I tried to create one. It lead me to a form with several fields from my first name and last name to what my coligoues use to call me during launch in office! 😀 Unfurtunately some of combo lists in that form wasn’t compatible with linux. I mean in Firefox and Chromium I wan’t able to open them to select from. Thus I aksed the good guys in http://www.bugmenot.com to provide me a user name and password to download from http://www.oracle.com. Their first password worked just like a charm! 😀
After I went back to the oracle site I mentioned above and downloaded those three packages, I put them all in one folder (You say oracleclient), opened a terminal window and went to the folder and typed:

sudo su
apt-get install alien
alien -i oracle-instantclient11.2-*.rpm

It took a while for it to install them all. Then I ran:

apt-get install sun-java6-jre

Remember that the default-jre package which install open-source jre has problems with combo-boxes in SQLExplorer windows and that the program crashed several times with it for me. I prefered to install the sun proprietary version.
I downloaded SQL Explorer v3.6.1 from here. Then I extracted the downloaded the .tgz file to /opt/SQLExplorer. The folder which I created myself (You need to know how to create and extract into a system folder with root permissions).
The I just clicked and ran the sqlexplorer file in the extraction folder. And it started working.

For cunnecting to the database I clicked on Create new connection profil button on top left corner of work-space and it opened a new window.

In opened window I entered a name for the new connection. The combo-box there didn’t contain the work Oracle in it’s list. So to add the Oracle as a driver for this multi-purpose SQL software, I clicked on Add/Edit Drivers button. It opened a new window.
In the new window, on left column, I double clicked SQL Explorer and then JDBC Drivers under in. It opened a long list on right. For the first time, the work Oracle Thin Driver was with a x sign beffore it. So it was disabled. The only enabled option was JDBC ODBC Bridge. So I selected the Oracle Thin Driver and clicked on Edit button. It opened a new window.
In the new window, I went to Extra Class Path tab. Clicked on Add Jars and from the opened dialoge I searched the path “/usr/lib/oracle/11.2/client/lib” for “ojdbc6.jar” file and opened it. Then clicked on List Drivers and after many seconds it filled the Drvier Class Name edit box automatically with “oracle.jdbc.OracleDriver” (Actually I don’t think you can enter this text by hand. You must find the driver files installed by the rpm packages I told you about and then it will automatically fill that box for you). Then I clicked on Ok. On the window opened in background the Item Oracle Thin Driver was now with a tick before it just like in screen shot. So I selected it and clicked Ok. Back in the first window, I selected the Oracle Thin Driver from the Driver combo-box and it filled the URL edit box automatically with:


I entered IP address of our Oracle Database server in office as <server>. I held the port to 1521. I entered the TNS Name for <database_name>. Selected Auto Login and Entered my user name and password. And Finally I clicked Ok.
In the Connections List on left column I could see my created connection. So I Opened it and after a while it connected to the database. Hiewwwwwwwwwwh!;)
That wasn’t as easy as this. Actually I tried several ways to get it work for many hours! here I’m just told you the final solution.

Have a nice day and don’t hesitate to tell me about your opinions and questions in comments:)

Problems contributing to the Linux

I’m an Electronic engineer. I did several embedded projects with hardware and software interworking. So, I am somehow experienced in programming. I also had several projects in Windows in Delphi language. As I became familiar with Linux, it was always one of my wishes to contribute in this huge project. I even wrote some open source projects myself. Which are stored in Sourceforge.net site (autoppp, blackwar and jalaliapplet).
Actually I have some problems contributing to already started projects. To describe you my problems, I bring here Blur effect in KDE as an example and If you know answers of my questions, please do not hesitate to leave me a comment how to solve my problems.
Recently I installed Kubuntu 11.04 with KDE 4.6 on my laptop. Blur effect is enabled on Panel as is working there without any problem. But the problem is that transparent windows are not blurred. The scenario is always like this:

  • I searched Internet forums to find a solution for this problem. No joy.
  • I searched bug reports to find a solution for this problem. No joy.
  • I now want to go to KDE website to find out how can I contribute to this project because I want to solve this problem myself. Regardless of long texts about how to pay donations or introducing KDE to friends(!), It’s a little hard to find how to start developing the code.

I want to know:

  1. Which source codes I must download to solve my problem with blue effect as I described above. How can I find which source file or which group of source files I must work on?
  2. Which packages I need to download and Install to be able to compile the sources I downloaded?
  3. After compiling the source code how can I installed the compiled code on my system?
  4. How can I uninstall it to bring my system back to the previously installed KED?
  5. What is SVN?

Thanks a lot people:)

How to install ATI Catalyst Driver 11.6 on Ubuntu Linux 11.04 Natty Narwal

Finally I installed ati catalyst 11.6 on my Ubuntu 11.04. I just want to tell you how to install this thingy. Because it’s very tricky!
First of all, spend several days to download it! Because every time I tried the link seemed to be broken and suddenly it worked and I was able to download it with my firefox browser.

They I copied it into my root home folder /root.After that, I used commands below to install it:

sudo su
cd ~
apt-get install debhelper devscripts execstack dh-modaliases
chmod +x ./ati-driver-installer-11-6-x86.x86_64.run
Do you agree with the license? [Y/n] Y
Please enter the installation path [/] (Just hit enter here)
Option: ‘RedHat Packages’ ? [Y/n] n
Option: ‘SuSE Packages’ ? [N/y] N
Option: ‘Build package for detected OS: Ubuntu/natty’ ? [N/y] y

dpkg -i *.deb

That was all. Remember that I spend several minutes running the installer, answering questions, seeing it’s error message, reading it’s log file, understanding that some command is not found, finding related package, installing it using apt-get, and running the installer again and again! What can I say to AMD developers? :-w

Evite ETV-7131 TV & Video Capture Card on 10.04

I recently bought an Evite ETV-7131 TV & Video Capture card based on Philips 7130 Chipset. The card wasn’t working on Windows 7 with it’s provided Windows Vista driver. I mean the quality was too bad (I needed to fine tune a lot of brightness and contrast controls in the provided software with the driver to see the picture) and it used to crash and thus restart the whole system every 5 to 10 minutes!
On Linux (Ubuntu 10.04) it detected but the dmesg output, the saa7134 module told me that it can’t detect the card number automatically and suggested me to select a card number from a list it contained in its output.
I ran:

sudo su

rmmod saa7134_alsa
rmmod saa7134
modprobe saa7134 card=17
modprobe saa7134_alsa card=17

It’s a little hard to me to describe you how I selected the number 17 but anyway, for making those two last commands permanently, run:

nano /etc/modprobe.d/alsa-base.conf

Find the line “options saa7134-alsa index=-2” and if you sure that it isn’t exist, add one, then change it to:

options saa7134-alsa card=17 index=-2

Also add the line below before previous line:

options saa7134 card=17

Close file using Ctrl+O then Enter, then Ctrl+X and install tvtime using:

aptget install tvtime

I then restarted my system completely. Ran tvtime, right-clicked on the black screen of tvtime and from Input Cofiguration menu selected “Change Video Source” to Television to see the Video Input! (I don’t know why but Television works as Video Input and Video works as the Television!). Also disabled Audo-detect signal or something somewhere in menus! This will force tvtime to show input signal whatever it is.
Powered on my satellite receiver (You say any kind of video player device) and it was all there!

What if Linux won’t support your main chipset?

My previous post was about Ubuntu support on ACER 5536 laptop. I asked a question about this on linuxquestions.org . By assuming you may have the same problem and want to see if anyone understands your feeling or you may have had a solution for this problem, and If you don’t want to make your feet wet by visiting the link, I brought my question here:

Hi everyone,
I have an ACER 5536 laptop with an AMD Radeon HD3200 graphic and mainboard M780G chipset.
I have drivers for GPU and main chipset (Sata bridge SB700, USB filter, etc.) for windows. But only have GPU driver for Linux.
On windows 7 and Linux if I don’t install provided driver by ACER site or AMD site, mainboard chipset and GPU gets hot. But by installing drivers not.
Also USB port won’t provide current more than 100mA (It won’t enumerate high power consumption USB devices like external hard-drives) without installing chipset driver for USB filter chip. So I realized that although I get my laptop working under Ubuntu or Windows, it won’t work good without installing all drivers. The problem is that there’s no chipset driver anywhere for working under linux. Proprietary drivers are all for windows except little graphic, audio, wireless drivers for Linux.
I also have the same problem with my desktop. The MSI K9n Neo V2 main board with NVIDIA nForce 520 chipset won’t enumerate High power USB devices under linux.
Are there any solutions for this problem?

ACER 5536 Ubuntu support

I’ve got bad days with my laptop. Last year I bought an ACER 5536 with a fancy dancy Windows Vista installed on it. Erased all data, Installed Ubuntu 9.10 and Windows 7 Ultimate on it in dual boot mode.
Windows 7 supported hardware good. without any driver required.
Ubuntu supported hardware good. without any driver required. Except the fact that it didn’t support the built-in dial-up modem.
But after months, I realized that good is not enough!
CPU and GPU temperatures were high on both Ubuntu and Windows. Also Hard-drive temperature was too high. It doesn’t matter what is the hardware specification of my laptop. All I want to write here, is the quality of support from hardware vendors in this situation. I first cleaned all heat-sinks and the whole main-board using compressed wind. Cleaned all old silicon paste and replaced them with some fresh. No changes at all!
After months of working hard to find a solution, I opened the case of my laptop again, and find out, on Acer 5536, the South Bridge Chip-set is installed above hard-drive. This is a chip-set needed to access hard-drive from operating system. I don’t know if it has other applications, but it had no fan on it, and no connection to the laptops main fan. All it had was a piece of metal plate beneath keyboard ruling as a heat-sing to it. Designing laptop this way caused south bridge and Hard-drive to heat each other! It’s ridiculous.
Although that droved me to a more ridiculous situation, that wasn’t the solution. I tried to completely change design of my laptop. Completely detached hard-drive. Inserted a 16GB flash-memory into card-reader slot. And installed a new fresh Ubuntu 10.10 on it. Installed my hard-drive in a Samsung external hard-drive box and thus, converted it to a USB external hard-drive.
This way, I lost access to my Windows 7 Ultimate, and I needed to plug in my External hard-drive box into my laptop whenever I needed to read some of my documents. Which caused a huge pain in my as*! But that was not all!
I noticed that the Samsung External HDD box sometimes worked and sometimes not! Went to hardware store I bought the box from, and said to him angrily that I need a new box. This isn’t work! He just tried the box with his own computer and we both seen that HDD box is working on his computer under Windows 7 and it’s not working on mine! He suggested me to try this under windows 7. He also suggested me to Install all propriety drivers provided by ACER on Windows 7. I did. I brought back my HDD into my laptop, and installed all drivers for Windows 7 Ultimate.
Now my windows was cool and quiet. All temperatures went down to 38-39 degrees.
I tried to find drivers for my Ubuntu. ACER do not provide any drivers for Linux at all! AMD on the other hand, provides only a driver for the VGA. It installs the GPU driver which causes the CPU and GPU temperatures reduce from 60 and 70 to 40 and 50. And reduces power consumption from 30 to 40 down to 15 to 25! It increased duration of my laptop battery under Linux up to 3 hours which is equal to that on Windows 7 with all drivers installed. But:
The south bridge AHCI and IDE controller drivers are still not provided by AMD. ACER uses AMD M780G chip-set on it’s main-board, and neither ACER nor AMD provides any driver for this. Thus my Hard-Drive temperature is still hot under Linux up to 62 degrees, in spite of the fact that it is 38 to 50 degrees on Windows 7 depending on HDD usage.
Also there is a USB driver for Windows 7 provided by ACER which enables operating system to allocate more than 100mA current to external USB drives like my Samsung HDD BOX enables power hungry devices to work flawlessly which is in fact unavailable for Linux.
Install all provided drivers for your operating system. And forget about running Linux on your laptop unless you can find a laptop producer which pays attention to the right of software freedom.
I will find another laptop maybe with a Linux preinstalled on it. Anyone knows one?

How I corrected page size in Altium Designer Smart PDF?

Yes, I’m using Altium Designer 2008 to create PCB files. And hell yes! I’m using that damned Windows Xp as a virtual machine just to bring this software up ‘n running;)
Whenever I try to create a PDF file of PCB project using Altium Designer’s Smart PDF option, It creates an ugly pdf file with stretched/skewed pages not in real actual size. Fonts are nasty and characters are hard to read. So I decided to solve this problem. Here’s the HOW-TO:
First of all I searched all over Internet and found nothing.
Then created a smart PDF using Altium Designer and let it to create a .OutputJob file and open it.
In the opened OutputJob file on right column right clicked on PDF and selected PDF Setup from drop down menu.
In “Schematic Page size and orientation” selected “Page Setup Dialog”. Selected same option for “Schematic Page size and orientation”.
Clicked OK and the horrible stretch and skew ended here! hiewhhhhhh!

Change page size for schematic and PCB

>How to pimp your Ubuntu?

>(Please listen to my podcast)
This episode I will talk about how to make your ubuntu looks better than commercial Operating systems like Windows Seven or even Mac OSX.
If you transfered from windows to Linux, You may see your new operating system more secure and powerfull than in windows, but you have one more step to enjoy the freedom of open source softwares:
Pimping your linux distro

3D Workspace
If you’ve seen Mac OSX before, you may seen that beautiful dock under the screen, and those seperate workspaces which you can move windows across them. Also I you’ve worked with Windows Vista or Seven, you may seen 3D windows when switching windows with Win+Tab keys. What if your linux has this eyecandys together with its security? Linux Can be even more beautiful that Windows or Mac. There are a lot of pimping eyecandy in Compiz Project which makes your linux PC just like those computers in Sci-Fi movies.

What is Compiz?
Compiz is such a composite window manager. As I know, Compiz is a library of codes that makes your current workspace (Gnome, KDE or XFCE) 3D and with more effects and options like fading windows, scaling windows near each other to select one of them, 3D rotate your windows to switch between them, and so on. If you are interested in installing compiz, Let’s assume that you have Ubuntu, because I have ubuntu myself and I know that compiz is already accessible in Ubuntu and Ubuntu based linux distros in Synaptic Package manager. But first of all you must make sure that your graphic driver supports 3D accelerated graphics.

How to activate your graphic driver in ubuntu?
You may have a powerful graphic card, but not have the appropriate driver for it. The easies way to install graphic driver and compiz together is to right click on your desktop, select “Change desktop background”, and go to Visual Effects tab page. Click and select Extra. After many seconds it asks you to download and install properietry drivers and after restarting your system you can sense changes to your system appearence. For example windows are elastic and shaking when you move them by mouse. Or desktop will move smoothly when you change active workspace with workspace switcher applet on gnome panel.

How to install Compiz config settings manager?
If you are familiar with synaptic package manager then you may install compiz-config-settings-manager package via it. This is a graphical user interface lets you customize whole behavior of compiz 3D effects on your system. As you can see on the image on left, There are a lot of options which guides you to several pages where you can set-up and disable or enable individual visual effects like 3D and Rotation of desktops. Below you can see some effects which may be disabled by default but you can enable the trough Compiz-Config-Settings-Manager (CCSM). CCSM is accessible from System\Preferences\Compiz-Config-Settings-Manager Item in main menu.

How to install and activate Emerald?
But there is also some other thing you need to have to make your linux event better than MAC or Windows Seven. If you want semi-transparent title bars just like in Vista or Seven, without the risk of being infected by dummy windows viruses, you don’t need to install windows! You just need to install Emerald. Install it the same way you installed CCSM. Open emerald from System\Preferences\Emerald item in main menu. There you may see a default theme or nothing. By the way you can download and a lot of themes from “Compiz” section of http://www.gnome-look.org website and import downloaded theme into emerald window by clicking on “Import” button. You can also modify each theme the way you like by navigating other pages in Emerald window.
After all you may notice that even by importing and selecting a theme in emerald window, Nothing changes. This is because of the fact that gtk has taken control of window title-bars in you system. You must replace it with your emerald themes by running this command:
emerald –replace
You can run commands by pressing Alt+F2 key on your keyboard.
How to install Avant Window Navigator?

Just one more thing. You can install a fancy dock more beautiful than the one in Mac OSX. How? By installing avant-window-navigator package trough synaptic. Avant Window Navigator is a python based dock application which has several applets to add to your panel and several appearance effects to for example turn your dock in 3 dimmensions or make your dock semitransparent. As you can see in avant project home page wiki.awn-project.org/Installation, you may install trunk packages or universe packages for your ubuntu distro. Universe packages is the packages which are in Ubuntu Synaptic repositories by default, but you may add other repositories from other project sites to always have more updated packages in your system.
If you want the more updated avant (And also more beautiful one), you can add trunk repositories of this package into your repositories. You can find address of those repositories in avant official project site. Also you can find how to add repositories to your ubuntu distro by searching internet. And I guess I have not enough time to explain it all just in this post!
And about widgets on your desktop like an analoge clock or a weather monitor, well you may install screenlets package via synaptic and use it as well. Maybe I will write another how to about that later. 
But untill that day, you can see an screenshot of my PC desktop with ubuntu, compiz,emerald, and Avant.

So happy pimping! Come back soon and don’t forget to comment me.

>Why I like ubuntu?

>(Please listen to my pod cast).
Hi every body. This is ArioLogs Pod cast #1. The pod casting of Ario’s personal blog “ArioLogs.blogspot.com”.
There are several Linux distributions and other open source X based operating systems around wourld. But I want and suggest you to use Ubuntu as your notebook and desktop pc. This time I will argue about why I choose Ubuntu as my favorite Linux distribution.
Package management
The most important thing for me when choosing a Linux distribution is it’s package manager. I love Linux, I like its stability, It’s security, personality, and it’s freedom. But I don’t have much time to compile every application I want to use, by myself. So as I need to download binary packages of applications, It’s important to me what is the package management system of the distribution I want to use.
When you try to install something on Linux, As most of Linux applications are open source applications, their code is written dependent to other open source applications of Linux. You may install for example an office application, and It’s installer size is only 10MB, and if you compare the size of application, you may be amazed of how small size of the installer file. But the installer itself usually needs some other programs to be installed called ‘Dependencies’. Because when someone is programing something for Linux, He or she may not try to write everything by himself. For example, writing codes for drawing menu’s, buttons, playing music, asking user a question, saving files. All of such operations are written for Linux before, and All that Linux programs is needed, is to call some part of other open source program codes into his/her application. Then me and you when trying to install this application must first make sure that dependent applications which parts of their codes are inserted into main application are installed on our system. As an application may requires many dependencies and it’s dependencies requires many more, we can not install all of them just by hand. The set of websites for holding open source applications installer files, the format of installer files, and softwares to gather, download and install those applications on Linux computer is called package management system. There are different package management systems for Linux and I like those distributions which using deb as package management system.
Why deb?
So the question is why deb as package manager? deb is the first term of the name of an old days Linux distribution, Debian. Debian is a Linux distribution, which has a big huge ocean of compiled software packages in deb package management system websites, called repositories. If you can’t find an open source application installer in deb format, the you will be less likely to find it elsewhere! I heard the are about 20’000 or 40’000 software packages in deb format, So I choose Linux distributions based on deb package management system because then I have every software I need, compiled and stored on those repositories.
What about RPM?
RPM is also another package management system with a lot of softwares on it’s repositories. You can find a huge archive of those packages on repository websites like rpm.pbone.net. But I still choose deb. because:
Synaptic Package Management Software

If you use a linux distribution based on deb package management system with gnome environment, you may see Synaptic in it’s System/Administration menu. Synaptic is the most powerful usable application for automatically download a software with it’s all dependent packages and then install them all, one by one. It can save software names chosen to be installed on a small file, so you can make your selection and try to install them later. For example when you are connected to Internet. It can even make a list of softwares to be downloaded as a script, and you may run this script file later. This last thing, is why I like deb system. I can make this list by synaptic and set up my computer to download them at night when I’m asleep. You know, sometimes I select to download and install more than 1GB of packages trough deb system and It will download them one by one trough night and so cheaper Internet connection.
I didn’t seen synaptic on RPM based distributions, only once I installed openSuse, and it was very buggy, old version, and it even forgot to download some of packages I think. So I think synaptic is written exactly for deb system and So I like Deb.
Why Ubuntu?
There are a lot of Linux Distributions based on deb package management system, specially Debian. But I Like Ubuntu. Because of:
Several updates a year
It’s important to me when my operating system is planned to be updated with a new version. It takes 3 or 4 years sometimes for a new version of Debian to be distributed. But it is just 6 months for Ubuntu.
The distribution popularity
Also it’s important to me the popularity of my Linux distribution. Have you ever tried to by something that no one else is bout this before? You may get involved with such a problem, and then you may find your self alone with it and no one helps you, because your the only one who tried such thing on the earth! I do not have enough time to solve all my issues with my computer by myself, So I will install and use Ubuntu, cause whenever for example I have a problem installing my laptops webcam on it, there are a lot of people around the world, with the same laptop and webcam, whom installed Ubuntu and involved with this problem too, whom may be able to help me handle it.
Ubuntu is the first Operating system in Distributions list by page-hit-ranking of distrowatch.org website.
Linux Mint is also popular now. But as Linux Crazy said, It is like a dressed up of Ubuntu it self, And I want to dress it up my self, not using Linux mint.
You may like another distributions. You may using it already. But if you are not decided which distribution to use, then I will suggest you to use UBUNTU!
Thanks for reading my weblog or listening to my pod cast. Will come back soon and talk a lot more, so come back soon too:).

 And this is my personally dressed up Ubuntu.
%d bloggers like this: