Showing posts from 2013

XPDF Segmentation fault (core dumped) SOLVED

I have a friend with a Linux Mint based on Ubuntu 13.04 that has to use a Java program (jnlp); this program has some print features that doesn't open a print dialog but fires XPDF directly. That's very annoying, because there is no possibility afaik to change the default pdf program inside the application. I suppose that the command is hard coded in the application itself. The problem is that XPDF opens and shuts down immediately and no pdf is shown. Launching XPDF from a terminal window the following errors are thrown: $ xpdf main.pdf ***** MediaBox = ll:0,0 ur:595.276,841.89 ***** CropBox = ll:0,0 ur:595.276,841.89 ***** Rotate = 0 Segmentation fault (core dumped) After a lot of trials without any success I found the solution to fix that: sudo apt-get install libfreetype6-dev libmotif-dev wget tar xzpf xpdf-3.03.tar.gz cd xpdf-3.03 ./configure --with-freetype2-library=/usr/lib/i386-linux-gnu / --with-freetype2-include

Killing orphans and zombies

First please do not misunderstand me about "killing orphans and zombies". I'm for sure not going to hurt people without parents or people that are already dead :-( I'm talking about running processes that can be harmful for your system and shuld be better get killed. First of all a Zombie process is not an orphan process. As the word says, an orphan process is a procees without legitim parent, a zombie process is not alive but still have an entry in parent table. A process can be orphaned either intentionally or unintentionally. Sometime a parent process exits/terminates or crashes leaving the child process still running, and then they become orphans. In Linux/Unix like operating systems, as soon as parents of any process are dead, re-parenting occurs, automatically. Re-parenting processes whose parents are dead, means Orphaned processes, are immediately adopted by special process "init". Take a look to a htop situation where winexe causes a lot of or

Is your Linux log in pswd protected? yes! or...not.

I log in in my linux box with a username and password. I get the feeling that my stuff is more secured and not everyone have the access to it. Nothing is less true! It is easy peasy to change the password and let you in. I'm talking about a standard situation with no encryption or extra protection. How? Get ready... 1. reboot the system and select the Recovery Mode: 2. Now select “root – Drop to root shell prompt” and press “Ok” 3. If you forgot your username enter this command to see all the users: type ls /home you will see the folder of the user (i.g. nooby ) 4. Now use the following command to reset your password: passwd nooby Now enter your new password and confirm it. 5. Reboot typing: exit That’s it, you can now login with your new password. Do you feel now less safe?  If you are worried about this you should probably set various layer of protection such as Password protected bios and grub and encrypted disk information (at least /h

Are good solutions always expensive?

Almost every day I'm confronted with dilemma's and problems that need an adequate solution. Many people inside my company ask me advice about how solving problems or finding the best solutions for. Sometimes finding solutions means make investments or spend money to buy goods or services for the company. Expensive solutions seems almost always to be the best but… is that true? Before I take a decision on a matter I keep always a story in my mind about the NASA and the Russians; I don't know if this story is true, but I think it's a great example how sometimes things work. Read… "When NASA first started sending up astronauts in the cold space, they quickly discovered that ballpoint pens would not work in zero gravity. To solve this the problem, NASA scientists spent a decade and $12 millions to develop a pen that writes in zero gravity, upside down, underwater, on almost any surface including glass and at temperatures ranging from below freezing to 300 C. The R

Mysql backup shell script

This is a shell script that allows you to backup your MySql databases and mail a compressed file to you. Of course if the backup becomes huge, you can better set the mail option off. In the script you can give the database(s) you want to back up in an array. The script iterates the array and select the tables to back up. In the given folder there are 4 sub folders for back up rotation. Every day is the new back up dumped in folder 01.  Here below the script: #!/bin/bash # modify the destination directory to suit your environment export DB_BACKUP="/var/www/backup" # rotation ###################### # remove day 4 rm -rf $DB_BACKUP/04 # moves day 3 to day 4 mv $DB_BACKUP/03 $DB_BACKUP/04 # moves day 2 to day 3 mv $DB_BACKUP/02 $DB_BACKUP/03 # moves day 1 to day 2 mv $DB_BACKUP/01 $DB_BACKUP/02 # makes dir 01 for day 1 mkdir $DB_BACKUP/01 # end rotation commands ######### # define array of the database to bak up array=( db1 db

How to get a Mustek 600 CP scanner working in Ubuntu

I have an old scanner Lifetek that I bought years ago at the Aldi market. It is an old scanner I know, but I do not need some spectacular job, just sometimes a simple scanning job. The scanner does not work over USB, as I said it's a 'grand fa'. I faced the problem to get it working in Ubuntu under 'sane'. After some research I came to know that Lifetek is a sub brand that Mustek made for Aldi. With the following i was able to shake it alive: 1. Edit /etc/sane.d/mustek_pp.conf, by uncommenting the right line: # # Uncomment/customize to your needs ... mine was the first one # # scanner Mustek-600CP 0�378 cis600 #scanner Mustek-1200CP 0�378 cis1200 # scanner Mustek-1200CP+ 0�378 cis1200+ # scanner Mustek-600-IIIEP 0�378 ccd300 # 2. Edit /etc/sane.d/dll.conf by uncommenting mustek_pp: mustek #mustek_pp --- THIS LINE FOR NO USB SCANNER mustek_usb 3. Save the following script as /etc/init.d/mustek: #!/bin/bash chmod 777 /dev/lp0 # Does it hurt? chmod 7

Broadcom wireless on Unbuntu

I got a lot of headache when I had to reconfigure the wireless of my wife's laptop after installing xubuntu. My wife's laptop is a Dell Vostro 1000 with a Broadcom card (BCM4311). This is a issue because it is not supported out of the box. After a lot of trial and error (a lot of) I found the way of getting it work. Here below the commands: open a shell box and digit: sudo apt-get update sudo apt-get remove --purge bcmwl-kernel-source sudo apt-get install linux-firmware-nonfree sudo modprobe b43 sudo reboot   After these commands the pc should reboot and you should have your wireless up and running. Do not forget to check that the laptop hardware wireless is ON. If it doesn't work... please do not shoot on the pianist!

Secure GET

This class can generate and validate URLs to prevent tampering. It takes an associative array of parameters to pass in a link. The class assembles the link parameter keys and values and adds an extra parameter which is the SHA1 value of all parameters adding a secret prefix and a suffix salt values. The class can also verify if the parameter values are correct in a page of the previously generated URL checking against the passed SHA1 value. Download the package at The class: class secure_get { var $arr_get; var $salt1; var $salt2; var $sha1; var $link; function __construct(){ $this->salt1 = 'e5dg6hyt7u8fgigg802s'; $this->salt2 = '4nfgs5asdd320dkjh7kd'; } public function secure_make($arr=array()){ $this->sha1 = $this->salt1; $this

About "Real scripting"

Hi everyone; I'm a rich internet applications developer and I will publish in this blog everything I think is useful to avoid you some headache. Useful scripts in php, shell, vbs and JavaScript. I will publish other info too that maybe will help you in your search journey on the web. If you need professional developing you can reach me also on my website Today I was implementing the Gapi Google analytics php interface and I struggled in a issue in the account settings. This is the url of the class: In order to get you data from Google you have to fill your account data (see below): define('ga_email',''); define('ga_password','your password'); define('ga_profile_id','your profile id'); Right, everything OK till the ga_profile_id ; this id seems to me almost impossible to find in your dashboard. I tried the id's of the tracking