|
A. Simple method
sh /bin/startxwin.sh &
B. Complex method
1. install xinit from X11 category with basic programs
2. make and put the following file (filename, ex, sx.sh) in /usr/bin directory
#! /bin/sh
export DISPLAY=127.0.0.1:0.0
export PATH=/usr/bin:"PATH"
# Cleanup from last run
rm -rf /tmp/.X11-unix
xwin&
/usr/X11R6/bin/wmaker&
xterm -geometry 80x40+494+51 &
xterm -geometry 80x20+494-0 &
exec xterm -geometry 80x66+0+0 -name login
3. make. for example, a file called cgwinx.bat and put it in the main window or link it.
@echo off
f:
chdir f:\utils\cygwin\bin
sh sx.sh &
C. ¹è°æ¾øÀÌ À©µµ¿ì ¶ç¿ì±â
XWin -rootless -clipboard&
wmaker&
cyg-wrapper.sh ¸¦ ´Ù¿î·ÎµåÇÏ¿© /usr/local/bin¿¡ ÀúÀåÇÑ´Ù.
.bashrc¿¡ ´ÙÀ½ ¶óÀÎÀ» Ãß°¡ÇÑ´Ù.
alias gvim='cyg-wrapper.sh "C:/Progra~1/Vim/vim64/gvim.exe" --binary-opt=-c,--cmd,-T,-t,--servername,--remote-send,--remote-expr'
ÀÌ·¸°Ô Çϸé gvimÀ̶ó°í ½©¿¡¼ ¼öÇàÇϸé À©µµ¿ìÁî¿ë gvimÀÌ ½ÇÇàµÈ´Ù.
---------------------------
Ãâó: http://kangun.tistory.com/29
¾î·µç ȸ»ç¿¡¼ÀÇ °³¹ßȯ°æÀº cygwin + gcc + gmakeÀÌ´Ù. µû¶ó¼ cygwinÀ» ¼³Ä¡ÇÑ´Ù.
http://www.cygwin.com/setup.exe ¸¦ ´Ù¿î¹Þ¾Æ³õµµ·Ï ÇÑ´Ù.
ÇâÈÄ ÆÐÅ°Áö¸¦ Ãß°¡/Á¦°ÅÇÒ ¶§µµ »ç¿ëÇÏ¿©¾ß ÇÏ´Ï±î ±×³É ´Ù¿î ¹Þ¾Æ³õ´Â °ÍÀÌ ³´´Ù. ¿ë·®µµ 400KB Á¤µµ...
ÀÌ°É ½ÇÇà½ÃÅ°¸é ¾îµð¸¦ ÅëÇؼ install ÇÒ °ÍÀÎÁö¸¦ ¹°¾îº»´Ù.
¿©±â¿¡¼ Install from InternetÀ» »ç¿ëÇÑ´Ù.
Root Directory´Â ±âº» ¼³Á¤ÀÎ C:\cygwinÀ» ±×³É »ç¿ëÇÏ´Â °ÍÀÌ Á¦ÀÏ ¹«¹æÇÒ µí ½Í´Ù.
°Ë»öÇغ» °á°ú ¸¹Àº »ç¶÷µéÀÌ ¿©±â¿¡ ±â¹ÝÀ» µÎ°í ÀÛ¾÷À» ÇÏ¿´±â ¶§¹®¿¡ Çò°¥¸®Áö ¾ÊÀ»ÅÍÀÌ´Ù.
¹ØÀÇ ¼³Á¤Àº All Users¿Í Unix/binary¿¡ üũÇÑ´Ù. (±âº» ¼³Á¤)
¿©±â¼ ´ÙÀ½À» ´©¸£¸é ¾îµð¿¡ ´Ù¿îÀ» ¹ÞÀ» °ÍÀÎÁö, ¾î¶² ¹æ¹ýÀ¸·Î ¹ÞÀ» °ÍÀÎÁö ¹°¾îº¸´Âµ¥ ±âº»°ªÀ» ¾²¸é µÇ°í,
download site´Â http://ftp.daum.netÀ» Ãß°¡Çؼ ¾²¸é ±¦ÂúÀ» µí ÇÏ´Ù.
±âº»°ªÀº ÁøÂ¥ ±âº»¸¸ ¼³Ä¡ÇÏ°Ô µÇ¹Ç·Î ³ªÁß¿¡ µÇ´Â°Ô Çϳªµµ ¾ø´Ù
All ¿·¿¡ InstallÀ» ¸î ¹ø Ŭ¸¯ÇÏ¿© Uninstall·Î ¹Ù²Ù°í, ¿øÇÏ´Â ÆÐÅ°ÁöÀÇ UnintallÀ» Install·Î ¹Ù±Å¼. ÇÊ¿äÇÑ ÆÐÅ°Áö¸¸ ¼³Ä¡ÇÏÀÚ.
Á÷°¨ÀûÀ¸·Î gcc³ª make, gdb, vim µîµîÀº ´ç¿¬È÷ ÇؾßÇÒ °ÍÀ̶ó´Â ´À³¦ÀÌ ¿Â´Ù.
´ÙÀ½Àº ÇÊ¿äÇÏ´Ù°í »ý°¢µÇ´Â packageµéÀ» Á¤¸®ÇÑ °ÍÀÌ´Ù.
Admin - cygrunsrv (sshd µîÀ» bg·Î µ¹¸± À¯Æ¿)
Devel - gcc, make, ctags °ü·Ã
Editors - vim °ü·Ã
Net - openssh °ü·Ã (ssh¸¦ »ç¿ëÇÒ °ÍÀ̶ó¸é)
Shell - rxvt °ü·Ã (xtermÀ» »ç¿ëÇÒ °ÍÀ̶ó¸é)
À§¿¡¼ ¿°ÅÇÑ package ¸»°íµµ ÇÊ¿äÇÑ ÆÐÅ°ÁöµéÀ» ¼±ÅÃÇϵµ·Ï ÇÏ°í,
³ªÁß¿¡ ¶Ç Ãß°¡°¡ µÇ¹Ç·Î Å©°Ô ½Å°æ ¾µ ÀÏÀº ¾Æ´Ñµí ÇÏ´Ù.
¾î·°Å³ª ¼³Ä¡°¡ ³¡³ª¸é ȯ°æº¯¼ö¸¦ ¼³Á¤Çϵµ·Ï ÇÑ´Ù.
³» ÄÄÇ»ÅÍ ¿ìŬ¸¯ÇÏ¿© '¼Ó¼º'->'°í±Þ'->'ȯ°æº¯¼ö'¸¦ ¼±ÅÃÇÏ¿© »ç¿ëÀÚ º¯¼ö¿Í ½Ã½ºÅÛ º¯¼ö¸¦ Ãß°¡Çϵµ·Ï ÇÑ´Ù.
»ç¿ëÀÚ º¯¼ö
HOME=d:\home (linux¿¡¼ÀÇ ~ ¸¦ ¸»ÇÔ)
LOGNAME= (windows °èÁ¤°ú µ¿ÀÏÇÏ°Ô)
½Ã½ºÅÛ º¯¼ö
CYGWIN (ntsec binmode)À» »õ·Î ¸¸µé°í
PATH¿¡ C:\Cygwin\binÀ» Ãß°¡ÇÑ´Ù (´ç¿¬È÷ Ç׸ñ°ú Ç׸ñ »çÀÌ´Â ;À¸·Î ±¸ºÐÇÑ´Ù).
¸¸¾à cygwin ÀÚüÀÇ terminalÀ» ¾´´Ù¸é »ó°üÀº ¾øÁö¸¸, cygwinÀÇ xtermÀ» »ç¿ëÇÏ°í ½Í´Ù¸é, Ãß°¡ÀÇ ÀÛ¾÷ÀÌ ÇÊ¿äÇÏ´Ù.
c:\cygwinÀ» º¸¸é cygwin.bat°¡ ÀÖ´Ù. autoexec.bat ÀÌÈÄ·Î bat ÆÄÀÏÀº ÁøÂ¥ ¿À·£¸¸ÀÌ´Ù. ¾î·°Å³ª ÀÌ°Å ³»¿ëÀ» º¸¸é ´ÙÀ½°ú °°´Ù.
@echo off
C:
chdir C:\cygwin\bin
bash --login -i #ȤÀº bash --login -i -c ./sx.sh
À̰Ÿ¦ ÀÀ¿ëÇؼ rxvt,bat¸¦ Çϳª ¸¸µç´Ù (xterm¿ë)
@echo off
C:
chdir C:\cygwin\bin
rxvt.exe -tn xterm -rv -sr -sw -bg gray -fg black -sl 1000 -sbt 15 -fn "Dotumche" -e /bin/bash --login -i
rxvtÀÇ °¢ Ç׸ñÀÇ °ªµéÀÌ ±Ã±ÝÇÏ´Ù¸é cygwin¿¡¼ rxvt --help¸¦ Çغ¸¸é ¾Ë ¼ö ÀÖ´Ù. ´ëÃæ xtermÀ¸·Î ¶ç¿ì´Âµ¥ scrollingÀÌ °¡´ÉÇϵµ·Ï ÇÏ°í °ËÀº ¹è°æ¿¡ ȸ»ö±Û¾¾¸¦ ¾²°Ú´Ù... ÆùÆ®´Â Dotumche¸¦ ¾²°Ú°í.. ¹¹ ÀÌ·± °Å´Ù.
ÀÌ°Ô ³¡³ ´ÙÀ½¿¡ ¸¸µç rxvt.bat¸¦ ½ÇÇà½ÃÅ°¸é Àͼ÷ÇÑ shell prompt¸¦ È®ÀÎÇÒ ¼ö ÀÖ´Ù.
cygwin¿¡¼ °³¹ßÇÏ·Á¸é ´Ù¸¥ editorµµ ÀÖ°ÚÁö¸¸, ¾Æ¹«·¡µµ vimÀ» °¡Àå ¸¹ÀÌ »ç¿ëÇÏÁö ¾ÊÀ»±î ½Í´Ù. cygwin¿¡¼ vimÀ» »ç¿ëÇÏ·Á¸é ÀÌ°ÅÀú°Å °É¸®´Â°Ô ¸¹´Ù. ÀÏ´Ü ±âº»ÀûÀ¸·Î ¼³Á¤ ÆÄÀÏÀÌ ¾ø±â ¶§¹®¿¡ ¿ø ¸®´ª½º¿¡¼ÀÇ Ä÷¯Ç®(?)ÇÑ Å͹̳ÎÀ» ±â´ëÇÏ¸é ¾ÈµÈ´Ù. ¶Ç ÇѱÛÀԷ¿¡ ¹®Á¦°¡ ¸¹¾Æ¼ ¿ä°Å 2°¡Áö 󸮸¦ ÇØÁà¾ß ÇÑ´Ù.
¸ÕÀú vimÀ» ¼³Á¤ÇØ¾ß µÇ´Âµ¥, Ç׸ñÀÌ ¿ö³« ¸¹À¸´Ï ±×³É /usr/share/vim/vim71/vimrc_example.vimÀ» home µð·ºÅ丮¿¡ .vimrc·Î º¹»çÇÏ°í, Á» ¼ÕÀ» ºÁÁØ´Ù. Âß ³»¸®´Ùº¸¸é ´ÙÀ½°ú °°Àº ºÎºÐÀÌ ÀÖ´Ù.
if has("vms")
set nobackup
else
set backup
endif
¿ä ºÎºÐÀ» ÁÖ¼®Ã³¸®ÇÑ´Ù. vimrc¿¡¼ÀÇ ÁÖ¼®Àº " (double quotation mark)¸¦ ¸Ç ¾Õ¿¡ ºÙ¿©ÁÖ¸é µÈ´Ù. ÀÌ°Å ¾ÈÇϸé ÀúÀåÇÏ°í ³ª¿Ã¶§¸¶´Ù backup ÆÄÀÏÀÌ »ý±â´Â Â¥Áõ³ª´Â (ÇÊ¿äÇϱä ÇÏÁö¸¸) Çö»óÀ» ¸ñ°ÝÇÏ°Ô µÈ´Ù. ¾î·°Å³ª ÀÌ°Å µÆÀ¸¸é ´ÙÀ½ ÀÛ¾÷À» ÁøÇàÇÑ´Ù. ¿ª½Ã .vimrc¿¡ ´ÙÀ½°ú °°Àº Ç׸ñÀ» Ãß°¡ÇÏ¿© ÁØ´Ù.
set fileencoding=euc-kr
set encoding=cp949
vi¿¡¼ ÇѱÛÀ» »ç¿ëÇϱâ À§ÇÑ ¼³Á¤ÀÌ´Ù. ÀÌ·¸°Ô ´Ù µÆÀ¸¸é ÀúÀåÇÏ°í ´Ù½Ã vi·Î ¾Æ¹« cÆÄÀÏÀ̳ª Â¥º»´Ù.
#include <stdio.h>
int main (void)
{
printf ("Çï·Î, ½Ã±×À© ¿ùµå\n");
return 0;
}
Àß µÈ´Ù. ÇÏÁö¸¸ ÀÌ·¸°Ô Çϸé vim¿¡¼¸¸ ÇѱÛÀÌ Àß º¸ÀÏ»Ó, ¸·»ó ½©¿¡¼ lsÇغ¸¸é Àß ¾È³ª¿Â´Ù. ¿ä°Íµµ ¼öÁ¤ÇØ¾ß Çϴµ¥, Ȩ µð·ºÅ丮¿¡ .bash_profileÀ» ´ÙÀ½°ú °°Àº ³»¿ëÀ» Ãß°¡ÇÑ´Ù.
alias ls='ls -F --color=auto --show-control-char'
½©¿¡¼ ls¸¦ Çصµ ÇѱÛÀÌ ¹«¸® ¾øÀÌ Àß ³ª¿À°Ô µÈ´Ù. ÈľÆ... ÀÌÁ¤µµ ÇßÀ¸¸é Å« ¹®Á¦ ¾øÀÌ cygwinÀ» »ç¿ëÇÒ ¼ö ÀÖÀ» °Í °°´Ù. Çåµ¥, ÀÛ¾÷ÇÏ´Ùº¸¸é »õ·Î¿î terminalÀ» ¶ç¿ö¾ß ÇÒ ¶§°¡ Àִµ¥ À̶§¸¶´Ù ¸¶¿ì½º·Î ¼ÕÀÌ °¡´Â°Ç »ó´çÈ÷ ºÎÇÏ°¡ Å« ÀÛ¾÷(-_-?)ÀÌ´Ù. ¿ä°Å¸¦... Å°º¸µå¿¡¼¸¸ ÇØ°áÇϵµ·Ï ´ÙÀ½°ú °°Àº aliasµµ Çϳª Ãß°¡ÇÑ´Ù.
alias rxvtTerm='/cygdrive/c/cygwin/bin/rxvt -tn xterm -rv -sr -sw -bg gray -fg black -sl 1000 -sbt 15 -fn "Dotumche" -e /bin/bash --login -i &'
ÀÌ·¯¸é ±×³É ½© ÇÁ·ÒÇÁÆ®¿¡¼ rxvtTermÀ» ½ÇÇà½ÃÄѼ »õ·Î¿î xterm Çϳª¸¦ ´õ ¾òÀ» ¼ö ÀÖ°Ô µÈ´Ù. |
|