Monday, December 29, 2008

How to change default locale (Ubuntu GNOME)

  I have always been a fan of English as my main language while using the computer or computer-related terminology. Recently I've stumbled upon the screenlets package (see picture or install debian package).
The only problem is that using United States' default date is shown as Month/Date/Year (i.e. 29/12/2008), which is rather unattractive (hey - my eyes, my brain, my opinion, my choice!).
  After many unsuccessful tries of various commands, I've come up with a rather graphical-based solution to use the locale I preferred. Obviously, the best choice for me would be en_GB (Great Britain/United Kingdom), since I wanted to stick with English, but use the date format Date/Month/Year.
  1. System > Admnistration > Language Support
Or you can simply run the command: gnome-language-selector
  2. Type in your password if asked to do so. (Make sure you're the adminsitrator, it might involve installing extra packages)
  3. Install your language of preference.
  4. Choose the language of your choice again as the "Default language".
  5. Press "Apply" and click "OK".
  6. Log out (System > Log out).
  7. While viewing the Login screen, click "Options" (lower left corner in Ubuntu), then "Set Language" and select "System Default". It will ask you to restart the login screen (press "Yes").
  8. When the login screen is restarted, you will be using the language of your preference with the appropriate locale! :) You should be able to check this out when you run the following command in Terminal (Applications > Accessories > Terminal):


Now, if you notice any problems:
1. Execute these commands in terminal:
sudo -s

echo 'PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"' > /etc/environment

2. Reboot your computer.
3. Run the gnome language selector again, choose "English (United States)" (or whatever was the default language). Press Apply and OK. Run it once more and set it again to the language you want it to be ("English (United Kingdom)"), press Apply and OK.
4. Follow the steps 6, 7 and 8 above.
You ought to be able to have the default language and locale you selected!

Friday, December 19, 2008

A second language - and a third one!

  One and a half year ago I wanted to comment an article about a second language. Sometimes people are having hard time learning new things, and it's not just their fault, it could be literally an anomaly in the brain structure or it could be related to the level of complication of the language someone chose to learn.
  To a personal background level, I believe I used to be a polyglot, a linguist if you will. I loved to learn new languages, I started English as a second language at the age of 9 (I think), all thanks to my wish to understand how to interact with the computer and read foreign literature. From there, I followed English until the GCE O'Level certificate. In the meantime, I began French for fun, having nothing to do during long summer days. The intensive 5-hour lessons proved to be a really attractive language and I continued learning for 3 consecutive years (during July/August). Then came preparation for the medical schools, which put a stop to all my other activities. Perhaps it was my teen-hormone years or my own free will that did not pursuit my love for new languages. Nevertheless, I've learned basic Latin and still continue to perfect my knowledge in Serbian language during my medical school years - I guess I still have a crave for languages deep down under the wish for wearing a white robe. :)
  No hard feelings to anyone, but I've recently compared the Serbian language to the German. Not that I know much about the German language, but I've noticed that in German there is the possibility to mix multiple words into one. Really cool once you get to know the basics of the language, but sometimes it is really hard for new learners. Basically, the grammar and the word pronounciation can be a reason for a person to pull back and not wanting to express themselves in that language. For example, Serbians from what I know have a hard time using "th" or "th"(d) - i.e. in the words "theatre" or "the" respectively - in English, which I think is one of the reasons they prefer not to use English at all.

  The fascinating thing as a child is that you can learn more stuff than an adult person, the so called "Tabula Rasa" thesis. My opinion is that gifted polyglots (people that speak a lot of languages) should nurture their languages by daily or weekly translating/reading text of headlines, otherwise the wealth of words and phrases of a language they might once perfectly knew will definitely decrease by time without giving it adequate practice. And it doesn't stop there, listening should adopt your hearing ability in order to rapidly process verbal requests or to better interact with other people. Remember, a dialogue needs "two to tango", so it might be better to find a partner for it. Exchanging opinions about your primary language for a secondary one through "The mixxer project" may prove really helpful. I haven't tried it yet, but some of the readers may have better solutions for this. I suppose that you'll have to make remarks about the difference in slang and normal language, so.. be very careful!
  Learning languages can be compared to other learning possibilities, such as playing the piano or the guitar or even writing code in various programming languages. There's a time when you might mix up words or phrases, but the brain learns to eventually adopt while multi-processing such requests - almost similar to other mechanical functions, like driving, eating a burger, talking to the phone and switching gears at the same time (not that I recommend it).
  To sum up, comparing time required, ability to learn and grace of use, as a child you'd have better results in learning a language, provided you often practice. And do practice, because in later years it will definitely prove worthy!

Monday, November 24, 2008

non-ASCII characters in usernames

Ever wanted a user name that is localised to the language you want, with your original name or surname and not only using Latin characters? Well, today I made a beautiful discovery!

Although a lot of people claim it is not possible yet for GNU/Linux to understand characters other than ASCII, I've found that it can concerning user names - using the useradd command (not adduser).

The actual problem seems to be a standard the unix commands have to follow:

But it looks like the useradd accepts arbitrary usernames, which is cool! So I've tried my name in Greek:
sudo useradd -m Σάββας

Then adding a password:
sudo passwd Σάββας

And that is all that is required!! Maybe some programs aren't ready yet, but so far I've tried: terminal, console, firefox, rhythmbox, totem player. None of them returned any errors nor did they crash.

Sunday, October 26, 2008

timekpr - Keep control of your computer usage

A rather new project, really reaaally really useful for parents and administrators that wish to limit their user accounts to a certain amount of login access duration or to limit accounts by defining access hours. Either way, it's a must have application, which I'm *ahem* actively co-developing! :)

The project page can be found at LaunchPad, the code is hosted at LaunchPad too! We have also set up a new blog for it at blogspot: There's a voting poll at the blog site, you might be interested to "give your click" to provide us with an orientation as to which new toys should timekpr focus on. ;)

I'm hosting a mini-page regarding the Debian packages, built with Ubuntu in mind:
(until I find some time to learn to cope with uploading packages to a personal package archive ["PPA"] at Launchpad)

Wednesday, October 15, 2008

Google - 403 Forbidden - "We're sorry"

If you got the "We're sorry" webpage I believe you came to the right place.. I have noticed this error myself :(


We're sorry...

... but your query looks similar to automated requests from a computer virus or spyware application. To protect our users, we can't process your request right now.
We'll restore your access as quickly as possible, so try again soon. In the meantime, if you suspect that your computer or network has been infected, you might want to run a virus checker or spyware remover to make sure that your systems are free of viruses and other spurious software.
If you're continually receiving this error, you may be able to resolve the problem by deleting your Google cookie and revisiting Google. For browser-specific instructions, please consult your browser's online support center.
If your entire network is affected, more information is available in the Google Web Search Help Center.
We apologize for the inconvenience, and hope we'll see you again on Google.

At first I thought that they blacklisted Serbian IP addresses (that would be really spicy!). They may suggest some mumbo-jumbo procedure in Google FAQ, but that didn't do the trick.

The solution was rather easy, I went to typed in some characters and voila - redirected to Google web search :)

Monday, October 13, 2008

Openoffice 3.0 final.. finally!

Today I noticed that the new version 3.0 of will be out, the open source/free desktop office bundle (that I adore). As describes it:
 OpenOffice provides a great alternative to existing commercial office suites. It comes with word processor (Writer), spreadsheet (Calc), presentation (Impress), drawing and graphing tool (Draw), tool for creating equations and formulae (Math) and finally a database tool which also build reports and forms (Base). All components are multi-platform and multilingual. Development is sponsored by Sun Microsystems.
So I have two events to celebrate today, this and my birthday! :)

Click on the following links to see:
- the release announcement:

- the new features:

I've enclosed google cache links as an alternative, for some reason the site replies with '403 Forbidden' error.

You can obtain the openoffice suite from torrents or mirrors such as:
mirrorservice: ... ble/3.0.0/
Filehippo (windows executable):

Monday, September 29, 2008

Firefox: "Secure connection Failed"

Visiting websites with secure connection enabled can sometimes lead to problems in Firefox. Websites just link their https certificate to whatever sub-domain they want or they redirect to another website without registering it properly. Mozilla Firefox 3 detects that "glitch" and adds an extra protection layer by stating the following error:
Page load error
Secure connection Failed

*site* uses an invalid security certificate
The certificate is only valid for *another site*
(Error code: ssl_error_bad_cert_domain)

There's an easy way to resolve this, if you click on "Or you can add an exception" → "Add exception" → "Get certificate" → Read the reason it was invalid and if you're OK with the reason → "Confirm security exception".

Tuesday, September 23, 2008

How to install Folding@home in Ubuntu using origami

This is a quick "how to" tutorial in order to provide some of your CPU time for a good cause, which is called Folding@home. As they explain it at the F@h website:
Folding@home is a distributed computing project -- people from throughout the world download and run software to band together to make one of the largest supercomputers in the world. Every computer takes the project closer to our goals. Folding@home uses novel computational methods coupled to distributed computing, to simulate problems millions of times more challenging than previously achieved.

There are other projects out there, like BOINC. In that case, I suggest to install boinc-manager (menu Applications → Add/Remove) and check out Rosetta.

Now let's get down to business. You need to pick a name, which can be anything you like, as long as it's not taken - you can also pick a team, but that's optional. You do not need a password for a username, but you need one in order to create your own team.
Tip #1: A person is called a "Donor" in F@h.

Next is the application. Ubuntu is based on GNU/Linux, and the (good? :P) people of Stanford have created a console client. Despite the fact that we are left without a graphical interface, we can still get the client program and use it.

It's time to visit our good ol' friend, the Terminal (or Konsole for KDE users). Once you start terminal (menu Applications → Accessories → Terminal) we will install the origami package:
sudo apt-get install origami
Tip #2: Type in your password and press enter if you are asked to do so

The following step is to download and install the f@h client program.
The origami manual has several examples:
origami install -u Joe -t 45104
This example will install the Folding @ Home client to the local
machine, reporting data as the Joe user as part of the 45104
(TeamUbuntu) Team.

origami install -u Joe -t 45104 -c1
This example will install the Folding @ home client to the local
machine, reporting data as the Joe user as part of the 45104
(TeamUbuntu) Team, using the i386 Folding @ Home client and
toggling the cron option to auto-stop between the hours of 8:00am
and 5:00pm.

origami install -u Joe -t 45104 -p amd64
This example will install the Folding @ home client to the local
machine, reporting data as the Joe user as part of the 45104
(TeamUbuntu) Team, using the amd64 Folding @ Home client and
toggling the cron option to auto-stop between the hours of 8:00am
and 5:00pm.

Tip: If you are on your own and don't have a team, I urge you to join TeamUbuntu ( 45104 ) or UbuntuForums ( 45399 ).

Tip #3: Don't know whether you have a 32-bit or 64-bit operating system (OS)? If you're not sure, execute this:
uname -m
It shows whether you have 32-bit (x86/i386) or 64-bit (x86_64/amd64) OS. 64-bit users will want to fully use their processors, so they need to use the -p amd64 argument.

In short, the recommended command for 32-bit is:
sudo origami install -u YourName -t 45104 -c1
..and for 64-bit is:
sudo origami install -u YourName -t 45104 -c1

Tip #4: origami installs a crontab if you use -c1 in its own system user 'origami'. If you want to edit the hours it starts/stops (after you install it), execute: sudo crontab -u origami -e

Once your f@h client is installed, you have finished the installation! You can see how your folding process goes:
sudo origami status

Tip #5: Your origami configuration files are found in the /var/lib/origami/ folder. For example, my current CPU #1 configuration file is /var/lib/origami/foldingathome/CPU1/client.cfg

Tip #6: You can give a small boost to your folding process by making it use really low CPU instead of running when it's just idle. Execute:
sudo origami 
Wait for it to stop, then run your text editor to edit the configuration file:
gksu gedit /var/lib/origami/foldingathome/CPU1/client.cfg
Add the following at the bottom of the file:
Save and close your text editor, and restart origami:
sudo origami start

Enjoy folding proteins folks! :) You'll actually be helping out various medical fields, such as Alzheimer's and Huntington's disease researching.

Finally, take a look at these sites:

Saturday, September 13, 2008

Free rice!

Do pay a visit at - It's an amazing concept where the sponsors will donate 20 grains of rice for each right answer you provide! If you can't give financially, give by testing your knowledge.
There are various subjects to choose for answering! I took 10 minutes of my free time and summed 3000 grains of rice :)

Friday, September 12, 2008

Ranting developer

I recently stumbled upon an old thread about linux users searching for someone to create an autoit-like application for linux. Starting from this post the ranting begins, it's really fun, I went through the whole 5 pages laughing :)
Sometimes people don't understand "No", that's why developers head to the aggressive "Let me say it again: No you idiot!"

Nevertheless, if you're looking to automatize some of your basic daily work, you should be looking to learn bash scripting or even an advanced programming language such as perl or python - if you're still looking for something that handles windows and gui interface, try gambas or python-dogtail (or here).

Saturday, September 06, 2008

The sign language

I was watching a video clip the other day, Edo Maajka - To Što Se Traži (YouTube). I was astonished by the fact that the rap song was actually interpreted correctly using the same fluidity as if it was spoken.
People are always in need to communicate with someone in case something happens to them. And here kick in the various languages. Since programming languages aren't something that could actually help me communicate with another human being, I've been always fond of the sign language and I thought that the least I could do is to start learning simple phrases, such as "Are you OK?" or "Do you feel pain?".
The really intriguing part is that this kind of language is very plain, yet so complicated - combining orientation and movement of parts of your body (hands or arms), facial expressions or even hand shapes to fluidly express yourself. It's almost like learning how to grammatically speak right. It is also pretty cool to be able to understand what is someone trying to explain to you.
The bad thing is that, as spoken language, each region has its own established "jargon", it takes time to adapt to several expressions, depending on the region you're living in. Also, most regions or countries have their own sign language, which can get pretty messy if you, for example, try learning the sign language in english and head to live in Japan.
Despite the above fact, it can be useful for communication with babies, like this video shows a mother communicating with her 1-year-old daughter - it's really amazing, kind of makes me wonder what are the limitations of teaching a child at such young age!
Searching around using Google, I was able to get some information that might be a good starting place for anyone having the desire to learn this language. The best resource that I can recommend is the American Sign Language (ASL) Browser. Do try it out!

Monday, September 01, 2008

Keeping your Ubuntu clean

GNU/Linux is said to be one of the most stable operating systems in the market, which is why a lot of people prefer it as their server solution. But as a desktop, Linux and especially Ubuntu with GNOME, can get easily oversized without the proper care and before you know it, you end up with 1% free disk size of your root (or "/") partition; and taking up stress-relieve medicaments just doesn't seem right...

Here's a list of things I tend to do when such crisis strikes:
  1. Clear your Recent documents using the menu Places → Recent Documents → Clear Recent Documents
  2. If you use chat (IRC or Instant messaging), clear your log files.
    The following list contains client applications and their default folder log location:
    I strongly recommend closing your applications before removing any log files!!


  3. After constantly installing and removing software, some leftover information might be just clogging your disk space for no apparent reason. The apt-based package management has two commands when you remove packages: remove and purge. The difference is that purge actually deletes the configuration files that are deliberately left there when you used remove, in case you want to install it again.
    a) But which packages have their configuration files left over? Run Terminal (head to menu Applications → Accessories → Terminal) and execute the following command:
    dpkg -l | grep -i '^rc' | tr -s ' ' | cut -d ' ' -f 2
    Another way to find these out it to head to System → Administration → Synaptic Package Manager → Click "Status" (lower left corner) → Select "Not Installed (residual config)"
    Now in the package list, right-click on the package that you wish to completely remove (aka purge) and select "Mark for Complete Removal". Then you press "Apply" and let it flow.
    Tip: Press SHIFT+A to select them all.

    b) Leftover package dependencies that were installed with your applications might still be around. You can clear them all out by executing the following in terminal:
    sudo apt-get autoremove --purge

    c) Ubuntu packages are cached in the folder /var/cache/apt/archives/, which can also get clogged up by numerous packages that are either updated or not used anymore. You can solve that by executing in terminal:
    sudo apt-get autoclean
    sudo apt-get update
    If you really want to clear all the packages archived:
    sudo apt-get clean
    sudo apt-get update

    d) To remove obsolete packages go to System → Administration → Synaptic Package Manager → Click "Status" → Installed (local or obsolete) → Mark the packages you wished to be completely removed (or preferably removed).
    Warning: These section includes packages that have been manually installed by third-party packages (not from ubuntu repositories), if you need them, don't remove them!
  4. A lot of linux kernel versions in your GRUB boot menu? Time to get rid of them! Use step 3(d), and mark packages that begin with linux- for complete removal
    Warning: These section includes packages that have been manually installed by third-party packages (not from ubuntu repositories), if you need them, don't remove them!

  5. Clear the temporary files created with gedit - to do this, you have to search for them.
    Go to menu Places → Search → Click "Select more options".
    Now select "Show hidden and backup files" and click "Add".
    Also add the "Name matches regular expression". Next to this last one you will type ~$, which will find all filenames that end with "~" character and most of them are temporarily created by gedit (gnome's text editor). Press "Find".
    Now you can select the files you want to delete and right-click → Move to trash.

    Warning: Some files are temporary application files that are deleted when you end the application. It might be best not to mess around a lot with this one.

6. Clear your temporary flash-related cached files found in .macromedia folder by executing this command in terminal:
rm -rf $HOME/.macromedia/
(thanks Simon!)

Social life and recreational drugs: Smoking

  As modern humans, or homo sapiens sapiens, we have evolved greatly in a lot of areas - from creating ways of verbal and signal communication to the rapid development of economy, trading and science, as well as technology. While this exponential progression was successful so far, something has gone wrong the past century. In this errata belongs the use of recreational drugs.
  Drugs of this kind haven't been banned yet and people have a free choice of using them or not (most countries have an age-limit). Tobacco smoking, alcohol and caffeine are now three of the most powerful profit-making industries of the 21st century.

  By the mid-17th century, most major civilizations had been introduced to tobacco and recreational smoking; We should probably forgive the past generations for using them in neglect of the consequences of this type of drug use, but nowadays a lot of studies have shown the nasty effects of these indelicate habits, is there really a reason to use them? I'm surely not referring to medical patients which have a couple of years to live and seek to live it pain-free and pass away peacefully.
  Despite the way tobacco is taken, smoked, snuffed or chewed, the effects in a human being are devastating after prolonged usage, lung cancer and cardiovascular disease have boosted over the years and despite these facts, tobacco consumption is still increasing.
In the false belief that nicotine "calms down", humans intake large amounts of this drug in small dosage. This brilliant way of  taking up poison without even realizing it has enormous negative effects just after several years of constant smoking. You first start small; either as a need for relaxation, a window out of dullness or to become accepted in the "cool" or audacious sect of a social group. You continue the uptake in normal dosages every now and then. But, just like the body adapts to high or low temperatures in a number of days or your nose to an awful smell in a matter of 5 minutes, the same exact way your body becomes accustomed to tobacco as a normal intake.
  Taking it down slowly, you may think you can control it, but you find yourself in need to "relax" after an attempt to break the habit for several days. A parasite of your own free will has taken over your wallet, your pocket money, and your years to live. People cannot understand this and keep taking nicotine.
  A lot of people believe that smoking can calm you or provide you with extra alertness and concentration (increase of a substance called acetylcholine), that it can drop the level of anxiety (due to the release of beta-endorphins), that you can afterwards endure large psychological stress, which is not always true. As mentioned earlier, after several years of using tobacco, you become a slave to a regular dosage that tends to increase day by day, while you grow up and face the world's problems. Arousal? Probably the first couple of years. But what could happen in several years later is to reach a state of sexual disfunction (genital haemodynamic disruption).
  Finally, most people don't understand the cost of the cigarettes, since they dosage is small and for. An accustomed male or female might smoke one pack of cigarettes per day. Multiply the cost of the pack by 30 for a month. Suppose they cost 3 €, you would save 60 or 90 € per month for this nasty habit, which could be used for two nights at a lovely appartment outside town.

  All in all, the "great" or "pleasing" effects of nicotine only apply for a short timeline usage, longterm usage comes with great negative effects and therefore problems, may these be financial or health related. Your body doesn't need to relax every day, your body is a temple made of hard stone and marble, that can re-enstate itself back to normal after a good sleep of just one hour. Outdoor activity can prove much helpful to decrease anxiety, since you stress out yourself in exercise - this way you get a sexy body, ladies/men to want you and keep it healthy. I dare you to compare that to a "sitting-eating-mcdonalds-and-smoking" syndrome that an obese person's lifestyle might include.

  Recreational drugs of such sort can be controlled by seeking professional/medical help - don't let yourself reach a stage where you need such help.

To be continued...

Movie codec information - the gspot alternative

To be clear, no, I'm not talking about the ladies' G spot :) But if you're looking for GSpot Codec Information Appliance alternative tool for GNU/Linux, you're definetely looking for a tool like themonospot!
The monospot is written in C sharp (C#) using the MONO Framework and GTK#, licensed under GNU GPL, and it's a tool to extract information about various movie formats and reveals valuable information such as:
  • Video codec used
  • Frame size
  • Average video bitrate
  • File size
  • Total time
  • Frame rate
  • Total frames
  • Info data
  • Packet Bitstream
  • User data (in MOVI chunk)
  • Audio codec used
  • Average audio bitrate
  • Audio channels
This could definitely help you dig out the codec used for a specific movie you're trying to view. There various packages available for download, among them Ubuntu, Opensuse, Fedora, Windows and many more!

Wednesday, August 20, 2008

Belgrade BeerFest today!

Back from my "holiday" and (partly) ready to work. In other news, the famous belgrade beerfest is beginning today in the new place called "Ušće", located on the mouth of the Sava river (into the Danube).

Grab your backpacks, and stick around, plenty of beer participants and music to make you dance all night long. I might not make it for the whole night, but I will probably give it a go if I find the right company...

Last year I tasted the wonderful bilberry beer, my taste buds are eagerly looking forward to try this year's wicked flavour! :)

Friday, July 11, 2008

Bos taurus gas quarantined!

The gas produced by the cows' (Geek name: B. taurus) digestive system (aka GIT, short for gastrointestinal tract) is being tested, in order to see the share of effect to the global warming problem.
See it here.

What's next? Attaching tubes on human rear ends? :)

P.P.S. I'm establishing a miniposts tag, for such small posts!

Bigger is better.. computer-wise!

Burj Dubai
Bigger is better when it comes to bits, and a really small difference to the bits addresses can make an enormous difference, although there might be some physical restrictions in order to realise some dreamy performances and capacities.

After reading this post, a very, very informative post about getting your 32-bit Ubuntu to work with more than 4GiB memory, I got a question born.. so how is all this limited? I soon dug a bit deeper about 32-bit and 64-bit differences (reading freak that I am) and got to this wikipedia article.

Logically back in the 1980's, when the first personal computers were being developed, the processors were 16-bit and 24-bit. Their memory limitation is easy to be calculated: 216 (or 2^16, a short form without the use of superscript), likewise for 24-bit processors - they could support up to 2^24 bytes of RAM memory, so we have up to 64KiB (kibibytes) and 16MiB (mebibytes) RAM limitation respectively. Then came the 32-bit processors which could hold up to 4GiB of memory addresses.

In the meantime, Intel developed an extension called "Physical Address Extension", which in short terms it allowed 32-bit processors to use up to 36 bits, i.e. 2^36 = 64GiB (Gibibytes). A very vast improvement!

With the appearance of 64-bit processors it is possible to virtually use a really huge amount of RAM of 2^64 = 16 EiB (exbibytes or "exabytes"), but nowadays the problem is physical, as we can't produce such big amounts of memory - yet! Maybe in the near future, who knows. All I know is that I won't be the first person to test this exa-beast :)

To sum up, bytes do matter - vast colossal difference for just a few more bytes!

Note: During the writing of this post, I've learnt about the difference of Gigabyte (1000^3) and Gibibyte (1024^3), so I decided to respect the 2,4% difference and the correct use of GiB and KiB respectively using the IEC standard instead of SI :)

Friday, July 04, 2008

How to run simple local php script files without apache

Some said it's not possible. I've busted my head trying to figure out an easy way to test simple php/html scripts, which would run locally using only php, but wouldn't require running an apache server locally.

Well using two packages (which can be stripped to only one) I managed to create a bash script that will take the php script file and transform it to html (which is saved temporarily in the current directory), thus being able to run it easily in firefox. Here we go!

Firstly, install the packages, in Ubuntu:

sudo apt-get install php5-cli debianutils

From these packages we'll use the php command (php5-cli) and the tempfile command (debianutils)

Next we create the bash "phpview" convert script. Fire up the terminal (Applications > Accessories > Terminal):

gedit $HOME/

Inside place the following code:

file=`tempfile -d . -s .html`
echo "Creating file: $file"
php5 $1 > $file
firefox $file
echo "Press any key to delete the temporary html file or ctrl-c to stop this script and keep it"
echo "Removing $file"
rm $file

Save and close the gedit text editor and make executable:

chmod +x $HOME/

That's about it, we can create a test php/html file:

gedit $HOME/Desktop/hi.php

Place in the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="" dir="ltr" lang="en">
<body><?php echo "Hello world!"; ?></body>

Save and close.

Now let's test it!!

cd $HOME/Desktop
~/ hi.php


Monday, June 30, 2008

jDownloader for one-click download filehosting services

I've been looking for an open-source solution for ages for one-click host services, such as Rapidshare, Megaupload, the list is more or less endless. A downloader of this type is usually useful if you don't want to pay all those services monthly for a single download.

I have postponed this for some time, then I finally stumbled upon jDownloader!


It's java-based so you will probably need java:

sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-fonts

It features many useful stuff, one them is the cute interface (GTK-like), also many themes to appeal your eye. Moreover, you can use the Captcha Exchange Service with this nifty downloader. A built-in default CAPTCHA service is the jAC (java anti-captcha), which starts to automatically "learn" captchas and can make typing CAPTCHAs a breeze (Of course you have to type the first say 20-30 captchas).

Another great service is their addons, directly or downloadable through rapidshare, easily enabled and disabled through configuration (Don't forget to check "Expert mode" for more features!).

The downside is that it's sometimes buggy, still needs to be worked with. It also needs is a good language translator, since some important messages are still left in German, and... "Kein sprechenzi Deutche"!

But being limited, this downloader is the best so far, gets an overall score: 8/10 stars! :)

Sunday, June 29, 2008

How to convert raw to png image files

For most of you this is solved using RawStudio:
sudo apt-get install rawstudio

You run it from Applications > Graphics > Rawstudio, open your directory with the raw files, select them then go to the menu Batch > Add to batch queue
Then click on the "Batch" tab (on the right of the program). Choose the settings you want (no need to change the filename though).

There was a fellow at ubuntuforums with a Fuji camera that couldn't convert the raw (.RAF) images.
I provided the following solution:
sudo apt-get install ufraw
ufraw-batch --help

ufraw can be used for multiple batch processing of raw images.


[ -d $outputdir ] || mkdir $outputdir
list=`ls -1 | grep -i "\.raf$"`
for i in $list; do
fname=`basename $i | sed -e 's/\.raf$//i'`
ufraw-batch --overwrite --silent --out-type=png16 --size=$outputsize --output=$outputfile "$i"
ufraw-batch --overwrite --silent --out-type=png16 --size=$thumbnailsize --output=$thumbfile "$i"
echo "Done $i"

Saturday, June 28, 2008

How to create movie or video frame thumbnails

Ever wanted to know how to create an image that holds several snapshots of video or movie frames? A video or movie preview? With a graphical user interface?
The answer is QFrameCatcher!

I don't know about other operating systems, but in Ubuntu here's the way to build it. You'll need Qt4 and several other tools in order to build it and to make it work:

Note: I use Ubuntu Hardy Heron 8.04 amd64

sudo apt-get install libqt4-dev libxine-dev build-essential
tar xzf qframecatcher-0.4.1.tar.gz
cd qframecatcher/src

Now that you have the program built and running, let's check out some of its features in order to capture the movie "screenshots" along with other info about the movie file:

  1. Menu File > Options
    Frames to capture = set how many frames you want to capture
    Image width / height = the frame image width and height (not the BIG image)
    Margin = margin between frame images
    Columns = columns for the frame images - For example, if you set "frames to capture" as 24 and 6 columns, you will be creating a 6 column x 4 frame images in each column BIG image (kind of like the image I posted)
    Press Ok

  2. Load your movie / video file

  3. Click the "Save file" button to save them all in ONE BIG image, or "Save folder" to output each frame separately.

Friday, June 20, 2008

The reward for hard study

It's an examination period and I'm determined to pass the exams I have left, Biochemistry comes first. As all students, I don't have much to comment about my exams ;) I'm trying my best, with all the stuff going around my head, the birds flying and pretty girls walking by my apartment. It is not easy, I can tell you that! Bottom line is that I have to pass the year to go on with my life... and that actually means several sacrifices have to be made. As you can see, I haven't updated my blog lately, due to this - let's just call it "re-organizing priorities".
Sitting my rear all day long isn't something I always wanted to do, but there are really times when that is necessary, an exam period is a perfect moment to start practising! People that do extra study get a bonus reward for their hard work (besides passing grades): Hemorrhoids!
On the other hand, what I really don't like is that I've begun to forget my flawless English, with all the Serbian studying I start making critical spelling errors and pronunciation mistakes.

Concerning the "computer geek" world around me, has kicked off finally, and pretty well dare I say, the Ubuntu Cypriot Team has began its first steps to becoming a successful local team. It's still a bit foggy around the organization, but as theo said we could use some anarchy in our lives every once and a while.

Wednesday, March 12, 2008

Happenings of Mid-March 2008

It's been a while, lots of stuff to talk about. First and foremost, I'm beginning to get up again and stand on my own two feet, although my father's death will always be a painful memory. I've decided to prioritise my to-do list for this year, and guess what - it's more study time for me! That doesn't mean I won't post here, but it means that I will do it after I get to know with my books a little bit better. :) I don't need anyone watching over my shoulder to do this, I am aware that the buck stops with me, but biochemistry (one of the subjects left for me to pass) is a quite large subject with enormous books, it requires time, and it's not something you can test on a computer, run it and say "Ah, it works this way".
Secondly, I believe some of you must've heard about the fall of Serbia's Government. Although I am apathetic to the political scenery in Cyprus and Serbia, I must say it was a bomb waiting to explode, this way the two democratic parties get to bash each other about the fact that no-one was able to .
Thirdly, I signed up this puppy in blogrush, they say it's good for publicity, plus they have this nifty addon for blogs, that give you some interesting articles of what's going on in (their) blogosphere.
Bubbling thus, I have just made a bash script that checks whether you have duplicates of a screen -S something instance. I will personally use it along with "screen -S irc irssi". It helps in situations like when you want a connection waiting for you in the background, while you log in. I believe it can be used with gnome sessions. You can alter it in your own personal style, get it from here. Usage: bash screen-irc-check
Last but not least, I opened up my own personal reseller website named HellNetworks (not done yet, I'm working on it), providing people internet services such as IRC shells, logo design, web hosting, webspace, some programming skills, something for those extra funds for my medical studies.

Tuesday, February 26, 2008

Ubuntu Hardy Heron Alpha 5!

As a tech-enthusiast that I am, I couldn't resist trying out the alpha 5 of ubuntu 8.04, one of the early test releases for the most stable Ubuntu (they say that it will be supported for 5 years, woohoo!).

It's best not to try it out for production servers/desktops, it's not done yet, i.e. when I installed it, some applications were missing. Some of the most important (to my opinion) packages that weren't included by default were: bash-completion software-properties-gtk firefox-2

Mozilla's Firefox 3 beta is great, but it's missing add-ons, which add superior functionality to this wonderful internet browser.

It's a good thing that the maintainers at Ubuntu thought of adding it to the repositories. I know my way around things, so installing the missing packages was a breeze:
  • From the menu choose Applications -> Accessories -> Terminal
  • Enter this: sudo apt-get install bash-completion software-properties-gtk firefox-2
  • Type the password associated to your account
  • Enjoy!
If you can't find a package, try enabling the extra universe and multiverse repositories. Just install "software sources" aka software-properties-gtk then go to menu System -> Administration -> Software Sources, check the boxes next to multiverse and universe and hit the OK button and then the Reload button.

If this is too much hassle for you, try searching your packages at
Firefox-2 can be found here, or choose your architecture and a mirror afterwards: i386 (32-bit) or amd64/x86_64 (64-bit)
Finally, download the deb package, double click on it, and install.

Friday, February 15, 2008

How to backup deb packages

Say you've downloaded a .deb program and now you want to back it up on your AptOnCD, or even transfer it to a friend of yours. The problem are the dependencies. If you ever cleared your /var/cache/apt/archives/ using 'sudo apt-get clean' or 'sudo apt-get autoclean' and the archives cache is emptied, you probably know what I'm talking about.


apt-get is a bit limited for making backups, because it checks if you already have the package installed and it will eventually say that it is installed without downloading anything, so we'll use aptitude's "download" command, which is pretty straight-forward.
NOTE for Ubuntu Newbies: From the menu Applications -> Accessories -> Terminal

First, we check the dependencies of a package:
sudo apt-get update
apt-cache depends PackageName
Don't forget to change the PackageName to match the package YOU want to backup/download.

You'll probably have a big list. We need to convert all those into a single line using this handy command:
apt-cache depends PackageName | grep "Depends:" | sed -e "s/ Depends: //" | xargs -d "\n"

NOTE: This way you get the dependencies only. If you want the recommended, suggested and predepended packages along with it, use this:
apt-cache depends PackageName | grep "Depends\|Recommends\|PreDepends\|Suggests" | sed -e "s/ \(Depends\|Recommends\|PreDepends\|Suggests\): //" | xargs -d "\n"
We also need to create a directory where we'll download the packages:
mkdir debbackup
cd debbackup
Finally we do this, putting the multiple packages (obtained using the apt-cache depends command) in a single line:
sudo aptitude download Package1 Package2 Package3 Package4
or if you want to put everything into a line:
sudo aptitude download `apt-cache depends PackageName | grep "Depends:" | sed -e "s/ Depends: //" | xargs -d "\n"`

Wait for those lovely packages to arrive.
After that, if you want to use it with AptOnCD, you can take it from there to the apt archive.
Assuming you're still in the gnome terminal and still in the directory where you downloaded the packages:
sudo cp *.deb /var/cache/apt/archives/

All done! The packages are ready to be used with AptOnCD, or transferred to a friend :)

P.S. I've attached a screenshot to see how it's actually done.

Sunday, February 03, 2008

Serbian Presidential Elections - Round two, FIGHT!

The election countdown has begun while I am writing this post. After 31 days of presidential campaigns, unnecessary TV "air time" here we are. While they are bubbling in the television, with roughly the opinion of 64% of the population (around 4.3 million people), a person can think "Where did the rest of the population go or what where they doing all day?"
In my opinion, the result of the final round of Boris Tadić - Democrats - vs. Tomislav Nikolić - Nationalists? I'm not a politics freak - isn't much of a mystery for me, since the rest of the candidates that lost in the first round agreed to support Tadić. It's a disgrace how parties think they "give" their voters to someone, as if the voters don't have an opinion of their own. To make matters worse, I believe that people never really cared who was their "leader", as long as there is a shepherd that keeps the flock away from some wolves. The percentage speaks for itself.
On the other hand, the reason that ~36% of the people didn't reach a voting booth could be because they had to do more important things, like earn their income and I don't blame them, everyone has economic problems. But voting takes 5 minutes, come on!
One final excuse some stated was that the candidates didn't actually deserve their vote.
One thing I didn't like about the campaigns was that the candidates used the TV to broadcast their "message". OK, maybe there are immobile persons, but there are other persons that come back from their universities or work and want to sit in front of the television, watch a good comedy and relax.
I'd like to take the chance and thank online the RTS (Serbia's National Radio-Television network) for respecting our monthly payments and didn't approve any paid "air time".
We shall see who gets to roll the fancy limo!

P.S. Nothing like the good ol' democratic socialism and Tito as I've read and heard so much about those golden times :)

UPDATE: Boris Tadić won, who would've known! (if you read the post, you know the irony)

Monday, January 28, 2008

Launchpad logo community design contest!

As soon as I read at launchpad that there is a logo contest, I just couldn't resist, this is my chance to give something back! Although I'm not very experienced as far as logos come in question, I spent my 3 hours in front of a Ubuntu GNU/Linux operating system and playing around with Inkscape. If you become familiar with the few tool buttons on the side and their shortcuts (e.g. "select" is F1), you'll end up making masterpieces - OK, maybe I exagerate, but you will be surprised how easy it is to create a logo.

To checkout my submission click here. I've attached a PNG image of my SVG source so you don't have to *click* and *click* and *click* all over the place.

The only thing that Inkscape didn't have for you to use instantly was a triangle, a mathematical basic shape. Beyond that point, I am excited to have mastered yet another pointless part of imaging (no offense, but it's definitely not related to my future profession).

To sum up, put up your artistic hats and give it a go! It's fun to play around and create shapes and rockets! I felt like a 10-year-old for a second there :)

Update: Added another proposal!

Friday, January 18, 2008

Caregiving and ethics

Caring is such a simple word, especially when it comes to people very dear for you. Ever cared for someone so much that you simply don't know how to do it? There are a dozen of pages if you search right at Google for them using some of the google operators I blogged about in earlier posts (*hint* "how to" care *hint*).
Social care shouldn't just be shown for relatives, you have millions of persons waiting and deseve to be loved. I'm not allowed to name such groups of persons, everyone has their own pride and see this matter differently. Be gentle and reasonable, that is always the first step towards finding real solutions.
For example, while browsing the Internet, I stumbled upon a fresh caregiving service called bettercaring, giving people a literal opportunity for a care home. I don't know how reliable their services are, but it looks very promising from my browsing point of view.
On the other hand, some may not deserve it so much. If they see you care, they get very (and I mean VERY) impolite, using you around to get their job done and generally abusing your kindness.
Finally, there are some problems if there are patients that require better caring. As a student of medicine, I'm not allowed ethically to show that I care literally for my patient and that I should always keep a "status quo", but I believe I would be able to show my caring indirectly by running all the appropriate tests and diagnosing them carefully, while I do not express my inner thoughts. Racism is out of question of course. There are certain ways to hedge embarassing moments of racist and fascist criticism, I can give you two: 1) Keep it short when explaining, no need for adjectives of extra beautification. 2) If you do make the mistake and "cross the line" just kindly say "I'm sorry, let me rephrase that". If you follow these two golden rules you'll be able to overpass some misinterpreted situations or not come to them at all!

To sum it up, care for those that really need it, be kind to everybody (including the attention "hunters"), and watch your expressions while chatting or explaining.

Wednesday, January 16, 2008

Burried "Live Free or Die Hard"

I was rolling on the floor laughing when I first heard about this.

Emir Kusturica has symbolically burried "Die Hard" (or "ДИЕ ХАРД" as it wrote on the cross above the "grave") in a "Graveyard of bad films". OK, maybe the director wanted to pass his message that the film series wasn't good enough, but you can't say it's not HILARIOUS! Although I didn't personally like much of Kusturica's films, he has won two Palm awards so far, proving that at least some people respect his filmmaking geniousness.

I couldn't get to see the ceremony live, but once again, Youtube comes to the rescue:

Monday, January 14, 2008

Happy new year... with side-effects!

By the old calendar (see Julian calendar) today's the first day of 2008. It's sort of a family tradition to celebrate new year by the old calendar here in Serbia. Unfortunately for me, I got sick the day before.
What was the diagnosis? With my limited (yet) medical knowledge, I believe it was either cold (viral gastrointestinal infection?), gastroenteritis or just a grumpy stomach after so much eating these days - whatever it was, the emesis was inevitable! I remembered a movie scene, where people simply puked out some fake juice. In any case, mine was not just fake juice. We had a lot of dinners during my short stay in Cyprus, lots of friends wanted to see us, some of them just to see how we're doing, what have I achieved so far etc. It looks like I have overworked my poor stomach and it declared strike! :)
To make matters worse, a headache and fairly high temperature were presented shortly after the "sailing-at-sea" nausea feeling to the symptomas, therefore I had nothing else to do than start treating myself with a doze of a domperidone-based anti-emetic drug and paracetamol.

So, 2008 - new year, new expectations, new destinations, new romance, new... everything! May this year be the best for you and your family, enjoy it as much as you can, just don't forget to grab a book from time to time.

Update: Forgot to mention the celebration that happened yesterday at midnight, fireworks literally lit up the sky over the Cathedral of St. Sava, one of the biggest cathedrals in Europe. Here are some of the pictures, taken by B92: