Monday, March 22, 2010

Import your Delicious Bookmarks to Firefox OR get a XML backup

Have you ever had the need of having your Bookmarks in Delicious.com imported to Firefox so that you can browse through them easily from your address bar? Or do you ever needed an XML backup of all the Bookmarks you saved in Delicious? Safety first! You don't like to lose whole bunch of bookmarks collected for years get lost just because you forgot the password or the site is broken down, right?

The main reason I wanted this is to import the bookmarks into my browser, Mozilla Firefox. So that I can pretty easily search through them by the enhanced address/location bar.

To get a XML backup, use the following command,  

curl --user deliciousName:password -o DeliciousBookmarks.xml -O 'https://api.del.icio.us/v1/posts/all'

(The downloading location is  https://api.del.icio.us/v1/posts/all )
Give your Delicious user name and password at necessary places. ("curl" is the command that is used to download content from a given URL.)

Importing into Firefox is pretty much simple. You don't have to go through command line options. Here's how it is done.
1. Log in to Delicious and go to settings.

2. In it under Bookmarks section you can find Export/Backup Bookmarks. Click on it.
3. On the opened page, make sure you have checked "Include my tags" checkbox. Then Click on "Export".

4. Save the file in a suitable location. (If not prompted to save it, it'll be at your Downloads folder.)
5. Backing up is done. Now to import them to Firefox, go to Bookmarks -> Organize Bookmarks

6. Go to Import and Backup -> Import HTML on the opened dialogue box.
7. Then the Instructions are easy. Just follow the steps and give the file when asked to.

All done. Good Luck with that! :)

Wednesday, March 10, 2010

Install IntelliJ IDEA on Linux

Here's a simple way to install IntelliJ IDEA on Ubuntu. I've done this on all Ubuntu Karmic Koala, Lucid Lynx and Maverick Meerkat. This worked just fine on Gentoo Linux too.

1). Install Java (Use Sun JDK. OpenJDK is NOT recommended as the JDK.)
sudo apt-get install sun-java5-jdk
It seems sun-java5-jdk is no longer available now. Refer Oracle Java SE Downloads for Linux and it's installation instructions. Keep the path in your memory; you'll need it when setting up $JDK_HOME path variable.

Then, to make sure that it is installed properly, type
java -version
if the version shows, then it is installed successfully.

2) Now, install IDEA
Download IntelliJ IDEA from the below link
 http://www.jetbrains.com/idea/download/index.html#linux
 Unpack the downloaded archive (ideaIU-9.0.3.tar.gz) by,
     tar xfz ideaIU-9.0.3.tar.gz
(match the file name to your version!)

 Move the extracted archive to /usr/lib
     sudo mv idea-IU-95.429 /usr/lib

3) Configure PATH variables for JDK_HOME and IDEA
     sudo gedit ~/.bashrc
Add following for JDK_HOME to the file, make sure to change the path to reflect your java installation directory.
export JDK_HOME=/usr/lib/jvm/java-6-sun
Append the line for PATH variable with this, /usr/lib/idea-IU-95.429/bin . Finally, it should look like this.
export PATH=$PATH:/usr/lib/idea-IU-95.429/bin
Now, run `source ~/.bashrc` to take effect the changes.

4) Run IDEA  by entering following in the terminal
   idea.sh (or sh idea.sh)

NOTE: If you get permission denied error, then you will have to set the correct permissions to idea.sh file by `sudo chmod 755 /usr/lib/idea-IU-95.429/bin/idea.sh` 

For easier execution, create a "Custom Application Launcher" at top panel. Access it via; right-click the top Panel -> "Add  to Panel" -> double click "Custom Application Launcher". Browse and give an icon if you like. Then, use a command similar to,
sh /usr/share/idea-IU-95.66/bin/idea.sh


Custom Application Launcher Properties




If you have any problem in setting up this, drop a comment below. Well, even if you got right, just tell me so. Love to hear that too! :). Good Luck!
 

Wednesday, March 3, 2010

Thursday, February 25, 2010

Copy files over a network in Linux via scp command

SCP which stands for Secure Copy Protocol is a command line tool that can be used to connect to a remote host and copy files between two hosts. it uses ssh for the file transfer. Here I'm going  to show you how to do this.

Before doing the file transfer you need to have the ssh installed.
sudo apt-get install ssh
After that reboot the machine or enter the following command.
/etc/init.d/ssh restart
The command used to copy files is,
scp [options] source-file [user@to-host-ip:]
Some of the [options] that may be used frequently include,
-r :Recursively copies entire directories. Use this if you are copying directories
-l : Limits the used bandwidth, specified in Kbit/s

'user' is a user in the remote host, and 'to-host-ip' is its IP address. Type command ifconfig on remote host to get to know the IP address of the it.

Full command according to the manual(man scp) is,
scp [-1246BCpqrv] [-c cipher] [-F ssh_config] [-i identity_file] [-l limit] [-o ssh_option] [-P port] [-S program] [[user@]host1:]file1 ... [[user@]host2:]file2
For example, to copy a directory named scpTest/ from your machine to a remote host(user-name:kasun, ip:10.100.1.220), Go to the Directory which contains the scpTest/.
type,
scp -r scpTest/ kasun@10.100.1.220:
(Note the colon : at the end.) It will ask for the user password. Provide it and the progress meter appears showing the progress of the file copying. Files/Folders will be copied to the home folder.

That's it! Just ask/comment if you got any problem.

Wednesday, February 17, 2010

Google Chrome Extension: Delicious Bookmarks

In my leisure time, I've got some time to do an extension for Google Chrome. I've been doing an extension for Firefox, so had some interest doing one for Chrome too. So, I created this extension "Delicious Bookmarks".

Google Chrome started support for extensions just abut 9 months ago for it's developer channel.(Developer Channel is the unstable version of Google Chrome; unstable than Beta version). And in early December 2009, Beta version of Windows release came with extensions enabled. With that Chrome Extension Gallery is opened, a common platform to download and install extensions, like Mozilla Firefox Add-on site. And in late January 2010 Google Chrome removed the beta tag off its extensions and now they are enabled for the stable general version. For Linux, extensions are enabled for it's beta version as of now.

Enough History! Let's talk about the extension I've done. As you may know Delicious is a online social bookmarking site for storing, sharing, and discovering web bookmarks. I've been addicted to this very much. If you go through my profile you may see that I've bookmarked more than 200 bookmarks in it. As I moved on to Google Chrome after using Mozilla Firefox some time, I had the need of having a simple extension to quickly and easily save bookmarks. And I'm sure most of the folks who are using Delicious would be loved to have a this kind of extension.

This is a simple, easy to use extension with a user-friendly interface. All the generally needed features such as tagging the bookmarks, writing  down notes, send to twitter etc. are available. So why don't you try it yourself!

Friday, February 12, 2010

Make Windows XP drivers work under Linux through ndiswrapper

Ndiswrapper is a wrapper that can be used to wrap windows drivers enabling them to use under Linux environment. This is available for drivers of wireless network devices. The supported devices can be found here.

Here, I will tell you how to configure D-Link DWA-120 wireless USB adapter to work under Linux. I did this in Ubuntu 9.10. As I've seen this should work for D-Link DWA-110 adapter as well.

  1. Plug the device
  2. Enter following commands in the terminal.
sudo su
-Perform following in root.
apt-get update
apt-cache search ndiswrapper
-In it you can find ndiswrapper-common, ndiswrapper-utils-1.9 packages. Install them by,
apt-get install ndiswrapper-common
apt-get install ndiswrapper-utils-1.9
-Change the folder to where the windows XP drivers for your network device is.
ndiswrapper -i filename.inf
-Give the name of .inf file for the driver. For DWA-120 it is netA5AGU.inf
ndiswrapper -m
modprobe ndiswrapper
Add the line "ndiswrapper" (without quotes) at the end of the file /etc/modules using command "sudo gedit /etc/modules" to load the driver every time the system loads. If you do not want to load the driver automatically, do not edit this file. Instead, enter following command at terminal to turn on the adapter.
sudo modprobe ndiswrapper
3. reboot the machine

All done. You can check whether your device working by typing "iwconfig".


This is how I enabled my wi-fi adapter to connect to wi-fi network. Does this helped you to as well? Any particular issues you encountered? Let us know in the comments.