Linux For Dummies
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Cygwin For windows A Linux emulator for Windows

2 posters

Go down

Cygwin For windows A Linux emulator for Windows Empty Cygwin For windows A Linux emulator for Windows

Post by CureMyMind Sun Jan 30, 2011 8:41 pm

This is to install Terminator emulator for windows for a Linux feel...

These are the notes for this web site forum. I am using Windows 7 Ultimate 64 bit OS. When I created a new user and tried to use the terminator it had problems. Which I will mention in further details below. I have yet to find a way to really uninstall cygwin from windows but I will find that later and besides I will never want to uninstall it. Maybe someone here might post on how to do that. Maybe they will or maybe they love it as much as I do and they wont. But we should refur to you where you can uninstall it. If no one then I will show how, but just be paient with me since I am very lazy person.

You will need these....
Cygwin
cygwin ruby <-----That you will have to look for in cygwin install its just ruby..
Terminator

Now to get ready for the Terminator.... Lets go though my steps.

NOTE: Before you get started to install these things. In the web site is said to run as aministrator. I however found out that you "do" and you "don't". But if you want the cygwin shortcut on your desktop then install as admin. I didn't install cygwin as admin, for the fact that I will install the terminator. If you do not know how to run any programs under admin in Windows 7. Then I don't know how to help you, you are on your own! This tutorial is not for just anyone. This tutorial is for those that want one brain cell more. With that said let's begin.

    1. Downlad and install CYGWIN.


    2. In Cygwin installation search for the bellow ones and isntall them...

Code:
Admin
shutdown: Shutdown, reboot,hibernate or suspend the machine///My Note: This is just for fun

DATABase
libsqlite3-devel: An embeddable SQL database engine (3.x development)
sqlite3: An embeddable SQL database engine (3.x apps and docs)

Devel
gcc: C compiler upgrade helper
gcc-core: Ccompiler
gcc-g++: C++ compiler
gdb: The GNU Debugger
make: The GNU version of the 'make' utility
ruby: Interpreted object-oriented scripting langue
subversion: A Version Control System///My NOTE: This is to use svn to be able to download each file
subversion-ruby: A version control system (ruby bindings)//My NOTE: same as subersion but for ruby

Editors
nano: A pico clone text editor with extentions///My NOTE: I like this one
vim: Vi IMproved-enchanced vi editor///My NOTE: I hate to use this one.

Utils
ncurses: Utilities for Terminal handling///My NOTE: For clear command in terminal
util-linux: random collection of linux Utilities///My NOTE: need for hexdump
----------------------
EX. of util-linux... $ "echo :$HOME: | hexdump -C" without the quotes.
----------------------

NET
openssh: The OpenSSH sever and client programs///My NOTE: This is awesome tool like telnet

WEB
wget: Utility to retrivel files from WWW via HTTP and FTP///My NOTE: This awesome tool just helps you download

  • NOTE: In the top I give a full discription and where to find them. So don't complain, and I also give you a side note of mine. The one's I do not say anyting about thats because they are dependencies of the programs that I noted. That should be a compleat pakage to get the normal functions of cygwin or the terminator to operate.


    3. Now install TERMINATOR.


    4. Go to C:\cygwin and click on cygwin.bat or if you have the icon on your desktop double click on that. Then click Terminator icon and your terminator should be able to load. Once it has loaded properly configure the terminator and such with transparancy and all.


    5. To configure ssh type this ssh-user-config


  • Remember to go to this website http://maximumpcguides.com/windows-7/open-a-port-in-windows-7s-firewall/ for adding port 22 to Windows 7. Just follow the same suggestions on the site and instead of the port number they suggest, just put in for port 22.


    6. ENJOY!


On more notes if you have a problem like this.
Code:
Your group is currently "mkgroup".  This indicates that your
guid is not in /etc/group and your uid is not in /etc/passwd.

The /etc/passwd <and possibly /etc/passwd> files should be rebuilt.
See the man pages for mkpasswd and mkgroup then, for example, run

mkpasswd -l [-d] > /etc/passwd
mkgroup  -l [-d] > /etc/group

Note that the -d switch is necessary for domain users.

This is the example for the top error if you ever get it. Since I am using local and not domain I will use the -l command.
Command: mkpasswd
Code:
CureMyMind@DRAGON-PC ~
$ mkpasswd -l -p /home -c > /etc/passwd
Command: mkgroup
Code:
CureMyMind@DRAGON-PC ~
$ mkgroup -l -c > /etc/passwd

You can type in "mkgroup --help" and "mkpsswd --help" for an explaintion of all the commands and the one's I used. Here is a small explination of what I used right now.
-l #Local
-d #Domain
-p #path to home directory
-c #print current user <---that one is from both commands....

NOTE: This happens when you create a new user.

If you don't know what you are doing then just do as suggested, and use the -d where applictable. As I don't use domain I will just leave as as the command without the -d. If you do not do this then "TERMINATOR" will fail to find your home directory and refuse to start.

All that info is found here http://software.jessies.org/salma-hayek/cygwin-setup.html

  • If you get the Home Directory Problem After you did the top like I did and still problems. I don't know what to tell you any more hahahaha.... Any ways to get around it thre is two ways.

    1. Open up Cygwin and type in terminator, and after terminator opens just close Cygwin.

    2. Right click on the Terminator icon and select to run as administrator and there you go.


These next steps are for Ruby on rails....

After its all done lets get rubygems going downlad rubygems and do this command to extract from the user folder. Download the lastest pakage from here:
http://rubyforge.org/frs/?group_id=126

Also see this page:
http://rubyonrails.org/download

NOTE: I used the terminator for these command or you can use Cygwin. Question
Code:
CureMyMind@OWNER-PC ~
$ tar -zxvf rubygems-{version}.gz

Then install by this but first "ls" to list whats in there then "cd" into the new directory. Once inside you will install with ruby command.
ruby setup.rb
EX...
Code:
CureMyMind@OWNER-PC ~
$ ruby setup.rb
Now install rails with squlite3 with gem.
gem install rails sqlite3-ruby
EX...
Code:
CureMyMind@OWNER-PC ~
$ gem install rails sqlite3-ruby


Time to test it....
Command: rails new name_here
EX...
Code:
CureMyMind@OWNER-PC ~
$ rails new CureMyMind
Then cd into name_here as I used CureMyMind I will cd into CureMyMind and run this.
Command: script/server
EX...
Code:
CureMyMind@OWNER-PC ~
$ script/server

Now go to webpage http://localhost:3000

If you want to learn more about Ruby on rails I would suggest to start here.
http://railsforzombies.org/

That is something nice for beginners to start learning how to code in ruby. If you are advanced then you know what you are doing, RIGHT?


If there is something more you want to add or take away please suggest. Remember you can also suggest something fun to. This makes Windows fun....

For Those that HAVE ONE BRAIN CELL MORE then the avg. users of computers.


Last edited by CureMyMind on Tue Feb 01, 2011 8:38 pm; edited 3 times in total
CureMyMind
CureMyMind
Admin

Posts : 69
Join date : 2011-01-15

https://curemymind.forumotion.com

Back to top Go down

Cygwin For windows A Linux emulator for Windows Empty Re: Cygwin For windows A Linux emulator for Windows

Post by CureMyMind Mon Jan 31, 2011 5:14 pm

All This information is found http://software.jessies.org/terminator/faq.html#heading_toc_j_10
OK so SSH needs to be configured a bit more. On your windows go to C:\cygwin\home\USER\.terminfo\t

Where it says "USER", that will be YOU. So in my case Im using CureMyMind mine will look like this C:\cygwin\home\CureMyMind\.terminfo\t. DO YOU GET IT, I cannot be more clear then that. Now Before you go off and work away from the machine you are accessing though SSH. You will have to do these next steps.

I am using Windows accessing a Linux Box though ssh. SO! Most of my control is on the windows. But before I run away from from my linux box I will have to make a directory.

SO open up the shell and or make this dicretory.
I am using BackTrack.
Code:
root@bt:~# mkdir -p ~/.terminfo/t

Then I will export the files with in my Windows from C:\cygwin\home\USER\.terminfo\t

In there I should see a file called terminator
You can transfur files though ssh with "scp" if you have port 22 open. Or just upload them to a website and download it with the computer you are walking away from. It's a really small file so it shouldn't take too long.

Now you are able to have more fun with the Terminator.

I will be adding more fixes or finds to my forum Smile. This is for those that want one brain cell more. Since I have one brain cell more though my research and though experiences I will share my knowlege with you.

So for those that like one brain cell more this is for you. And for those that have one brain cell more already, please share with us. We to would like to have one brain cell more.
CureMyMind
CureMyMind
Admin

Posts : 69
Join date : 2011-01-15

https://curemymind.forumotion.com

Back to top Go down

Cygwin For windows A Linux emulator for Windows Empty Re: Cygwin For windows A Linux emulator for Windows

Post by CureMyMind Tue Feb 01, 2011 2:58 pm

This is something fun to do. How to change the name next to the @ sign. So when you open up Terminator or Cygwin you get user@computer-name. But I want to change the user name without making a new account in windows. Well here is how I did it to change my user name. The computer-name is what everyone on the network see's you as.

You will have to edit /etc/passwd file. Now if you installed Cygwin and Terminator like I did you can use nano to edit this file. Or just go to C:\cygwin\etc\ and open passwd in notepad. Any of your favorit text editor should open it, notepad is better. I will be using nano...

NOTE: My user is named CureMyMind and I will change it to "stickINtheMud".

Command: nano
Code:
CureMyMind@DRAGON-PC
$ nano /etc/passwd

You will see something like this below, but remember this is just my example from my Windows 7 64 bit.
Code:
LocalService:*:19:544:U-NT AUTHORITY\LocalService,S-1-5-19::
NetworkService:*:20:544:U-NT AUTHORITY\NetworkService,S-1-5-20::
Administrators:*:544:544:,S-1-5-32-544::
Administrator:unused:500:513:U-DRAGON-PC\Administrator,S-1-5-21-158085935-2046499617-1592858367-500:/home/Administrator:/bin/bash
CureMyMind:unused:1007:513:curemymind,U-DRAGON-PC\CureMyMind,S-1-5-21-158085935-2046499617-1592858367-1007:/home/CureMyMind:/bin/bash
Guest:unused:501:513:U-DRAGON-PC\Guest,S-1-5-21-158085935-2046499617-1592858367-501:/home/Guest:/bin/bash
HomeGroupUser$:unused:1002:513:HomeGroupUser$,U-DRAGON-PC\HomeGroupUser$,S-1-5-21-158085935-2046499617-1592858367-__vmware_user__:unused:1006:513:__vmware_user__,U-DRAGON-PC\__vmware_user__,S-1-5-21-158085935-2046499617-1592858367-1006:/home/__vmware_user__:/bin/bash

Now remember when you open it up in nano it will be a bit more bigger. Now see where it says...

CureMyMind:unused1007:513:curemymind,U-DRAGON-PC\CureMyMind.....

Those first 3 I will change to stickINtheMud. But remember that yours wont be CureMyMind, your's will be the your name or the name windows gave to you. So it should look like this...

stickINtheMud:unused1007:513:stickinthemud,U-DRAGON-PC\stickINtheMud....

The middle one can be lowercase or upper case it doesn't matter as long as the two on the end look the same.

But to change the computer name you will have to go into your windows system properties and change it there. And once you do you will have to use the mkpassd and the mkgroup commands as I show you in the top.

Now when you Open up the terimanl it should look like this...

Code:
stickINtheMud@DRAGON-PC
$

Now of course yours will look different but this is just an example. And this is fun Smile. But when you do ssh and you want to log into your windows you will have to use the orginal name. Also, do not change the home directory. Like mine was /home/CureMyMind I will not change the name in there. Because then the terminator will fail to load. With that said, this is for people that like to mess around and have fun.


This is for people that want one brain cell more. And for those that have a brain cell more, please do share with us. We to like to gain an extra brain cell.
CureMyMind
CureMyMind
Admin

Posts : 69
Join date : 2011-01-15

https://curemymind.forumotion.com

Back to top Go down

Cygwin For windows A Linux emulator for Windows Empty Re: Cygwin For windows A Linux emulator for Windows

Post by curemyBODY! Sat Jun 11, 2011 1:40 pm

Hmm, I wonder what versions you were using? I cant get terminator to work it just freezes. I went to the terminal google group and a few people were having problems - it turns out that people who were using cygwin version 1.7.7 or older were fine but the newer version gives problems. I wish I new that BEFORE installing cygwin as I now dont know how to revert to an earlier version and in fact getting an earlier version isnt that easy. Anyways just thought I would mention it.

curemyBODY!

Posts : 3
Join date : 2011-06-11

Back to top Go down

Cygwin For windows A Linux emulator for Windows Empty Re: Cygwin For windows A Linux emulator for Windows

Post by CureMyMind Mon Jun 20, 2011 2:37 am

curemyBODY! wrote:Hmm, I wonder what versions you were using? I cant get terminator to work it just freezes. I went to the terminal google group and a few people were having problems - it turns out that people who were using cygwin version 1.7.7 or older were fine but the newer version gives problems. I wish I new that BEFORE installing cygwin as I now dont know how to revert to an earlier version and in fact getting an earlier version isnt that easy. Anyways just thought I would mention it.

Thank you For letting me know... The version of cygwin that I am using is 2.738...

Here is the link to my version that worked for me.
CyGwin 2.738 download here

Also here are the files if you don't want to download them just select "Install from Local Directory".

Download all 4 parts, You will need winrar..

Cygwin Files part 1
Cygwin Files part 2
Cygwin Files part 3
Cygwin Files part 4
CureMyMind
CureMyMind
Admin

Posts : 69
Join date : 2011-01-15

https://curemymind.forumotion.com

Back to top Go down

Cygwin For windows A Linux emulator for Windows Empty Re: Cygwin For windows A Linux emulator for Windows

Post by curemyBODY! Mon Jun 20, 2011 6:53 am

thanks I will try your earlier version out. I did find Mintty and it works fine with cygwin. Have you ever tried Ipython? It has some similarity - it's sort of a cross between a command prompt and a console. you can type live python code or use dir commands etc.

curemyBODY!

Posts : 3
Join date : 2011-06-11

Back to top Go down

Cygwin For windows A Linux emulator for Windows Empty Re: Cygwin For windows A Linux emulator for Windows

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum