Tplink wireless card tl-wn722n with ubuntu 10.04 lts

I bought wireless usb card tl-wn722n. It worked flawlessly with windows xp on my very old toshiba l20-182 laptop. But I’ve reinstalled the system, and now toshiba is working with ubuntu 10.04 LTS. I was trying many of the configurations found on the web, but didn’t found one, that was exactly working (without any other part from other posts down there). So this post is only for memo, how to install this specific card on my toshiba l20-182 with ubuntu 10.04 LTS on it.

  1. Download following tar package : http://www.mediafire.com/?8hkghqsaxnl9p4i
  2. Unzip this package into for example ~/instals/tplink
  3. Copy files with extension .fw (so ar9271.fw, htc_7010.fw, htc_9271.fw) to /lib/firmware/
  4. Extract compat-wireless-2.6.38.2-2.tar.bz2
  5. Go to folder where you have extracted tar file from point 4
  6. from terminal run : $ ./scripts/driver-select ath9k_htc
  7. then : $ sudo make
  8. then : $ sudo make install
  9. now this is very important !!!! – after update (with update manager) something went wrong and the whole install of atheros was broken, usb card was working for about 2 minutes and then broke down. And I had to reinstall the system again, to get the card running again. So don’t update the system yet! I will update this post after figuring out why and which package after update broke the wireless usb card functionality. Without update of the system everything is running flawlessly.

myBatis, derby and eclipse RCP

Lately I was working on an eclipse RCP application that uses myBatis for ORM. And I decided to write a small tutorial on how to bind myBatis + derby + eclipse RCP together. This is small tutorial for beginners. You can read it from here :

binding mybatis and eclipse RCP

Source code for this is under following link :

Source code for the tutorial

Java image annotation tool

I was looking for something similar as greenshot application for my linux OS. And hopefully someone was already so clever, and did such thing in Java. It’s called JShot.

You can download it from here : http://jshot.info/

XXE Utils adjustments on linux

Problem description

I had a problem with xslutils personal edition from XMLmind package on linux machine. When I entered my native language into programlisting (UTF-8) chars, like "Ś", "ą", "ę", "ł", there was always following problem in xslutils reported (see the picture below) :

And although in the Preferences window I added to the FOP converter corresponding Curier TTFs from msttcorefonts package :

there was no way to convert native UTF-8 signs from xml document into pdf document.

Problem solution

After a while of testing and searching of programlisting.font.family, listing.font.family and so on in the params folder of the xslutils I was blightened. Eureka! You have to open the Edit dialog box from the main window :

And from new dialog box that will appear you should select tab called Transform (1). Then press the button Add (3) and enter in the Name field : monospace.font.family, and in the Value field enter serif. So that, you will have something similar in the Edit dialog box as on the picture below :

Now click OK button and try to convert your xml document once again. It’s working right now!

Syntext Serna Free edition and generating of docbooks

Problem description

I was very glad that there is such an option like Serna XML Editor. It is very simple and straightforward to use it. Creation of docbook is a very simple process. But there is a one catch, that was pretty annoying me. When I added for example 3 sections to the chapter, the first section was always shown on a page, where the chapter was. It was annoying me. First of all, I wanted to have all sections in separate html pages (multiple chunks publishing). So I’ve started to search the reason of it. In XSLT parameters there was no parameter chunk.first.sections or chunk.section.depth, so I couldn’t change it.

Solution

I had to edit one simple file and change it a little bit. This file is located in folder serna-free-4.3/xml/stylesheets/docbook-xsl-1.68.1/html and is called chunk.xsl .

There, at the end of this file simply add following two lines :

<xsl:param name="chunk.section.depth" select="1"></xsl:param>
<xsl:param name="chunk.first.sections" select="1"></xsl:param>

And restart Serna. And there you go. I know that this solution isn’t clean. You should search the whole included xsl files to find appropriate rules (I think this is somewhere in file chunk-code.xsl where the template chunk-first-section-with-parent is defined), but I haven’t got enough time to analyse this files in deep. So, this two additional lines at the end of the chunk.xsl will do the trick.

Wysyłanie maili spod basha

  1. #sudo apt-get install sendemail
  2. #sudo apt-get install libio-socket-ssl-perl libnet-ssleay-perl perl
  3. #sendEmail -f jan.kowalski@gmail.com -t maria.wisniewska@wp.pl \
    -u test \
    -s smtp.gmail.com \
    -o tls=yes \
    -xu jan.kowalski -xp haslo_jana_kowalskiego

Więcej informacji po wpisaniu samego sendEmail

Zmiana defaultowego rozmiaru terminala

sudo gedit /usr/share/vte/termcap/xterm
:co#80:it#8:li#24:

DB2 instalacja jako użytkownik inny niż root oraz praca z IBM Data Studio

Ostatnio miałem problem z instalacją db2 użytkownika innego niż root (non-root) installation.

Według dokumentacji ibm :
ograniczenia instalacji non-root

W takim przypadku nie działa takie narzędzie jak IBM Data Studio. Szkoda. Bo narzędzie jest praktycznie niezbędne, żeby wogóle jakoś przyzwoicie sobie pracować z bazą danych.
Rozwiązanie jest w miarę proste :

http://publib.boulder.ibm.com/infocenter/db2luw/v9r5/index.jsp?topic=/com.ibm.db2.luw.qb.server.doc/doc/t0050570.html

trzeba ustawić ENABLE_OS_AUTHENTICATION na YES.

i wtedy w IBM Data Studio ustawiamy logowanie jak podczas logowania do systemu.

IBM Data Studio – create new database issue

For db2 there is an IDE, IBM Data Studio. After installing it with non-administration privilages, we can encounter some serious problem. After launching it, there is no possibility to create new database from within the IDE. Although in “Getting started with DB2 IBM Data Studio” redbook there is a chapter for this, when trying a connection set, by clicking “Test connection” button nothing happens. After clicking Finish and setting all settings to create new database, there will be propably an error.

The thing is, when you install the db2 as admin (sudo), there will be additional users created. Like db2inst1, dasusr1 and db2fenc1. A profile for db2inst1 (which will be an instance of the DB2) will be created under user db2inst1.

After installing IBM Data Studio the profile launch will not be added to the launching script.

Here is what to do :

  1. Locate where is db2profile (propably on /home/db2inst1/sqllib/db2profile
  2. go to your home directory, create dir bin
    1. $cd ~
    2. mkdir bin
  3. create file f.e. ibmdatastudio :
    1. echo > ibmdatastudio
  4. change mode to +x :
    1. chmod +x ibmdatastudio
  5. edit it with feavourite editor (mine is vim) : vim ibmdatastudio
  6. And enter following rows :
#!/bin/bash
if [ -f /home/db2inst1/sqllib/db2profile ]; then
. /home/db2inst1/sqllib/db2profile
fi
$HOME/IBM/DS2.2/eclipse -product com.ibm.datastudio.mini.im.product.ide

And now change the command in the IBM Data Studio Menu to $HOME/bin/ibmdatastudio

Should be possible to create new database via IBM Data Studio itself.

ubuntu – przejście do trybu konsoli

Nie wiem, czy to tak się właśnie nazywa, ale przejście ze środowiska X do konsoli normalnie odbywało się przez zmianę /etc/inittab runlevelu. W ubuntu jest to dużo prościej rozwiązane. Nie ma pliku /etc/inittab, ale wpisując :

sudo /etc/init.d/gdm stop

przejdziemy do konsoli, zamykamy sesje x

a potem

sudo /etc/init.d/gdm start

i siup, już jesteśmy w x’ach :) magic…

przydatne, kiedy trzeba np. zainstalować sterowniki do nvidii. Potrzebne mi to było właśnie do tego.

Follow

Get every new post delivered to your Inbox.