Linux Tip #3 : Using Arabic keyboard
It is really simple to use Arabic in Linux. This command enables it:
setxkbmap -option grp:switch,grp:alt_shift_toggle,grp_led:scroll us,ar
You can make this command run each time the computer starts by adding to ~/.bashrc .
This command in short, set the switch keys to alt-shift (left alt and left shift), the mode of this key is to toggle, and it specifies that the state of the scroll-lock LED will show the language currently used. Use ‘man setxkbmap’ for more details on advanced use.
The Windows Hosts file
windows has a very special file named the hosts file, it is located in
%SystemRoot%\System32\drivers\etc\hosts
this file allows u to define a domain & its IP, just like a DNS, but a local one but
without server, it also allows u to block a specific website, domain or any thing, only by giving it an IP that is not the real one, so there will be nothing to accept the connection
Q: WHAT MAKES IT A HELPFUL THING ??
A: coz simply if u have a program that makes some sort of validations on the server, that u dont want to happen, u can do that
ur only problem is just u have to know where it connects, but there is alot of tools & ways to determine that.
its also useful since u wont need a firewall to do that, its just a local file
1- just open it from the RUN command
2- select notepad & thats it
u’ll actually find the LocalHost IP there, with the domain named “localhost”
add whatever u want in the same format as the other & that should be it
Installing JDK6 On Ubuntu
Ubuntu is a great linux distribution. I have been using it for some time and it has never failed me. I have tried to use JDK6 with it but i didn’t find a .deb package neither on sun’s website nor ubuntu repositories. Fortunately, there is a way around that.
First, you need to download the JDK binary from here. I have downloaded jdk-6-linux-i586.bin the one suitable for my computer and most of us.
Second, chmod it to make it executable:
chmod 755 ./jdk-6-linux-i586.bin
Third, run the binary you have downloaded using this command:
./jdk-6-linux-i586.bin
then press yes to agree to the licence. After that you will find a new folder called jdk1.6.0
Then, you need to move this folder to use/lib/jvm using this command:
sudo mv jdk1.6.0 /usr/lib/jvm
You will need to enter the root password to do that.
sudo update-alternatives –config java
Selection Alternative-----------------------------------------------1 /usr/bin/gij-wrapper-4.1*+ 2 /usr/lib/jvm/java-gcj/jre/bin/java Press enter to keep the default[*], or type selection number:
Those are the JVM’s that currenlty exist.
Now we have moved the JDK to the folder where JVM’s exists, but we need to enable the system to recognize it really exists
This command will finish all these thing:
update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.6.0/jre/bin/java 60 \--slave /usr/share/man/man1/java.1.gz java.1.gz /usr/lib/jvm/jdk1.6.0/man/man1/java.1
Check the JVM's again:
sudo update-alternatives --config java
There are 3 alternatives which provide `java'.
Selection Alternative-----------------------------------------------1 /usr/bin/gij-wrapper-4.1*+ 2 /usr/lib/jvm/java-gcj/jre/bin/java3 /usr/lib/jvm/jdk1.6.0/jre/bin/java
Press enter to keep the default[*], or type selection number:
Now JDK 1.6 exists but it’s not the default.
sudo update-alternatives --config javaThere are 3 alternatives which provide `java'. Selection Alternative-----------------------------------------------1 /usr/bin/gij-wrapper-4.1+ 2 /usr/lib/jvm/java-gcj/jre/bin/java* 3 /usr/lib/jvm/jdk1.6.0/jre/bin/java Press enter to keep the default[*], or type selection number:
Now, select the one that contains JDK1.6.0, which will be 3 in this case.
You are done.
References:
http://trac.centricware.org/wiki/2007/01/28/21.58