My blog on life the universe and everything…

Category Archives: HowTos

How To install BackTrack3

I decided to install BackTrack on my hard disk instead of running it from the Live CD and since it didn’t end up being a straight-forward procedure I am writing this post to document how I did it. I have to give credit to this guy whose own documentation I actually followed and helped me greatly to avoid all the trouble he went into. However I felt the need to write my own HowTo since some of the things he described did not work for me (because my case was somehow different from his, more explanations later) so I had to come up with other solutions. Therefore my aim is to describe the whole process as it worked for me in order to keep it as future reference for myself. If it so happens to help anyone else then that’s great however I cannot guarantee it, even if someone has an identical setup on his PC to mine. I hope I don’t need to mention that you if you follow these instructions you are doing so at your OWN RISK and you take FULL RESPONSIBILITY of what happens to your system. Installing a Linux distribution by hand is never an easy task and a whole lot of things can go wrong in the process.

I got to mention here that I have created in the past a partition for testing purposes of any linux distribution that I find interesting so this time I did not have to create the partitions from scratch, instead I used the ones I already had to replace another Linux distribution with Backtrack. In order to create the partitions you need you can either check the original document or look somewhere else on how to do it. I will suppose you have the necessary partitions ready from here on. Let me note also that apart from the ‘dummy’ linux partition used for testing purposes, I also have an Ubuntu Linux partition running which I use as my main system as well as a FAT32 partition with Windows XP. As a result, I have already installed GRUB on the Master Boot Record and I get something like the following screen when I boot my machine:

1.Ubuntu 7.10

2.Dummy Linux Distro


Therefore when I finish this document I will not describe how to set your boot loader from windows but I will describe what to add on the GRUB menu list to allow you to boot BackTrack. For a WindowsXP based solution look here.


Ok so, enough talking, time for action!

1. I logged in with the Live CD as root and I went to /mnt/sda6 (which is the partition where my old linux distro was sitting idle, it can be anything for you) and I deleted the whole system by typing:

$ rm -fr *

2. then I created the necessary folders by typing

$ cp –preserve -R /{bin,dev,etc,home,lib,root,sbin,usr,var,opt,pentest} .

(notice the dot (.) at the end to indicate the current directory (/mnt/sda6)). This process takes quite some time, so go have a coffee or read a book or wait patiently ( and I mean really! patiently).

3. When this finished I typed:

$ mkdir /mnt/sda6/{boot,mnt,proc,sys,tmp}

4. Then I typed:

$cp /boot/vmlinuz boot/ (note I was already in /mnt/sda6 so I didn’t have to give the full path to /boot)

Here I am copying ‘vmlinuz’ from the Live CD’s /boot folder to the harddisk’s /mnt/sda6/boot folder where my Backtrack system resides. Until here I the instructions are almost identical to the original author’s HowTo which I myself followed. However after this step I stumbled upon some things that I had to do differently. I will only described my actions and will not talk about what I did instead of what the other HowTo said because it is unnecessary.

5. Then I also copied the “initrd.gz” to the /boot folder by typing

$ cp /boot/initrd.gz /boot

6. The next step is to either install grub or as in my case to edit the current grub list to reflect the new system. Currently my grub installation resides in my Ubuntu partition so I moved there to edit the “menu.lst”

$ cd /mnt/sda3/boot/grub

7. Then I typed

$ vi menu.lst

which is the file where grub loads the initial screen that you see when power on your PC.

8. Then I added the following lines to the menu.lst file:

title Slax
root (hd0,5)
kernel /boot/vmlinuz max_loop=255 root=/dev/sda6 vga=791 ro
initrd /boot/initrd.gz

I saved the file and exited.

At this point I restarted the machine but it failed booting with the message

BT3 Data not found. This should not happen, press ctrl+alt+del to reboot”

It also gave me a hint about copying the BT3 folder to my windows drive in order to hopefully solve the problem.

So I went back into the LiveCD and started looking for this BT3 folder. If you boot from the Live CD the folder seems hidden under /mnt/live/dos/, but if you read the CD as a normal cd from wither windows or another linux distribution you will find it at the root directory. Then you need to copy it under the windows c:/ directory or /mnt/sda2 in my case (since i was doing it from the live cd environment) and then reboot. After this it all worked fine for me and I am actually writting this post from my newly installed Backtrack system!

As I said this document is mainly for my own future reference so I don’t intend to write down all the possible ways of doing this installation, but only document my own way of doing it. Check with the original document for further help and especially if you are a windows only user or don’t already have two Linux partitions on your system as I did.


How to create your own home SVN repository with Xampp/Apache

