Wednesday, December 12, 2012

JAVA_HOME on Linux Bash

How to Set JAVA_HOME / PATH variables Under Linux Bash Profile

If the command echo $JAVA_HOME returns no result , 
it means that JAVA has no HOME and could not work properly
in Palo OLAP Server with embedded Tomcat .

The following command shows the path to java executable on Linux : 
# which java
WHICH command result on Ubuntu , Mint :

after EXPORT command : 
export JAVA_HOME=/usr/bin/java
if we check again , JAVA has a HOME
# echo $JAVA_HOME

if I'm running again the script from 
the result is :
The BASEDIR environment variable is not defined

This environment variable is needed to run this program

Tomcat & catalina issues

The error message says you have to set the environment variable BASEDIR.
Set it to the Tomcat installation directory, for example:

export BASEDIR=/usr/local/tomcat


Monday, June 18, 2012

Fedora 17 groupinstall GNOME

Desktop Environment is not neccessary for Server usage, 
but if  required one can install it with two commands : 

[root@dlp ~]#  yum -y groupinstall "X Window System" 
[root@dlp ~]# yum -y groupinstall "GNOME Desktop Environment" 

Input a command like below after finishing installation of new packages.
[root@dlp ~]# startx

Thursday, May 10, 2012


oVirt platform enables you to create virtual machines that perform the same functions as physical
machines. Using a standard Web browser, users can run virtual machines that behave like physical
desktops. Multiple levels of permissions allow users with different roles to manage virtual machines to
meet the requirements of the enterprise.

The SPICE protocol allows the virtual machine to connect to the host with physical PC-like graphics
performance. It supplies video at more than 30 frames per second, bi-directional audio (for soft-
phones/IP phones), bi-directional video (for video telephony/video conferencing) and USB redirection
from the client’s USB port into the virtual machine. SPICE also supports connection to multiple
monitors with a single virtual machine.

Fedora 16 - install 64-bit Flash Player 11

Adobe finally released their native 64-bit flash plugin ... 

Fedora 16 (64-bit) how to
yum install

yum install flash-plugin.x86_64

Enjoy 64-bit flash in Fedora 16 

Friday, April 13, 2012


So, I've been trying to get Ecplise to work with the SVN trunk, but I keep on getting errors : 

Some of selected resources were not committed.
svn: Commit failed (details follow):
svn: MKACTIVITY of '/svn/!svn/act/211517ad-3601-0010-bf2a-d36de0e8e97a': 405 Method Not Allowed (
svn: MKACTIVITY request failed on '/svn/!svn/act/211517ad-3601-0010-bf2a-d36de0e8e97a'

I figured out what the problem was. It turned out that I was not 
grabbing the svn from https, just the http. Either I missed the "s" 
key when typing it in or what, I don't know. But, it is all fixed now. 

I had on the label HTTPS but on the URL there was only HTTP : 

SQLite plugin for Eclipse

How to browse an Android SQLite Database from Eclipse Kepler

CellObject SQLite Browser :

Questoid website is down and the jar can be downloaded from :

Requirements and how to use CellObject SQLite & XML Browser at

Java Sources at Google Code :

How To Install:

Inside the downloaded .zip/.tar file there's a .jar file named net.cellobject.sqlitexmlbrowser_1.2.0.jar. 
Just copy this jar file into the "plugins" folder of your eclipse installation directory, then restart your eclipse.
That's it.

I needed to create an SQLite database for an Android application I was working on. I wanted to browse the database of my application from within Eclipse, instead of pulling it out and browsing with another application.
If you just want to do a little bit of debugging, see if your tables get created the way you want and similar things, there is a very nice plugin for Eclipse that might fit you:
  • Download  the CellObject SQLite & XML Browser plugin.
  • Unzip it
  • Put the .jar file you just extracted inside your eclipse plugin folder (/plugins)
  • restart Eclipse.
  • Start your emulator or plugin in the device on which you installed the application you want to test
  • Open the DDMS perspective in Eclipse (Window —> open perspective —> other —>DDMS)
  • Select your application database (you find it under data/data/[yourapplicationpackage]/databases)
  • Now click on the icon of CellObject browser on the upper right, it will open the CellObject SQLite Browser View.
Instead of Opening DDMS, we can open the CellObject SQLite & XML browser in our Java perspective itself by opening it from Windows--> Show View --> Other --> Other --> CellObject SQLite Browser...

adb shell
sqlite3 /data/data/
adb pull /data/data/ .
sqlite3 DatabaseName.db

Other solution :

Thursday, March 22, 2012

OpenSUSE - VNC - Remmina

You can find this app in Ubuntu repo., however, it's not the case of OpenSUSE.
After googling for some minutes, I found solutions as follow:

linux:/home # zypper ar -f
linux:/home# zypper install remmina

Tuesday, March 13, 2012



You can use Lightning to get a calendar that's fully integrated with Thunderbird, but what about Google Calendar synchronization? Well, there's an extension called "Provider for Google Calendar", which lets Lightning read and write events to Google Calendar. 

For older Ubuntu versions (11.04, 10.10 and 10.04), you can install Thunderbird 10 (soon, version 11 will be available) using the stable Thunderbird PPA: 

sudo add-apt-repository ppa:mozillateam/thunderbird-stable
sudo apt-get update
sudo apt-get install thunderbird

sudo apt-get install xul-ext-lightning xul-ext-gdata-provider


Tuesday, March 6, 2012

BIND allow-recursion

Configure Bind

You should always set up at least two name servers, and designate one as the master.
Do not use these files without modification. These files must be modified to match your hostnames.
  1. Create /etc/named.conf for the master server. Note that the path for the db files ( var/named/ ) is specified in the named.conf file. The format for version 9 is different from that shown in the book. In this example, the access control list (acl) is disabled.
  2. Change the pid-file location to /var/named/ This is necessary because named is not being run as root and can't access /var/run.
  3. Create named.conf for the slave server(s).
  4. Create user 'named' and group 'named'. In /etc/passwd:
     named:x:44:44:Nameserver Daemon:/var/named:/bin/nologin 
    In /etc/group :
  5. Create a /var/named/ directory, owned by named.named and put the db files there. They should also be owned by named.named. Make sure /var/named/ has the following permissions:
          drwxr-xr-x   2 named    root         4096 Apr  1 14:42 named
  6. Set the options in named.conf as needed for security.
    options {
            directory "/var/named";
            pid-file "/var/named/";
            allow-query { "any"; };
            allow-transfer {;;};
            allow-recursion {;;};

    The "allow-recursion" option prevents third parties from leeching your bandwidth by using your server instead of their own server to do their DNS. With this line, only the specified networks are allowed to perform recursive queries, i.e. queries about names for which the server is not authoritative. Answering recursive queries also makes your server vulnerable to cache poisoning.

dan_delspam wrote:
> Hello.
> I am trying to setup a DNS that is a master for the world and a caching
> name server for the localhost only.
> I have been able to setup something quite near of this, but here is my
> problem:
> When I do a query of an external domain name from the outside, the
> query is properly blocked. However, if I do query the server from my
> server (localhost) for the same domain name, and then try the first
> operation of querying the server from the outside, then the query is
> successful that time.
> To be clearer:
> 1. external query blocks ok:
> from ip nslookup
> *** Can't find No answer
> 2. internal query works fine as wanted:
> from ip nslookup
> Name:
> Address:
> 3. external query like point 1 again is accepted this time:
> from ip nslookup
> Name:
> Address:
> It's like if the 'allow-recursion' directive would not allow to make a
> recursion (relaying the request to the source DNS server), but would
> still allow external requests to access the internal cache of the DNS.
> I don't know if this is the normal behaviour, bu my question is to know
> if there is a way to block all requests of domain which are not my
> master domain names for the outside.
> I thought that this directive would take care of it, but it doesn't
> seem so.
> Can someone also try that and tell me if this is happening elsewhere or
> if this is a misconfiguration of my DNS ?
> I am using Bind 9.2.4-2 on a CentOS 4.3 server.
> Here is my configuration file (top only, the rest are only zones):
> options {
> directory "/var/named";
> recursion yes; // prevent caching for all by default,
> overridden below.
> allow-recursion {;};
> dump-file "/var/named/data/cache_dump.db";
> statistics-file "/var/named/data/named_stats.txt";
> query-source port 53; // because firewall allows port 53 only
> allow-transfer {"none"; }; // transfer will be allowed per
> zone below.
> };
> controls {
> inet allow { "none"; };
> };
> Thanks for any help.
> Daniel

Answering from cache doesn't require recursion, so allow-recursion has
no effect on it.

1) Use separate views for inside versus outside, with recursion turned
off for the "outside" view (this will result in a "root referral" being
returned if something outside of your hosted zones is queried),
2) Only allow queries from your internal clients by default, and then
override that default with an "allow-query { any; };" on each and every
zone you host to the Internet (this will result in a REFUSED response
being returned for queries outside of your hosted zones), or
3) Wait until BIND 9.4.0 comes out, since it addresses this need with
"allow-query-cache", see
(REFUSED also).

ISC Support Bulletin - July 2007 
Document last updated: 2007-07-30 

There has been some confusion surrounding the changes to the "allow-recursion" and "allow-query-cache" options made with BIND 9.4.1-P1. 

This document will attempt to clarify the change and the impact that it makes on BIND servers. 

In BIND 9.3, there was no segregation of queries between cache and authoritative data. 

The release of BIND 9.4 added fine-grained differentiation between queries against authoritative data ("allow-query") and cached data ("allow-query-cache"). This allows more precise control, particularly if you do not want your clients to use any cached data, for example, in an authoritative-only nameserver. 

Prior to the release of BIND 9.4.1-P1, the default action of "allow-recursion" and "allow-query-cache" was to permit the query. The P1 patch to BIND 9.4.1 caused two changes in this behavior: 

1) If not explicitly set, the ACLs for "allow-query-cache" and "allow-recursion" were set to "localnets; localhost;". 

2) If either "allow-query-cache" or "allow-recursion" was set, the other would be set the same value. 

Upgrading from the BIND 9.3 branch to BIND 9.4.1-P1 will significantly restrict those servers that were previously recursive servers for more than "localhost; localnets;" unless configuration changes are made. 

To retain the behavior prior to BIND 9.4.1-P1, the following entries should be created in your named.conf file: 

 options {
     allow-recursion { any; };
     allow-query { any; };
     allow-query-cache { any; };

We strongly advise against this configuration because clients spoofing queries can use your servers to launch distributed denial-of-service attacks. 

The recommended method is to create ACLs that match hosts that should be allowed access to cache and recursion on the servers. For example, if you wanted to provided recursion and access to the cache to clients you trusted, you could list them in an ACL such as the following: 
 acl "trusted" {;;
 options {
     allow-query { any; };
     allow-recursion { trusted; };
     allow-query-cache { trusted; };

This example ACL includes and as sample networks that would require access. You must replace these sample networks with networks that correctly reflect your environment. This will allow anyone to query your server for authoritative data, but only those hosts within the "trusted" ACL access to your cache and recursion. 

Thursday, January 5, 2012

Reinstalling GRUB2

Howto reinstal GRUB2 with UBUNTU LTS LiveCD

Boot the LiveCD Desktop.
Open a terminal by selecting Applications, Accessories, Terminal from the menu bar.
Determine the partition with the Ubuntu installation. The fdisk option "-l" is a lowercase "L".
Mount the partition containing the Ubuntu installation.
sudo mount /dev/sdXY /mnt

  • Run the grub-install command as described below. This will reinstall the GRUB 2 files on the mounted partition to the proper location and to the MBR of the designated device.
    sudo grub-install --root-directory=/mnt /dev/sdX
    Example: sudo grub-install --root-directory=/mnt /dev/sda

    In Grub 1.99, introduced with Ubuntu 11.04, Natty Narwhal, a new switch is available which more clearly defines where the grub folder is placed. The command above will still work with Grub 1.99, but the following command is preferred by the developers. The target directory in the command is the command into which the grub folder will be installed. By default, and without the switch, the location is /boot/grub. In these instructions, since the Ubuntu partition is mounted on /mnt, the target would be /mnt/boot/grub.
    • sudo grub-install --boot-directory=/mnt/boot /dev/sdX
      Example: sudo grub-install --boot-directory=/mnt/boot/ /dev/sda

      Refresh the GRUB 2 menu with sudo update-grub