Sie sind auf Seite 1von 4

Cygwin and Moshell

Below is a tested procedure for installing moshell / Cygwin in Windows Vista. PROCEDURE: Installation for Windows (using cygwin): 1- Go to the website http://www.cygwin.com/ 2- Click on "Install Now" 3- Save the setup.exe file, then execute it. 4- Choose "Install from internet", then click Next. 5- Root Directory "C:/cygwin" (It is not recommended to choose a different directory, especially if it contains spaces). IMPORTANT: "Default Text File Type" should be set to UNIX (NOT DOS !!! otherwise ftp transfers get corrupted). Then click Next. 6- Select Internet Connection: put the proxy settings or select "use IE settings". Then click Next. 7- Choose a Download Site. The site ftp://sourceware.mirrors.tds.net/ is recommended. 8- Select Packages: Add the following packages: - under "Archive", select "unzip" - under "Interpreters", select "perl" - under net, select "inetutils", "openssh", "openssl" - under shells, select "rxvt" - under "Editors" select "vim" (optional) 9- Click Next. Install will start. 10- In the directory C:/Cygwin, double-click on the file cygwin.bat. This will startup the cygwin window and create some files. Now close the cygwin window. 11- In the directory C:/Cygwin , edit the file cygwin.bat: Delete the line: bash --login -i then type the following lines at the end of the file, just replace "xxx" with your userid: set USER=xxxx set HOME=/home/xxxx set SHELL=/bin/bash rxvt -sl 65000 -e /bin/bash --login -i IMPORTANT: make sure that there are no spaces at the end of the lines otherwise the windows environment variables don't get set correctly and your .Xdefaults file will not be read. 12- Open the file C:/Cygwin/etc/profile in a text editor and add the following 6 lines at the end of the file, just replace "xxx" with your userid: export USER=xxxx export HOME=/home/xxxx export SHELL=/bin/bash mkdir -p $HOME cd $HOME source $HOME/.bashrc 13- Open the file C:/Cygwin/etc/passwd in a text editor and make sure that there is a row with your username and home directory. If the home directory (found towards the end of the line) is like "/cygdrive/h" then replace this with "/home/youruserid". 14- Convert the files /etc/profile and /etc/passwd to unix format using the "dos2unix" command: dos2unix /etc/profile dos2unix /etc/passwd

15- Start a Cygwin Terminal window by clicking on the icon in start menu or on desktop, then run the following commands: touch .bashrc touch .inputrc touch .Xdefaults This will create three configuration files in your "/home/youruserid" directory: .bashrc, .inputrc, and .Xdefaults Then close the cygwin terminal window. 16- Go to the directory C:/Cygwin/home/yourid (from windows explorer) and open the following 3 files in a text editor: In the ".bashrc" file, put the following lines : unset PROMPT_COMMAND export PS1="\\[\\033[1m\\][\\w]\\\\$\\[\\033[0m\\] " alias ls='ls -FX' set -o notify set -o ignoreeof shopt -s cdspell shopt -s cdable_vars shopt -s checkhash shopt -s checkwinsize shopt -s sourcepath shopt -s histappend export PATH=$PATH:/home/yourid/moshell (appending the moshell directory to your PATH variable will enable you to call moshell from any directory). In the ".inputrc" file, put the following lines: set bell-style visible set convert-meta Off set output-meta On set input-meta On set completion-ignore-case on set completion-query-items 150 set mark-directories on set visible-stats On set show-all-if-ambiguous On set expand-tilde On "\\e[D": backward-char "\\e[C": forward-char "\\e[A": history-search-backward "\\e[B": history-search-forward "\\e[7~": beginning-of-line "\\e[8~": end-of-line "\\e[1~": beginning-of-line "\\e[4~": end-of-line "\\e[3~": delete-char "\\e[2~": menu-complete "\\M-[2~": paste-from-clipboard # Insert "\\M-q": menu-complete "\\C-d": delete-char "\\C-l": clear-screen "\\C-xdf": dump-functions "\\C-xdv": dump-variables "\\C-xdm": dump-macros (Type "man bash" if you want to get more information about what these lines do) In the ".Xdefaults" file, put the following lines: Rxvt*background: Black Rxvt*foreground: White Rxvt*saveLines: 65535 Rxvt*termName: xterm Rxvt*geometry: 144x64+0+0 Rxvt*loginShell: true

Rxvt*font: "Lucida Console-11" Rxvt*cutchars: `"'&()*,;<=>? []{|} (These are just examples of terminal properties, you can change them to fit your needs. Type "man rxvt" to view all available properties) 17- Convert the files ~/.bashrc, ~/inputrc, ~/.Xdefaults to unix format using the "dos2unix" command: dos2unix ~/.bashrc dos2unix ~/.inputrc dos2unix ~/.Xdefaults 18- Open a new cygwin terminal window. The window should be black with white text and the prompt should like this: [~]$ If not, then go through steps 9 to 12 again and make sure you haven't missed out anything. 19- Moshell installation: - Put the moshellxxx.zip file in c:/cygwin/home/youruser - Open the cygwin shell and run the following commands: >> unzip -o moshellxxx.zip >> bash moshell_install The first prompt asks for the type of installation: 0) Full Version 1) Restricted+ 2) Restricted 3) Limited Click here for information about the restricted versions. When prompted to enter the directory where you want to install moshell, it is recommended to specify your HOME directory ( ~ ). If a previous moshell installation already exists, it is recommended to install in the same directory as the old one. This way, all your custom files (jar/xml files, site files, etc.) get copied across to the new revision and the old revision gets moved to a different location so you can still access it if needed. When prompted to enter the java directory, choose /cygdrive/c/Progra~1/javasoft/jre/whichEverVersion/bin/java or /cygdrive/c/WINNT/system32/java 20- Running moshell for the first time: If you have set the PATH variable correctly in your ~/.bashrc file, you should be able to run moshell from any directory. E.g: >> moshell If this is the first time moshell is installed on this PC, then it will download a number of jar files from the node. No progress indicator will be shown so just be patient as it will take a few minutes. Progress can be seen by doing "ls -l" in the commonjars and jarxml directories. NOTE:(Note: More info about cygwin installation issues can be found on http://cygwin.com/faq/faq0.html . Uninstall instructions for cygwin can be found at http://cygwin.com/faq/faq.setup.html#faq.setup.uninstall-all ) NOTE: MOSHELL zip file can be found in this page http://utran01.epa.ericsson.se/moshell/content.php?content.7

Das könnte Ihnen auch gefallen