I am not going to talk about the benefits of version control in your projects, those you can search and read about elsewhere. In this HowTo I am simply going to describe the steps necessary to setup your own svn repository accessible from anywhere in the world using the apache server. This will assume you are using apache installed with xampp the all-in-one installer of your WAMP (Windows Apache,MySQL,PHP) setup.

  • After installing Xampp, point your browser at http://localhost to make sure that your server is running.
  • Copy the files mod_authz_svn.so and mod_dav_svn.so found under your subversion bin directory (e.g. C:/Program Files/Subversion/bin/) to the C:\xampp\apache\modules directory,
  • Now edit your Apache httpd.conf found under C:\xampp\apache\conf (keep a backup for peace of mind) and enable the lines

LoadModule dav_svn_module modules/mod_dav_svn.so

LoadModule authz_svn_module modules/mod_authz_svn.so

If you can’t see these lines copy-paste them from here. Then go at the end of the file and add the following lines:

# Configure Subversion repository
<Location /svn>
DAV svn
SVNPath “C:\svn”
AuthType Basic
AuthName “Subversion repository”
AuthUserFile “c:\svn_conf\passwd”
Require valid-user

  • Save and close the httpd.conf file, then restart Apache.

NOTE: In case apache does not start this means that there is something wrong in the httpd.conf file. Go to the xampp/apache/bin folder in your drive and run apache from the command line to see exactly at which line the problem is. For examle you might have to remove the quotes on the above lines to get it to work. So you need to experiment until apache gets up and running correctly.

Also note that If you have Skype running you might not be able to start any of the Xampp service due to some strange conflict. Close skype, start the xampp services you want and then start skype again. This should solve it.

  • Now create two folders in your C:\ drive, one called svn and the other called svn_conf.
  • In order to password protect your repository fire up a command prompt and browse into the apache/bin folder C:\xampp\apache\bin and then type htpasswd -c C:\svn_conf\passwd yourname
  • Now it’s time to create your first repository. Go in the C:\svn folder just created and right-click in it. From the drop-down menu choose ToirtoiseSVN ->Create repository here. If all goes fine ToirtoiseSVN will inform you that the repository was created sucessfuly.
  • Finally in order to import the directory where you keep your source code into your repository right-click on the source code directory and choose ToirtoiseSVN->Import. In the window that shows up type the path to your svn repository, that is file:///C:/svn.

Test your setup by pointing your browser to http://localhost/svn and entering the username/password combination that you have defined.

inspiration & credits:lifehacker

Getting the most out of Firefox 3

The most valuable webpage you can see in FIrefox is the about:config page. This is the place where all (well almost all) the internals of FIrefox are revealed to you and you can edit your browser’s behavior. I found a blog entry revealing a couple of tweaks for Firefox 3 which are good to know and I wanted to keep a reference of them,so I am copying them here in case the link ends up dead in the future. Although I found non of them very important at the moment, it’s good to keep track of tweaks like this for future situations. Please note, all the credits of these tweaks go to the original author of the post. Exploring the about:config page will reveal many more tweaks to your browser’s behaviror. If you have any to suggest feel free to do so in the comments section.

  1. Auto complete in the address bar as you type an address.
    of the people out their seems to have a love-hate relationship with the
    Firefox3’s new address bar (that Mozilla likes to call as the awsome
    bar). In a humble attempt to tame this address bar we give you some
    hacks that can reform the smart bar to become the real smart bar.
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button.
    • Enter browser.urlbar.autoFill into the Filter text box. Double click on that preference value and change the value to true to enable autofill.

    Now, as you type in an address, you can see that not only the drop down
    list is shown, but the address bar itself is auto completed for you.

  2. Enabling spell check in text-fields
    default Firefox does spell checking only in multi-line text boxes. If
    you want the Firefox to spell check the single line text entry fields
    too, this hack is for you:
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button.
    • Enter layout.spellcheckDefault into the Filter text box. Double click on that preference value and change the value to 2.
  3. Tweaking the full screen mode
    default Firefox 3 hides the location bar and tab bar when you enter the
    full screen mode. Here is how to disable this behavior.
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button.
    • Enter browser.fullscreen.autohide into the Filter text box. Double click on that preference value and change the value to false to disable hiding of location and tab bar.
    • If you just want to disable the hiding animation, set browser.fullscreen.animateUp to 0.
  4. Turn On Color Profile Support

    Good news is that (unlike Firefox2) Firefox3 contains a built-in
    advanced color profile support, which makes Firefox 3 compete easily
    with any desktop image viewers/editors in terms of color support. The
    bad news is that this mode is disabled by default. This is what you
    should do to enable the color profile support.
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button.
    • Enter gfx.color_management.enabled into the Filter text box. Double click on that preference value and change the value to true to enable color profile support.
  5. Always display the go button
    default Firefox 3 displays the Go button only when you are editing the
    address in the location bar. This is how you can display it always.
    • Open userChrome.css file in your profile directory using notepad.
    • Add the following line to the end of the file: #go-button { visibility: visible !important; }
    • Restart Firefox.

    If you don’t want to tamper with the userChrome.css file, here is an extension that does the same for you.

  6. Make the location bar display only typed addresses
    Dont want the location bar to show entries in your bookmark or history? Here is what you should do.
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button
    • Enter browser.urlbar.matchOnlyTyped into the Filter text box. Double click on that preference value and change the value to true.
  7. Change the number of suggestions displayed in the Location bar menu
    default Firefox 3 displays upto 12 results in the drop down list as you
    type an address. Here is how to change this number.
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button.
    • Enter browser.urlbar.maxRichResults into the Filter text box. Double click on that preference value and change the value to any positive number.
  8. Hide RSS feed icon from the location bar
    If you feel that little rss icon is taking up your precious screen real estate, you can easily disable it.
    • Open userChrome.css file in your profile directory using notepad.
    • Add the following line to the end of the file: #feed-button[feeds] { display: none !important; }
    • Restart Firefox.
  9. Hide the star icon from the location bar
    may be a keyboard junkie or you may be too used up to the old ways that
    you’ll never use the star icon sitting up in the location bar. If you
    never use it, why let it be there? Here is how to remove the star icon
    from location bar.
    • Open userChrome.css file in your profile directory using notepad.
    • Add the following line to the end of the file: #star-button {display: none !important;}
    • Restart Firefox.
  10. Disable single-click-select-all in the location bar.
    of the real pain in the neck feature of Firefox is that it
    automatically selects the entire address in the location bar if you
    click anywhere near it. You just wanted to correct a typo in the
    address, but instead of putting the cursor at the clicked location,
    Firefox selected the entire address. Without looking into the screen,
    you corrected the typo and now the entire address is gone. Now buddy,
    start typing again, says Firefox. Here is how to make the behavior more
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button.
    • Enter browser.urlbar.clickSelectsAll into the Filter text box. Double click on that preference value and change the value to false.
  11. Reduce the size of the back button

    may not be that evident at first, but will soon reveal to be a
    no-brainier once you know it. This is all you have to do: Right-click
    on Firefox’s toolbar, and choose Customize. In the dialog box, select
    “Use small icons.”
  12. Disable blinking text
    Sorry, Mr. Blinking Text, you are not welcome. Here is how to stop all blinking text:
    • Enter about:config into the address bar and hit enter.
    • Click on “I’ll be careful, I promise!” button.
    • Enter browser.blink_allowed into the Filter text box. Double click on that preference value and change the value to false.

Build your own Multitouch Screen

This is a video from SSandler’s blog

How to blog efficiently

Lifehacker has a very interesting article on how to maximize the efficiency of your blogging experience. It suggest a bunch of tools and programs (some in the form of Firefox-addons) that allow you to speed the way you add links, edit photos, create new posts, get informed of intersting news that might be used in a post and a lot more. Check the article at the Lifehacaker website.

How to use the Bluetooth console of PyS60 from your computer.

Open a shell and type the following commands one at a time:

“hciconfig reset”

“rfcomm listen 0 3”

This last command will advertise an rfcomm connection on channel 3.

then on your PyS60 screen on the phone choose “Options ->Bluetooth Console” to connect to the computer.

Once this is done, open a new shell and type “screen /dev/rfcomm0″

whala! you can now type in commands on your PC and those are redirected to the phone. Commands that do not require UI access will be displayed on your computer screen, but UI based commands such as appuifw.note(u”hello world”,”info”) will be displayed on your phone as would happen if the script was running on your phone (which is what is happening actually).


If the above approach does not work for you, try the one below:

Plug-in your bluetooth adapter, and then from the shell:

hciconfig reset

Then check that the device exists by typing:

  • $ hcitool dev

Register a serial port (use channel 2. For some reason, channel 1 and channel 3 might not let the connection through)

  • $ sdptool add –channel=2 SP

Now listen to the channel:

  • $ rfcomm listen rfcomm2 2

In your phone, make sure bluetooth is on, then go to the Python application and then select the Bluetooth Console. Select from the list of available devices your computer’s bluetooth adapter (you might need to select search even if you think you have already defined the pairing). If the operation is successful, you should see something similar to the following on your computer’s shell:

  • Waiting for connection on channel 2
  • Connection from 00:11:9F:BE:47:CA to /dev/rfcomm2
  • Press CTRL-C for hangup

Now open a new shell terminal and execute:

  • $ cu -l /dev/rfcomm2



PyS60 Bluetooth console

bluetooth fun with my Nokia 6600

Bandwidth control in Gnu/Linux with trickle

I just found a nice little tool that allows you to set the maximum download/upload rates that an application should use. This is particularly useful to me as I have problems when downloading files with DonwThemAll in Firefox which does not provide any means of controlling the bandwidth consumption. As a result I often find my connection being completely taken over by the download an thus I am unable to do other things on the Internet at the same time.

The application I am talking about is called trickle and can be easily downloaded on debian-based machines with apt-get install trickle.

To start Firefox with a limit to the amount of bandwidth it consumes all you have to do is type in the command line

trickle -d 200 firefox

this would start Firefox with a download limit of 200KB/s. See trickle manual for more options. It must be noted that this value cannot be changed in real time.

How to debrand your Nokia N95 (and probably other Nokia phones)

A while ago I really needed to debrand my N95 so that I could install the latest firmware update at the time (v.20.0.15) and therefore be able to use the sensor module that came with Python for Series 60 v.1.4.2. In the past I had read a couple of posts in various forms and I had really been scared away from attempting such a thing, because “…you can break your phone and never have it work again”. Anyway, as I really needed to do this to be able to write applications using the sensor module I took the courage 🙂 to actually go for it. As it turned out it was much simpler and less dangerous than most people presented it to be. A nice guide I found and followed was this. For the sake of completeness and because I can never be sure that this resource will be always available I have copied the steps below.

Note that the real dangerous thing is while updating the firmware on your phone, during which you should at not time interrupt the process. As this is a procedure you normally get into anyway when you want to update your firmware, debranding the phone per se does not put any higher risk on your phone. Just be carefull when updating the software and you’ll be fine.

You can find your phone’s current firmware version by typing *#0000# on your phone. To check if there is an update for your phone go to the Nokia Device Software Update page.

Debranding your phone

First of all you need to get the Nemesis Service Suite and the Nokia Software Updater.

  1. Connect your phone and wait for Windows to install the drivers.
  2. Open Nemesis Service Suite and click “Scan for new device” on the right-upper part of the window
  3. Click on the icon “Phone info”
  4. Click on “Scan”
  5. Change the product code to the one you want from the list below.
  6. Mark the case “Enable”.
  7. Press “Write”, and your phone’s product code will be changed (you might think that nothing happened, because the phone is still in normal mode, and the changing of the product code only takes a couple of seconds, but don’t worry, the product code changed !).
  8. Close Nemesis Service Suite and run the Nokia Software Update.
  9. Make sure not to touch the cable or the phone while your phone is updating or else you will break it!
  10. That’s it! When you restart your phone, it should now be upgraded!

Product Codes

0534841 EURO1 – Sand
0534842 FRANCE
0534843 ALPS
0534844 EURO2
0534845 TURKEY
0534848 BALTIAN
0534849 RUSSIAN
0534850 UKRAINE
0534851 CIS, Bulgaria
0534852 EURO3
0534853 BALKANS
0534857 ISRAEL

0536062 EURO1 – Plum
0536063 FRANCE
0536064 ALPS
0536065 EURO2
0536066 TURKEY
0536069 BALTIAN
0536070 RUSSIAN
0536071 UKRAINE
0536072 CIS, Bulgaria
0536074 EURO3
0536075 BALKANS
0536079 ISRAEL

0534832: Hong Kong
0536084: Hong Kong
0534830: Taiwan
0536083: Taiwan
0534833: Apac 1
0536085: Apac 1
0534834: Philippines
0534835: Australia
0534836: New Zeland
0534837: Indonesia
0536086: Philippines
0536087: Australia
0536088: New Zeland
0536089: Indonesia
0548298: India Apac 2
0548299: India Apac 2
0535053: Thailand
0536093: Thailand
0534839: Vietnam
0536091: Vietnam

Operator Specific codes
0548170 – Orange UK
0548020 – Movistar

How to listen to radio stations on linux with a standalone player.

I found this small hint here.

Create a new file and give it an extension of .asx. Then copy-paste the code below in the file and substitute the radio station’s name and links appropriately. Run the file in Xine or Vlc.

<ASX version = “3.0”>
<Ref href=”mms://sportfm.live24.gr/sportfm7712″ />

How to pack/unpack/edit SiS files and packages

Download and install SisWare(latest version) and discover it’s potential.

%d bloggers like this: