Aario's blog about life and technology

Latest

Offline installation of Oxygen-Transparent widget engine on Kubuntu 11.10

Just installed the 11.10 version of Kubuntu and wondered to install the fancy Oxygen-Transparent widget engine on it in order to enable fully transparent windows there.

The project home page is here but does not contain much information. So:
I downloaded it’s Perl installer script from here.
I installed below packages as necessary dependencies:

  • git
  • build-essential
  • libxrender-dev
  • libphonon-dev
  • kdelibs5-dev
  • kde-workspace-dev

I was ready to install it by running it’s installer script in command line, but as I found that git is very slow and it takes ages to download all necessary files, I decided to find a way to install it offline.

Thus I downloaded the whole git archive as a .tar.gz file from here.

I extracted it using below command:

mkdir ~/Temp
cd ~/Temp
tar -xvzf /PATH/ TO/DOWNLOADED/FILE/oxygen-transparent-somerubishtext.tar.gz

Then I opened the downloaded perl script and searched below line in it to change it to:

    ###########################################
if( !$opt_no_git )
{

print( “— checking out source code\n” );
my $repository=”/data/aario-kubuntu-11.10-home/Temp/oxt/git“;

As you can see, the value in front of $repository is a path in my hard drive. It is where I extracted the downloaded .tar.gz file. So that this time, the git program which is used by the downloaded Perl script uses those extracted files instead of download site to get source code files. It is much faster!

Then all I did was to run below comands:

./oxygen-setup.pl
cd build
sudo make install

This was insallation. I wen to System settings and Application appearance and set oxygen transparent as my widget style. Clicked on Configure button and moved slider a bit to the left to adjust transparency. Also I set oxygen transparent as my window decoration in Workspace appearance. Now, here is my new fancy desktop:

Oxygen Transparent Widget engine on Kubuntu 11.10

Hope you enjoyed. Don’t forget to leave your comments;)

How to fix ubuntu 11.10 touch pad drag and drop issue

Well, this may bothered you as well. Upgraded to 11.10, and drag and drop using touch pad is not working any more!

The solution is to simply copy and paste below commands in your terminal:

synclient SingleTapTimeout=360
synclient FastTaps=1

Good luck! :)

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:

#net.ipv4.ip_forward=1

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-11.2.0.1.0-1.i386.rpm
  • oracle-instantclient11.2-devel-11.2.0.1.0-1.i386.rpm
  • oracle-instantclient11.2-sqlplus-11.2.0.1.0-1.i386.rpm

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! :D 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 www.bugmenot.com to provide me a user name and password to download from www.oracle.com. Their first password worked just like a charm! :D
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:

jdbc:oracle:thin:@<server>:1521:<database_name>

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
./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!).
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.
Conclusion:
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

Follow

Get every new post delivered to your Inbox.