andLinux andWindows7

November 7th, 2009 admin No comments

I have been doing PHP on Windows till now, but a week back I realised that I wanted something which Windows couldnt give me. The pcntl_fork( ) function was not implemented on windows. So I had to either do PHP on a remote shell or install linux on separate partition. Remote shell wasnt a bad idea because I already had an account on freeshell.de and they had all PHP functions enabled. But there was not Gnome/KDE and I had to settle for vim. Then I decided that I will run Linux through VMware. I had tried this even before, and knew that it would be painstakingly slow.

Luckily I came across andLinux when I was googling for vmware. I thought I will give it a try .. 200 MB wont take much time. The installation was quick, just keep “next”ing and Voila , linux is installed in 5 minutes.

Trying to be smart,I selected it to run as a Manually started windows service so that it would boot up when required only. This small step made me spend a lot of time trying to fix a major issue. The issue was that , after the andLinux service is started, I cannot run any linux application which has a GUI , which actually includes even the Terminal. The error was

“Gtk-WARNING **: cannot open display: 192.168.11.1:0.0″

Googling gave a lot of links leading to a a few linux forums. But I couldnt find a fix. FInally I gave up, and thought of shutting down windows and going to bed. With a dejected heart, I clicked on the Start Menu and was trying to find the shut down button. Amidst the cluttered rack of icons, I saw the “All Programs” button highlighted. I clicked on it to see andLinux folder also being highlighted in orange. I kept clicking orange coloured links to finally reach something called Xming. Clicked on it and to my surprise every linux application started working. Later I came to know that Xming was nothing but X server for Windows. It had got disabled because of making andLinux boot manually instead of automatic. I happily went to Synaptic package manager and installed Apache,mysql , php and also gPHPEdit.

Now I have a fully working copy of linux running ubuntu 9 inside windows 7. The speed is amazing. All the linux window will appear beside you windows’ window. You can make use of linux for development only, without even booting up Linux.

Andlinux ubuntu 9 on windows 7 screenshot

Andlinux ubuntu 9 on windows 7 screenshot

Now I wanted to access my files which were in windows through andLinux. So I read the documentation on their site which said that Samba is enabled by default and can access windows shared files. But I was facing problems due to windows firewall. So I disabled firewall, and shared my entire windows partition ( with the appropriate permissions .. of course ). And executed the /etc/rc.local file. It said permission denied even after trying sudo. The problem was that my windows username didnt have a password. So I had to leave it blank in the smbpasswd file which gave a input error. So i gave my username as my password, which didnt work either. So i setup my windows username with a password and specified it in the smbpasswd file and ran rc.local again. VOILA !! it mounted and I was able to read and write to my windows partition.

Now I wanted one more thing. Remote ssh from outside my home network. SO I reached office, accesed my comp through logmein.com and starting setting ssh. Doing a ps said that sshd was running. So i tried to login to ssh from my windows machine by putting the IP as 192.168.11.150. It worked. But my router wasnt able to ping 192.168.11.150. So I tried ssh to 192.168.11.1 and the connection ws refused. So I again went to the colinux site and found out that the settings.txt file in the andLinux install folder had to be edited to add the port forwarding option through windows. The following line had to edited

eth0=slirp,,tcp:22:22/tcp:80:80

Now i restarted my windows 7. Ran the andLinux service. Then I forwarded  port 22 on the router to port 22 of the windows ip (mine’s 192.168.1.90) and tried out www.canyouseeme.org for port 22 and it reported a success.

Finally I was able to access ssh from the outside world.

Now I wish I could run Beryl/compwiz on windows 7 through andLinux… that;ll be awesome.. andLinux folks- gr8 job.

(P.S: If your linux takes a long time when it tries to run local boot scripts (rc.local) , try disabling windows firewall through control panel. It worked for me )

Categories: Misc Tags:

Flash iPhone widget (with sourcecode) for subscribing to Google SMS channels

November 1st, 2009 admin 2 comments

This widget will enable your site visitors to subscribe to you google sms channel just by entering their mobile number. An invite is sent to their mobile phone automatically.

Please wait till the widget loads

Get Adobe Flash player

Source code (.fla) and backend php script with cURL will be posted soon.

The php curl script will automate a user login to google sms channel ( define username/password in the php code ) and then will send an invite sms to the number specified through the iphone UI. I also had written a script which will send a group sms to all your sms subscribers without actually logging-in to Google sms channels. I will try to find the script and post it here soon.

Hi(gh)tec(h) city

June 28th, 2009 admin 2 comments

The reason I am writing this post is this. I got recruited into Oracle through my campus placements. And I got to know that I will be posted in hyderabad only a month back.  The offer letter said that I am supposed to report to Hitec city by June 29th 09. Naturally I was curious to know whats sooo HIGH-TECH about that place. So I Googled to find the wikipedia entry and a couple of blogs. But I wasnt happy with the info about the city. So I decided I’ll make a post containing more info about it after I reach. Here it comes , the complete guide to Hitec city…

HITEC stands for Hyderabad Information Technology Engineering Consultancy City. It is the technology hub of Hyderabad. Its about 15 - 20 kms from the main Hyderabad city.  You can find more about it in the wikipedia entry.

So if you are one of those who are lucky(?) enough to be posted at Hightec city , then this guide will be usefull to you.

Accomodation :

The main concern when you land up in an unknown city is finding a place to do what humans do for 1/3 of their lives, sleep. If you are looking for a place near Hightec city there are 2 choices you can consider.

1. Either stay in Madhapur which is closer to the Hyderabad city but has lesser number of flats available for rent

2. Look out for a rented flat in Kondapur which is farther from Hyderabad city but is a residential area and has better choice of rented flats available.
Read more…

Categories: Misc Tags:

Flash Widget(with source) to display your site updates

June 15th, 2009 admin 3 comments

Hey all
This is a small flash widget I had created long back. Just thought of sharing it.
It is a dynamic XML powered flash CS3 swf file with a few customizing options.
It is useful for displaying your website updates or showing dynamic chat messages.
It auto refreshes the text content with a time interval specified in the xml file. The time gap between each message being displayed can also set in the same xml file.

Get Adobe Flash player

The swf initially loads updates_setup.xml (shown below)

1
2
3
4
5
6
<data>
<title>Set your title here</title>
<data_source>updates.xml</data_source>
<reload_source_delay>0</reload_source_delay>
<next_update_delay>10</next_update_delay>
</data>

The <title> tag sets the title of the display widget.

The <data_source> is the relative path to the second xml file which contains the text content to be displayed (see below).

<reload_source_delay> must specify the time(beginning right after the xml loads) in seconds after which the text content auto refreshes itself. Set it to zero, if you want to disable auto refresh. Setting it to a value less than 10 seconds is not desirable.

<next_update_delay> will decide the time interval(beginning right after the previous message is shown) in seconds after which the next message/update is displayed. This value must be greater than the <reload_source_delay>, failing which the text content updates and shows the first update before all the remaining updates are shown.

Next, the swf will load updates.xml file and the updates get displayed

The Zip file attached includes the 2 XML files, the source .fla file and the TweenLite class required for the Tween. Extract all file to a single folder. Then open the .fla file in Adobe Flash CS3/4 if you want to modify it. The full source code is present in updates_class.as.

If you want to upload the files to your website without any modifications, you must upload updates_setup.xml,updates.xml and updates.swf into the same directory and then include a flash embed code in the html file on which you want to display the updates.

P.S: If the widget doesnt display updates on your site.. and just shows “loading..”, it could be that the url path of not pointing to the right XML. If you arent sure what relative and absolute urls are, just try using the url like http://yoursite.com/your_directory/updates.xml.

Flash Updates Widget (17.77 KB - 17 downloads)

Categories: Misc Tags:

Dataone Usage Meter

June 10th, 2009 admin 8 comments

Hello all,

I have been using the windows vista sidebar a lot lately and found a gadget for every purpose from love calculators to email alerters. Yesterday I came across the eftel usage meter and then felt that there must be a gadget for my ISP too. So I created this small gadget.

Vista Sidebar Gadget

Vista Sidebar Gadget

The dataone usage finder vista sidebar gadget is a must if you use the BSNL’s Dataone broadband connection. It will automatically login to your dataone account and retreive the off-peak and total bandwidth usage and calculates the bandwidth remaining in the current month. It will also refresh itself after a certain specified time interval.

There are other tools which do the exact same thing by staying in the system tray like Dataone Quick Usage Finder, Dataone Usage Finder, Dataone tool. These tools are excellent and have better features than the Dataone gadget.

But the advantage of this gadget is that its tiny, consumes lesser resources, simple and requires no installation. It also fetches the data in less than 5 seconds much lesser than the other programs.

Instructions for use :

To install it, just double click the gadget file you download. It gets added to the sidebar automatically. No separate installation needed.

Usage :

Before using it, enter your username ,password and monthly usage limit  in the settings page by clicking on the small spanner icon which appears when you roll over the cursor on the gadget. The gadget automatically shows the stats on clicking the OK button in settings page.

The First line displays the broadband package you have subscribed ( Home 250/500 etc). The second line gives you the total traffic ( download + upload ). If you have night unlimited package, the traffic includes the night usage also. The third line shows the billable usage which excludes the night (2am to 8am) usage. The progressbar shows the percentage of traffic used during the month. The usage limit i.e. the maximum traffic permitted for your package ( e.g Home 500 - 2.5 GB ) has to be set in the settings page. The fourth line shows the bandwidth remaining per day. i.e. the remaining bandwidth divided by the remaining number of days. The progress bar when at 100% will correspond to the average bandwidth remaining per day at the beginning of the month. If you can maintain the progress bar at 100 % , you can be sure that you will never run out of the bandwidth limit at the end of the month.The refresh button(green circular button) at the bottom left corner can be used to manually refresh the stats. Remember, the stats on the BSNL server get updated only if you disconnect the network(if you use the OS dialer) or if you restart the modem (if you are using the modem’s inbuilt pppoe dialer - holds true if your connection is always ON ).

The gadget will only work in Windows Vista and on a BSNL’s DataOne Broadband connection.

P.S. This gadget wont work for new dataone connections i.e. If you check the usage using bbservice.bsnl.in, the gadget wont work.

I do not have access to bbservice.bsnl.in. If someone who does have access could mail me their username and password, I would be happy to make the gadget work for newer connections too.

Dataone Usage Meter (45.54 KB - 525 downloads)

   (Firefox users - Right Click - Save Link As )

Welcome to my blog

June 9th, 2009 admin 1 comment

Hello universe !!

Hello world’s a passe because it is restricted to the earth. We know that robots out of this world can access the internet and eBay accounts !! Thanks to the movie Transformers.  I wonder what clustrmaps would have shown when a non-earthling visits a website. Lets hope the sequel movie releasing this month doesnt do such absurd unearth(l)ings.

Jokes apart. I have been planning to enter the blogosphere from a long time.The only reason it didnt happen is this. If I could just take the ‘post’ out of postponement everytime, wordpress would have crashed not being able to handle the number of posts! But all of a sudden my blog is up and running. The following relationship will better explain how : (prereq C programming)

Boredom : Procrastination :: break : while(1)

Yes. You are right. When you are seriously bored, amazing things happen. You must have heard the quote - >Behind every successful man there’s boredom…. (if you havent heard, now you have). The fear of it can make anyone continue to be productive. But doesnt it sound too good to be true ? Here the catch… The past tense of ‘bear’ is ‘bore’ which itself conveys that when you bear with something/someone for a long time you get bored.(sounds cool?). So who knows, I may get bored writing blog posts for a long time and stop doing it. Boredom leading to more boredom??!? BTW Entropy increases always :)

Anyway, I’ll post on a variety of topics ranging from technology to philisophy(nothing much in between though) and if there are any ‘out of this world‘ readers dont forget to drop in a comment.