LogIn E-mail
¼³°èÀ̾߱â
[CYGWIN]X setupÇϱâ
# 87 JMJS    10.8.6 04:21

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 Çϳª¸¦ ´õ ¾òÀ» ¼ö ÀÖ°Ô µÈ´Ù.

÷ºÎÆÄÀÏ: .cshrc Cygwin.bat cyg-wrapper.sh sx.sh
°Ô½Ã¹°: 113 °Ç, ÇöÀç: 1 / 1 ÂÊ
¹øÈ£ Á¦       ¸ñ ÀÛ¼ºÀÚ µî·ÏÀÏ ¹æ¹®
116  [make] DUMPON eval ifeq JMJS 24.9.12 54
115  [make] .PHONY JMJS 24.3.28 97
114  [make] -n -d -r --debug=b JMJS 24.3.28 104
113  magick convert -rotate -append JMJS 23.10.12 130
112  dirname JMJS 23.3.20 187
111  zip a.zip -r ./a JMJS 23.2.1 214
110  ffmpeg AlwaysMovie JMJS 22.12.6 218
109  7za a abc.zip abc -> tar -c -z -f abc.zip abc JMJS 22.11.30 216
108  convert mogrify JMJS 23.2.1 303
107  [sh]array JMJS 19.8.14 356
106  arithmetic in a makefile, shell pwd export JMJS 17.9.8 4408
105  Split and merge large files JMJS 16.3.21 1015
104  [Makefile]random JMJS 14.12.5 1395
100  À©µµ¿ì7 ¿ë·®ºÎÁ· winsxs Æú´õ ÃÖÀûÈ­ JMJS 14.10.14 2326
99  [sh,csh]while loop JMJS 13.2.6 2365
98  hostname, hostid, /sbin/ifconfig eth0 JMJS 13.1.4 4389
97  [linux]fedora 16 gome-shell extension JMJS 12.3.12 2069
96  [linux]fedora 16 grub boot order change JMJS 12.3.10 2306
95  [linux]fedora Input Method,ibus,hangul JMJS 12.3.8 1993
94  [linux]audio,mp3,mplayer,gstreamer,vlc JMJS 12.3.7 2711
93  [sh].wrapper example JMJS 11.6.15 2319
92  [make]for loop JMJS 11.9.8 1980
91  [make]conditional expression JMJS 11.5.12 1880
90  [make]shell ½ÇÇà JMJS 11.3.9 2007
89  [wish]jplot JMJS 10.5.12 1656
88  yum JMJS 09.8.12 1689
87  [CYGWIN]X setupÇϱâ JMJS 10.8.6 3034
86  [Make]Makefile Brief JMJS 10.8.6 1718
85  ldd /user/bin/xterm JMJS 09.4.24 1400
84  [HTML]¾îµµºñ SVG ºä¾î¿Í HTML JMJS 09.4.24 1979
83  [DOS]DOS command JMJS 09.7.20 1663
82  [DOS]DOS command brief JMJS 07.2.21 2138
81  À¥ÆäÀÌÁö ¼Ò½ºº¸±â JMJS 09.4.24 1658
80  [html]ÀÚµ¿À¸·Î ±ÛÀÚ»ö ¹Ù²ñ JMJS 07.1.10 1595
79  [html]º¹»ç, µå·¡±× ±ÝÁö JMJS 07.1.10 2098
78  [csh]cshell¿¡¼­ function ¸ø¾´´Ù³×¿ä JMJS 11.3.17 1644
77  ¸®´ª½º¿¡¼­ i386,i586,i686, x86ÀÇ Â÷ÀÌÁ¡ JMJS 06.10.16 1906
76  [CSH]$status JMJS 06.8.21 1365
75  [sh]substr, read, until,IFS,for,dirname JMJS 14.12.19 1571
74  [sh]rgbview.sh . hello.sh JMJS 10.11.30 1495
73  automount - /etc/fstab JMJS 06.2.23 1502
72  lmutil.csh JMJS 05.11.8 1831
71  È­ÀÏÀ̸§¿¡ ¸ø¿À´Â ¹®ÀÚ JMJS 05.9.8 1627
70  /usr/ucb /usr/ccs JMJS 05.9.5 1491
69  Solaris Version JMJS 05.9.5 1710
68  /usr/ccs/bin/nm -x debpli.so JMJS 05.8.31 1977
67  tar, gzip, zcat, uncompress, mn(.a ÆÄÀϺ¸±â) JMJS 13.1.6 1831
66  find . -name -print -exec perl JMJS 09.4.17 1806
65  pkgadd -d packagefile JMJS 05.5.9 1525
64  prstat JMJS 08.10.2 1790
63  vi ¸í·É¾î, vim¸í·É¾î gvim JMJS 24.4.28 4948
62  grep -Rs µî multiple directory ¿¡¼­ grep ? JMJS 24.12.19 1971
61  [csh].cshrc_axis JMJS 04.5.14 1809
60  [csh].cshrc_modelsim JMJS 04.5.14 1938
59  [csh].cshrc_cadence JMJS 04.5.14 1969
58  [csh].cshrc_novas JMJS 04.5.14 1870
57  [csh].cshrc_verisity JMJS 04.5.14 2238
56  lmgrd JMJS 09.6.22 2554
55  [csh]which case JMJS 04.5.14 1820
54  [bash]example 2 JMJS 04.5.12 2049
53  [bash]example 1 JMJS 04.5.12 1922
52  fedora 12¿¡¼­ touchpad disable JMJS 11.1.17 1995
51  [Perl]Çѱ¹¾î ÀÎÄÚµù JMJS 04.1.16 2828
50  [Perl]HTML¿¡¼­ ±âÈ£ Ç¥½Ã¸¦ À§ÇÑ ¹®ÀÚġȯ JMJS 04.1.5 11016
49  [csh]make awk JMJS 03.6.6 2202
48  [csh]wordsplit JMJS 03.6.6 1844
47  [csh]vi2 JMJS 03.6.6 1687
46  [csh]cat.csh JMJS 03.6.6 1742
45  [csh]chgword.csh JMJS 03.6.6 1689
44  [bash]password JMJS 11.3.9 1586
43  [Tcl]bi2int JMJS 02.11.29 1603
42  [PC]ask °Ë»öâÀÌ ÀÚ²Ù ¶á´Ù¸é JMJS 09.4.24 2115
41  [csh]backup_copyc.csh; foreach; continue JMJS 09.4.24 1776
40  uname, uname -s -r, uname -p, uname -a JMJS 09.4.24 1975
39  [tk]»õ â ¿­°í ´Ý±â ¿¹Á¦ JMJS 09.4.24 11585
38  [sh]if [[ "$abc" == "abc" && "$bbc" == "bbc" ]]; ... JMJS 11.3.17 1703
37  [expect]expect_scp.exp JMJS 11.3.9 1758
36  ssh -x -l soc lion scp -r ... JMJS 11.3.9 1566
35  TclTk ¹è¿­ JMJS 09.7.20 1641
34  ./configure make make install JMJS 11.1.13 1579
33  [csh]diff JMJS 10.7.14 1625
32  tr abc 123 < file1 > file2 JMJS 11.4.11 1571
31  Installing RPMforge JMJS 10.2.8 1660
30  [ű×]±ÛÀÚ»öÀÌ »ç¶óÁü JMJS 09.4.24 1727
29  [ű×]ÀÚµ¿À¸·Î ±ÛÀÚ»öÀÌ º¯ÇÔ JMJS 09.4.24 1711
28  ±ÛÀÚÅÂ±× ¸ðÀ½ JMJS 09.4.24 1862
27  »ö»ó¸í°ú RGB°ª Ç¥ JMJS 09.4.24 1875
26  RGB »ö»óÇ¥ JMJS 09.4.24 2030
25  ÇѱÛƯ¼ö¹®ÀÚÇ¥ JMJS 09.4.24 1937
24  bc -l JMJS 01.5.22 1619
23  file *,  od -xc *, cat * JMJS 01.3.28 1937
22  Linux Memo JMJS 09.7.20 1791
21  xterm -fn 10x20 & JMJS 12.3.7 1609
20  W/S Tip JMJS 09.4.29 1699
19  [awk]example JMJS 10.10.30 1933
18  [csh].cshrc JMJS 11.6.21 2396
17  stop & background job JMJS 00.11.14 1593
16  W/S shout down JMJS 00.11.14 1559
15  [sed]example JMJS 16.9.5 1958
14  [DOS]Memo JMJS 00.10.29 1685
13  [csh]¸®½ºÆ®¸¦ ¸¸µé¾î foreach·Î ó¸®ÇÒ¶§ JMJS 00.10.7 5418
12  [Tcl]Tool Command Language JMJS 09.7.24 3092
11  [csh]vi.csh JMJS 00.6.27 1703
10  [csh]Check Process JMJS 00.6.27 1635
9  [csh]Get Character and get char without 'return' JMJS 10.2.8 1765
8  [csh]foreach SED JMJS 00.6.27 2078
7  [Window]¿À·ùº¸°í ¾È ¶ß°ÔÇÏ´Â ¹æ¹ý JMJS 09.9.23 1646
6  [csh]echo.csh JMJS 00.6.27 1830
5  set DDD = `date '+%y%m'` JMJS 00.6.27 1547
4  [SH]Advanced Bash-Scripting Guide JMJS 09.4.24 1506
3  [csh]Beep : echo ^G;sleep 1 JMJS 00.6.27 1840
2  [csh]if ($abc == $bbc) then _ else _ endif JMJS 00.6.27 2038
1  [csh]ARGV JMJS 00.6.27 2112
[1]