andLinux andWindows7

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 )

Incoming search terms:

8 thoughts on “andLinux andWindows7

  1. Ramesh

    Hi,

    Thanks for the detailed post. I am going through the exact sequence like you have gone thru with my laptop. However, i am blocked and mounting windows share to access my Windows 7 folders. The problem is i have McAfee Antivirus installed. It controls windows firewall. I do not want to disable firewall entirely as i am connecting to internet and i need firewall. Is there a better mechanism to mount windows partition without disabling firewall. Please let me know.

    Thanks,
    Ramesh

    Reply
    1. admin

      In mcafee , there should be a provision to allow connections from a defined list of IPs.. called ‘exception rules’ or sth liek that. You could add that for the andLinux IP address so that all connections from within andLinux is approved by mcafee. I am not sure whether it will work, havent tried it :)

      btw, andlinux ip is 192.168.11.150

      Reply
  2. Robert

    If some one needs expert view regarding blogging and site-building after that i propose him/her to go to see this webpage, Keep up the fastidious
    work.

    Reply
  3. windows 11

    I was pretty pleased to uncover this page. I wanted to thank
    you for ones time for this particularly fantastic read!!
    I definitely really liked every bit of it and
    I have you saved as a favorite to check out new information on your website.

    Reply

Leave a Reply to Ramesh Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>