우분투 root 계정 로그인

sudo passwd root로 비밀번호 생성.
시스템 - 관리 - 로그인창 - 보안에서 로컬 시스템 관리자 로그인 허용에 체크.
root 로그인 할때 언어 설정도 한글로 변경.

터미널 창에서 root 계정 켜기 : sudo -s

Posted by 혁쌈

2007/09/11 22:15 2007/09/11 22:15
,
Response
No Trackback , a comment
RSS :
http://trlight.cafe24.com/tc/rss/response/305

Ubuntu Release

http://ftp.daum.net/ubuntu-releases/releases/7.04/

속도 꽤 잘나옴 ㅋㅋ

Posted by 혁쌈

2007/05/31 20:28 2007/05/31 20:28
Response
No Trackback , No Comment
RSS :
http://trlight.cafe24.com/tc/rss/response/280

X-Note LW20 우분투 설치기

흠... 조금 애를 먹었지만...

잘 되는듯 ㅋㅋ

more..

Posted by 혁쌈

2007/05/26 01:13 2007/05/26 01:13
,
Response
No Trackback , No Comment
RSS :
http://trlight.cafe24.com/tc/rss/response/276

gvim에서 vi와 같은 색상쓰기

http://blog.naver.com/elechole?Redirect=Log&logNo=20022676509

Posted by 혁쌈

2006/07/01 23:46 2006/07/01 23:46
Response
No Trackback , No Comment
RSS :
http://trlight.cafe24.com/tc/rss/response/213

GDB 사용법

[말머리 : 디버거란 무엇인가?]
디버거(Debugger)란 프로그램 개발 도구로써, 프로그램을 개발하다가 에러가 발생하면 발생 위치 및 발생이유를 쉽게 찾을 수 있도록 도와 줍니다.

[gdb] 명령 요약
프로그램 실행과 추적(trace)에 관련된 명령들
---------------------------------------------------------
run 현재의 인수를 사용하여 프로그램을 실행
run 새로운 <인수>를 가지고 프로그램을 실행
continue 현재 위치에서 프로그램을 계속 실행시킵니다.break 명령이 작동 된 다음에 사용합니다.
(약자) c, cont
next 한 줄씩 실행 시킵니다. 이 때 함수를 포함하고 있으면 함수를 수행시킵니다. (약자) n
next 줄을 실행 시킵니다.
step 한 줄씩 실행 시킵니다. 이 때 함수를 포함하고 있으면 함수 내부로 들어가서 한 줄씩 실행합니다. (약자) s
step 줄을 실행시킵니다.
break 라인 번호에서 프로그램 실행을 멈추게 합니다.
(dbx) stop at (약자) b
break <함수 명> 함수 내부의 첫번째 라인에서 프로그램의 실행을 멈추게 합니다.
(dbx) stop in <함수명>
quit gdb를 종료 시킵니다.
------------------------------------------------------------

데이타에 관련된 명령들
-----------------------------------------------------------
whatis 지정한 <변수>에 관련된 정보를 보여줍니다.
print 에 지정된 식의 값을 보여줍니다.
(약자) p
display 현재 지정된 display 명령의 목록을 보여줍니다.
list 현재 위치에서 소스 파일의 내용을 10줄 보여줍니다.
list , <시작줄>과 <끝줄>사이의 소스파일 내용을 보여줍니다.
-----------------------------------------------------------

gdb 사용법을 알기 위해서 우선 bug가 있는 프로그램을 작성해보죠.
$ vi bugprogram1.c

---------------< bugprogram1.c 내용>--------------
#include < stdio.h >

int main(void)
{
int i;
double j;
char *bug = NULL;


/* 다음은 i/2 + i 의 값을 출력 시키는 문이다. */
/* i 가 1 이면, j 는 1.5 가 되도록 짠 것이다. */
/* 그러나 실제로 그렇지 않다. */

for( i = 0; i < 5; i++) {
j = i/2 + i;
printf(" j is %lf n", j );
}

/* 다음은 bug 변수에 hi를 copy하려는 것이다. */
/* 변수명 bug에서 느끼겠지만, 일부려 bug를 만들었다. */
/* 무엇일까 ? */

strcpy(bug,"hi");
printf("bug is %s n", bug);

return 0;
}
---------------------------------------------

위의 내용을 저장하고 나서,
$ gcc bugprogram1.c -g -o bugprogram1
$ gcc bugprogram1.c -o bugprogram1_g

$ ls -l
total 32
-rwxr-xr-x 1 oprix staff 16375 Apr 5 15:53 bugprogram1*
-rw-r--r-- 1 oprix staff 578 Apr 5 15:52 bugprogram1.c
-rwxr-xr-x 1 oprix staff 11927 Apr 5 15:53 bugprogram1_g*

<설명>------------------
-g option 은 형성된 실행화일을 가지고 debug될 수 있게 compile 해
달라는 일종의 부탁하는 option입니다. gdb를 작동시키려면 이렇게 compile을 해야 합니다.
-g 옵션을 주고 한 것과 안 한 것을 비교하면 -g 옵션을 준게 파일 크기가 큽니다. debug를 위해서
여러 코드가 삽입되고, 실제 소스도 들어가 있습니다.
-o option은 -o 뒤의 화일 이름을 가진 실행화일을 만들어 달라라는 것으로 이 옵션을 생략할 경우에
a.out 이라는 실행파일이 생성됩니다.
위의 bugprogram1.c를 compile하면 error 메세지가 없습니다..
------------------------------------------------------------

$ ./bugprogram1
j is 0.000000
j is 1.000000
j is 3.000000
j is 4.000000
j is 6.000000
Segmentation fault
$

<설명>-----------------------------------------------------
bugprogram1 실행화일을 실행시켰더니 작동되다가 Segmentation fault를 일으키는 군요.
프로그램은 에러없이 컴파일이 잘 되었는데...
어디서 문제가 일어난 걸까요?
-----------------------------------------------------------

$ gdb ./bugprogram1
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb)

--<설명>------------------------------------------------------
프로그램 이름이 bugprogram1이고 현재 디렉토리에 있으니 이렇게 설정합니다.
그냥 쉘에서 gdb를 치시고
(gdb) file ./bugprogram1 이렇게 하는 방법도 있습니다.
편한대로 사용하세요.
-----------------------------------------------------------------

(gdb) list
1 #include < stdio.h >
2
3 int main(void)
4 {
5 int i;
6 double j;
7 char *bug = NULL;
8
9
10 /* 다음은 i/2 + i 의 값을 출력 시키는 문이다. */
(gdb)

--< 설명 > ----------------------------------------------------
list는 소스 내용을 보여줍니다. l 이라고 간단하게 쳐도 작동이 됩니다.
--------------------------------------------------------------

(gdb) l 4,16
4 {
5 int i;
6 double j;
7 char *bug = NULL;
8
9
10 /* 다음은 i/2 + i 의 값을 출력 시키는 문이다. */
11 /* i 가 1 이면, j 는 1.5 가 되도록 짠 것이다. */
12 /* 그러나 실제로 그렇지 않다. */
13
14 for( i = 0; i < 5; i++) {
15 j = i/2 + i;
16 printf(" j is %lf n", j );

--<설명> --------------------------------------------------------
list <첫번째 줄번호>, <끝줄번호>를 치면 위처럼 보입니다.
---------------------------------------------------------------

(gdb) break 14
Breakpoint 1 at 0x804840d: file bugprogram1.c, line 14.
(gdb) run
Starting program: /tmp/gdbproject/bugprogram1

Breakpoint 1, main () at bugprogram1.c:14
14 for( i = 0; i < 5; i++) {

--<설명>-----------------------------------------------------
먼저 가장 의심되는 곳 부터 찾기로 했습니다. for 문이 의심스럽군요.
그래서 for 문의 줄번호인 14에서 break를 걸어두었습니다.
break는 b라는 명령으로 사용할 수 있습니다.
run으로 실행을 시키니 작동되다가 14 줄에서 멈추었습니다.
---------------------------------------------------------------

(gdb) step
15 j = i/2 + i;
(gdb) step
16 printf(" j is %lf n", j );
(gdb) step
j is 0.000000
j is 1.000000
j is 3.000000
j is 4.000000
j is 6.000000

Program received signal SIGSEGV, Segmentation fault.
0x400787a4 in strcpy () at ../sysdeps/generic/strcpy.c:43
43 ../sysdeps/generic/strcpy.c: 그런 파일이나 디렉토리가 없음.

----<설명>----------------------------------------
이런 갑자기 프로그램이 종료가 되었군요.
16 번째 줄 다음에 step을 하면 안 되겠군요. step은 s명령으로도 쓸 수 있습니다.
다시 시작해서 해보죠. 이번에는 15번째 줄에 break를 넣어 보죠.
--------------------------------------------------

(gdb) quit
The program is running. Exit anyway? (y or n) y
$ gdb ./bugprogram1
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) b 15
Breakpoint 1 at 0x8048420: file bugprogram1.c, line 15.
(gdb) print i
$1 = 0
(gdb) print j
$2 = 4.8699524093964861e-270

----<설명>----------------------------------------
내용을 볼때 print 라는 명령을 사용합니다. 아직 j는 쓰레기 값을 가지고 있군요.
print는 p라는 명령으로도 쓰셔도 됩니다. 계속해 보지요.
--------------------------------------------------

(gdb) s
16 printf(" j is %lf n", j );
(gdb) s
j is 0.000000

Breakpoint 1, main () at bugprogram1.c:15
15 j = i/2 + i;
(gdb) print i
$3 = 1
(gdb) print j
$4 = 0
(gdb) s
16 printf(" j is %lf n", j );
(gdb) print i
$5 = 1
(gdb) print j
$6 = 1
(gdb) s
j is 1.000000

Breakpoint 1, main () at bugprogram1.c:15
15 j = i/2 + i;
(gdb) print i
$7 = 2
(gdb) print j
$8 = 1
(gdb) s
16 printf(" j is %lf n", j );
(gdb) print i
$9 = 2
(gdb) print j
$10 = 3

----<설명>----------------------------------------
자세히 보면 실제로 값이 적용되는 건 그 문장이 실행된다음에 값이 적용되고 있지요.
즉 15번째 문장에서 멈추었으면 15문장은 실행이 안 된 상태입니다. 그 다음에 step 명령이
작동되어야 값이 바뀌지요. 그런데 값을 잘 관찰해 보면 j는 1.0000 이 아니라 1.50000가 될
때도 있어야 되는데 없군요. 계속 정수값을 가지고 있군요.
j = i/2 + i ; 이 부분이 문제가 있군요.
이 부분을 이렇게 수정해 보지요. j = (double)/2 + (double)i;
--------------------------------------------------

$ gcc bugprogram1.c -g -o bugprogram1
$ gdb ./bugprogram1
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) b 15
Breakpoint 1 at 0x8048420: file bugprogram1.c, line 15.
(gdb) r
Starting program: /tmp/gdbproject/./bugprogram1

Breakpoint 1, main () at bugprogram1.c:15
15 j = (double)i/2 + (double)i;
(gdb) s
16 printf(" j is %lf n", j );
(gdb) s
j is 0.000000

Breakpoint 1, main () at bugprogram1.c:15
15 j = (double)i/2 + (double)i;
(gdb) s
16 printf(" j is %lf n", j );
(gdb) s
j is 1.500000

----<설명>----------------------------------------
자! 원하는 결과가 나왔지요. 값의 변화를 천천히 추적해서 문제점을 파악하는 방법입니다.
하나의 문제는 해결 되었고 continue 문을 이용해서 break를 나와 보지요.
break 가 15번째 줄에 있었으니 continue 15라고 입력합니다.
--------------------------------------------------

(gdb) continue 15
Will ignore next 14 crossings of breakpoint 1. Continuing.
j is 0.000000
j is 1.500000
j is 3.000000
j is 4.500000
j is 6.000000

Program received signal SIGSEGV, Segmentation fault.
0x400787a4 in strcpy () at ../sysdeps/generic/strcpy.c:43
43 ../sysdeps/generic/strcpy.c: 그런 파일이나 디렉토리가 없음.

----<설명>----------------------------------------
전에 봤던 에러가 나왔군요. 자 이건 어떻게 할까요?
에러 메시지가 strcpy를 가리키고 있으니 strcpy라고 대략 예측을 해보지요.
23번째 줄에 break를 걸어보지요.
에러가 나므로 gdb를 다시 시작해서 break를 겁니다.
--------------------------------------------------

$ gdb ./bugprogram1
GNU gdb 4.18
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-redhat-linux"...
(gdb) b 23
Breakpoint 1 at 0x8048456: file bugprogram1.c, line 23.
(gdb) r
Starting program: /tmp/gdbproject/./bugprogram1
j is 0.000000
j is 1.500000
j is 3.000000
j is 4.500000
j is 6.000000

Breakpoint 1, main () at bugprogram1.c:23
23 strcpy(bug,"hi");
(gdb) p bug
$1 = 0x0
(gdb) p *bug
Cannot access memory at address 0x0.

---<설명>---------------------------------------
음 버그를 찾은 거 같군요. bug의 주소가 0x0인데 여기에 값을 복사하려고
했으니 작동이 안 되는 거지요. 0x0주소는 access 할 수 없는 주소인데..
그래서 프로그램이 제대로 작동하려면 bug에 메모리주소를 할당해주고
사용하면 됩니다.

bug = (char *)calloc(3, sizeof(char));
bug 선언 다음에 이렇게 설정해주면 되겠지요.
--------------------------------------------------------

$ ./bugprogram1
j is 0.000000
j is 1.500000
j is 3.000000
j is 4.500000
j is 6.000000
bug is hi

자 배운 걸 복습해 보세요. break, continue, step, file, print, list ,run
저자와 출처를 밝히시고 사용하시기 바랍니다

Posted by 혁쌈

2006/03/16 22:37 2006/03/16 22:37
Response
A trackback , 2 Comments
RSS :
http://trlight.cafe24.com/tc/rss/response/196

.vimrc(exrc)

scripte utf-8
" vim: set fenc=utf-8 tw=0:
" 파일의 첫부분에 위의 2줄을 꼭 남겨 두십시오.

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 인클루드의 Vim 설정 파일
" 마지막 수정: 2005-12-05 19:13:41 KST
" $Id: .vimrc 65 2005-12-05 10:13:55Z barosl $
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 프로그램 기본 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 오리지널 Vi 와의 호환성을 없애고, Vim 만의 기능들을 쓸 수 있게 함.
set nocp

" 모든 옵션을 원래대로 복원
set all&

" 명령어 기록을 남길 갯수 지정
set hi=100

" 백스페이스 사용
set bs=indent,eol,start

" 인코딩 설정
" 문서를 읽을 때 BOM 을 자동으로 제거하려면, fencs 맨 앞에 ucs-bom 를 추가하세요.
"let &tenc=&enc
"set enc=utf-8
set fenc=utf-8
set fencs=utf-8,cp949,cp932,euc-jp,shift-jis,big5,latin1,ucs-2le

" 홈 디렉토리가 존재할 때에만 사용할 수 있는 기능들
if exists("$HOME")

" 홈 디렉토리를 구한다.
" 특정 시스템에서는 홈 디렉토리 경로 끝에 / 또는 \ 문자가
" 붙어 있기 때문에, 그것들을 제거한다.
let s:home_dir = $HOME
let s:temp = strpart(s:home_dir,strlen(s:home_dir)-1,1)
if s:temp == "/" || s:temp == "\\"
let s:home_dir = strpart(s:home_dir,0,strlen(s:home_dir)-1)
endif

" 경로 설정
if has("win32")
let s:dir_tmp = s:home_dir."/_vim/tmp"
let s:dir_backup = s:home_dir."/_vim/backup"
else
let s:dir_tmp = s:home_dir."/.vim/tmp"
let s:dir_backup = s:home_dir."/.vim/backup"
endif

" 임시 디렉토리 설정
if isdirectory(s:dir_tmp)
set swf
let &dir = s:dir_tmp
else
set noswf
set dir=.
endif

" 백업 디렉토리 설정
if isdirectory(s:dir_backup)
set bk
let &bdir = s:dir_backup
set bex=.bak
else
set nobk
endif

endif


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 편집 기능 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 커서의 위치를 항상 보이게 함.
set ru

" 완성중인 명령을 표시
set sc

" 줄 번호 표시
set nu

" 줄 번호 표시 너비 설정
set nuw=5

" 탭 크기 설정
set ts=4
set sw=4

" 탭 -> 공백 변환 기능 (사용 안함)
set noet
set sts=0

" 자동 줄바꿈 안함
set nowrap

" 마지막 편집 위치 복원 기능
au BufReadPost *
\ if line("'\"") > 0 && line("'\"") <= line("$") |
\ exe "norm g`\"" |
\ endif

" gVim 을 사용중일 경우 클립보드를 unnamed 레지스터로 매핑
" xterm_clipboard 기능이 있을 때에도 매핑 가능
if has("gui_running") || has("xterm_clipboard")
set cb=unnamed
endif

" magic 기능 사용
set magic

" 여러 가지 이동 동작시 줄의 시작으로 자동 이동
set sol

" 비주얼 모드에서의 동작 설정
set sel=exclusive

" SHIFT 키로 선택 영역을 만드는 것을 허용
" 영역 상태에서 Ctrl+F,B 로 이동하면 영역이 해제되어 버려서 해제
"set km=startsel,stopsel

" 가운데 마우스 버튼으로 붙여넣기 하는 것을 무효화한다.
map
map!

" 괄호짝 찾기 기능에 사용자 괄호 종류를 더한다.
set mps+=<:>

" 새로 추가된 괄호의 짝을 보여주는 기능
"set sm

" Insert 키로 paste 상태와 nopaste 상태를 전환한다.
" 함수 방식으로 바꾸었다. 자세한 것은 아래로~
"set pt=

" 키 입력 대기시간을 무제한으로, 그러나 key codes 에 대해서는 예외
set noto ttimeout

" 키 입력 대기시간 설정 (milliseconds) (ttm 을 음수로 설정하면 tm 을 따라감)
set tm=3000 ttm=100

" 영역이 지정된 상태에서 Tab 과 Shift-Tab 으로 들여쓰기/내어쓰기를 할 수 있도록 함.
vmap >gv
vmap
" 입력이 중단된 후 얼마 후에 swap 파일을 쓸 것인지와
" CursorHold 이벤트의 대기시간을 설정 (milliseconds)
set ut=10

" 몇 글자를 입력받으면 swap 파일을 쓸 것인지 설정
set uc=200


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 검색 기능 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 검색어 강조 기능
set hls

" 검색시 파일 끝에서 처음으로 되돌리기 안함
set nows

" 검색시 대소문자를 구별하지 않음
set ic

" 똑똑한 대소문자 구별 기능 사용
set scs


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 모양 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" GUI 이면, 시작시 크기 설정
if has("gui_running")
set lines=50
set co=125
endif

" 시작시 전체화면으로 설정
" 이제 이것도 귀찮아졌다...!
if has("win32")
" au GUIEnter * simalt ~x
endif

" 추적 수준을 최대로
set report=0

" 항상 status 라인을 표시하도록 함.
set ls=2


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GUI 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 폰트 설정
if has("gui_running")
if has("win32")
set gfn=굴림체:h9:cHANGEUL
" set gfn=GulimChe:h9:cHANGEUL
else
set gfn=GulimChe\ 9
endif
" set gfn=Jung9\ 9
" set gfn=Fixedsys:h12:cHANGEUL
endif


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" filetype 기능 & Syntax Highlighting 기능
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 파일의 종류를 자동으로 인식
filet plugin indent on

" 몇몇 커스텀 확장자들에게 파일 형식 설정
"au BufRead,BufNewFile *.dic setl ft=php

" 파일 형식에 따른 Syntax Highlighting 기능을 켠다
sy enable


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" indent 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 자동 들여쓰기 사용 안함
set noai

" 똑똑한 들여쓰기 사용 안함
set nosi

" 내장된 indent 파일이 없어서 C indent 를 사용하는 경우
au FileType javascript,jsp setl cin

" 각 언어의 표준 indent 를 사용하는 경우
" 수동 추가하기가 귀찮아져서 결국 자동 인식으로 바꿨다.
"au FileType c,cpp,html,vim,java,sh,python,xml,perl,xf86conf,conf,apache
"\ if expand("") != "" |
"\ if exists("b:did_indent") |
"\ unlet b:did_indent |
"\ endif |
"\ runtime! indent/.vim |
"\ endif


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 컬러 스킴 (:colo desert)
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

if has("gui_running")
" Vim color file
" Maintainer: Hans Fugal
" Last Change: $Date: 2005/02/17 03:34:26 $
" URL: http://hans.fugal.net/vim/colors/desert.vim

" cool help screens
" :he group-name
" :he highlight-groups
" :he cterm-colors

set background=dark
if version > 580
" no guarantees for version 5.8 and below, but this makes it stop
" complaining
hi clear
if exists("syntax_on")
syntax reset
endif
endif
let g:colors_name="desert"

hi Normal guifg=White guibg=grey20

" highlight groups
hi Cursor guibg=khaki guifg=slategrey
"hi CursorIM
"hi Directory
"hi DiffAdd
"hi DiffChange
"hi DiffDelete
"hi DiffText
"hi ErrorMsg
hi VertSplit guibg=#c2bfa5 guifg=grey50 gui=none
hi Folded guibg=grey30 guifg=gold
hi FoldColumn guibg=grey30 guifg=tan
hi IncSearch guifg=slategrey guibg=khaki
"hi LineNr
hi ModeMsg guifg=goldenrod
hi MoreMsg guifg=SeaGreen
hi NonText guifg=LightBlue guibg=grey30
hi Question guifg=springgreen
hi Search guibg=peru guifg=wheat
hi SpecialKey guifg=yellowgreen
hi StatusLine guibg=#c2bfa5 guifg=black gui=none
hi StatusLineNC guibg=#c2bfa5 guifg=grey50 gui=none
hi Title guifg=indianred
hi Visual gui=none guifg=khaki guibg=olivedrab
"hi VisualNOS
hi WarningMsg guifg=salmon
"hi WildMenu
"hi Menu
"hi Scrollbar
"hi Tooltip

" syntax highlighting groups
hi Comment guifg=SkyBlue
hi Constant guifg=#ffa0a0
hi Identifier guifg=palegreen
hi Statement guifg=khaki
hi PreProc guifg=indianred
hi Type guifg=darkkhaki
hi Special guifg=navajowhite
"hi Underlined
hi Ignore guifg=grey40
"hi Error
hi Todo guifg=orangered guibg=yellow2

" color terminal definitions
hi SpecialKey ctermfg=darkgreen
hi NonText cterm=bold ctermfg=darkblue
hi Directory ctermfg=darkcyan
hi ErrorMsg cterm=bold ctermfg=7 ctermbg=1
hi IncSearch cterm=NONE ctermfg=yellow ctermbg=green
hi Search cterm=NONE ctermfg=grey ctermbg=blue
hi MoreMsg ctermfg=darkgreen
hi ModeMsg cterm=NONE ctermfg=brown
hi LineNr ctermfg=3
hi Question ctermfg=green
hi StatusLine cterm=bold,reverse
hi StatusLineNC cterm=reverse
hi VertSplit cterm=reverse
hi Title ctermfg=5
hi Visual cterm=reverse
hi VisualNOS cterm=bold,underline
hi WarningMsg ctermfg=1
hi WildMenu ctermfg=0 ctermbg=3
hi Folded ctermfg=darkgrey ctermbg=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE
hi DiffAdd ctermbg=4
hi DiffChange ctermbg=5
hi DiffDelete cterm=bold ctermfg=4 ctermbg=6
hi DiffText cterm=bold ctermbg=1
hi Comment ctermfg=darkcyan
hi Constant ctermfg=brown
hi Special ctermfg=5
hi Identifier ctermfg=6
hi Statement ctermfg=3
hi PreProc ctermfg=5
hi Type ctermfg=2
hi Underlined cterm=underline ctermfg=5
hi Ignore cterm=bold ctermfg=7
hi Error cterm=bold ctermfg=7 ctermbg=1
else
" 사용하는 터미널 종류에 따라 밝음, 어두움을 설정
" 자고로 터미널은 어두운겨 -ㅅ-
set bg=dark "light
endif


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 단축키 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 상용구 설정
iab xdate =strftime("%Y-%m-%d %H:%M:%S")
iab xtime =strftime("%H:%M:%S")
"iab xname 인클루드

" BufExplorer 플러그인 (스크립트 번호: 42)
" :ls 와 :b 에 익숙해져서 이젠 필요없다...
"nnoremap :BufExplorer

" Vim 자체 Explore 기능
" :E 라는 게 있었군...
"nnoremap :Explore

" Vim 정규식이 아닌 진짜 정규식 사용을 의무화(?)
" \v 라는 글자가 항상 표시되니까 햇갈린다... -.-
"map / /\v


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" GUI 간소화
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

if has("gui_running")

" gVim 메뉴를 사용하지 않는다. 대부분의 명령보다 선행되어야 한다.
" let did_install_default_menus = 1
" let did_install_syntax_menu = 1
" let skip_syntax_sel_menu = 1
" 설정 방식이 바뀌었다.
set go-=m

" 툴바를 보이지 않게 한다.
set go-=T

" 스크롤바를 표시하지 않는다.
set go-=l
set go-=L
set go-=r
set go-=R
set go-=b

" GUI 여서 마우스가 사용 가능하면...
" 마우스를 사용하지 않는다. (누르면 이동되는게 귀찮다!)
" set mouse=a
set mouse=

" 마우스 모델을 popup 으로 함.
set mousem=popup

" '간단한 선택' 다이얼로그가 새 창에서 뜨지 않도록...
set go+=c

endif


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 편리한 기능
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" Tab 자동 완성시 가능한 목록을 보여줌
set wmnu

" 파일 탐색기 설정
let g:explVertical=1
let g:explSplitRight=1
let g:explStartRight=1
let g:explWinSize=20

" vim -b : xxd 포맷으로 바이너리 파일을 수정합니다! (:help hex-editing)
" ...너무 ㅂㅌ적인 방법인 것 같아서 주석처리;
"augroup Binary
" au!
" au BufReadPre *.bin let &bin=1
" au BufReadPost *.bin if &bin | %!xxd
" au BufReadPost *.bin set ft=xxd | endif
" au BufWritePre *.bin if &bin | %!xxd -r
" au BufWritePre *.bin endif
" au BufWritePost *.bin if &bin | %!xxd
" au BufWritePost *.bin set nomod | endif
"augroup END

" Spell Checking 기능 (영어)
" 기본적으로는 비활성화
set nospell spelllang=en

" 각종 toggle 기능
fu! ToggleNu()
let &nu = 1 - &nu
endf
fu! ToggleList()
let &list = 1 - &list
endf
fu! TogglePaste()
let &paste = 1 - &paste
endf
fu! ToggleSpell()
let &l:spell = 1 - &l:spell
endf
map \n :call ToggleNu()
map \l :call ToggleList()
map \p :call TogglePaste()
map \s :call ToggleSpell()


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" 기타 설정
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

" 매크로 실행중에 화면을 다시 그리지 않음
set lz

" 프로그램 시작시 플러그인 로드
set lpl

"noeol 설정
"au BufNew * set bin | set noeol
"set bin | set noeol

" ㅂㅌ barosl 은 모든 플랫폼에서 unix 줄 변경자를 쓰겠습니다! ..orz
" 경고: 만일 당신의 vim 이 '정상적으로' 동작하길 원하시면,
" 바로 다음줄은 주석처리 하거나 없애세요. -.-;;
set ff=unix

" unix dos mac 줄 변경자 모두 다 읽을 수 있도록 합니다.
set ffs=unix,dos,mac


""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""
" End of File
""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Posted by 혁쌈

2006/03/15 23:18 2006/03/15 23:18
Response
No Trackback , a comment
RSS :
http://trlight.cafe24.com/tc/rss/response/195

stty

stty (set tty)
stty 명령을 이용하면 현재의 표준 입력 장치에 대한 터미널 입출력
옵션을 보거나 설정할 수 있다.
사용법을 살펴보면,
stty [argument]

인수 없이 사용하면 현재 설정되어 있는 옵션 사항을 알 수 있다.
현재 설정되어 있는 값들의 일부가 아래와 같을 때,
intr = ^c
: 현재 프로세스를 중지시킬 때. ctrl + c를 사용함.
kill = ^u
: 명령어 입력에서 현재의 line을 취소할 때. ctrl+u를
사용함.
stop = ^s
: 표준 출력을 잠시 멈출 때. ctrl + s를 사용함.

이미 설정되어 있는 입출력 옵션을 변경하는 예를 들어보자.
$ stty erase ^h

- 명령어 입력시 한 글자를 지울 때 ctrl + h를 사용하도록 설정함.

$ stty -isig

- 특수 제어 문자를 검사하지 않는다.

$ stty isig

- 특수 제어 문자를 검사하게 한다.

$ stty -echo

- 입력되는 문자가 화면에 나타나지 않게 한다.

$ stty echo

- 입력되는 문자를 화면에 나타나게 한다.

Posted by 혁쌈

2006/03/11 00:20 2006/03/11 00:20
Response
No Trackback , No Comment
RSS :
http://trlight.cafe24.com/tc/rss/response/193

Ubuntu Nabi 설치가이드

http://ubuntu.or.kr/wiki.php/InstallingInputMethods

Posted by 혁쌈

2006/03/03 14:16 2006/03/03 14:16
Response
No Trackback , No Comment
RSS :
http://trlight.cafe24.com/tc/rss/response/190

VMware 우분투 설치기념 스샷~


나의 두번재 리눅스다. ㅋ
역시나 대세(?)의 포스가 큰지 레드햇과는 다른 엄청나게 깔끔한 인터페이스 하며, 초인기 웹브라우져인 firefox까지 탑재된걸 보면;;
vmware는 사용은 첨 해봤는데.. 나름대로 학습용으론 좋은거 같다.
나는 언제 이런 오픈소스 프로젝트(?)에 투입이 될까??

Posted by 혁쌈

2005/12/21 02:20 2005/12/21 02:20
Response
No Trackback , No Comment
RSS :
http://trlight.cafe24.com/tc/rss/response/168

우분투(ubuntu) vs. SCSI 부팅 (vmware)

설치중 콘솔에서 #modprobe BusLogic

vmware 5.x 대는 scsi HDD의 경우, LSI Logic 이 default 값이다.


SCSI virtual disk worked for me (Hoary on VMWare 5). What made you say that you need to use IDE rather than SCSI?

Comment from: Luigi MD [Visitor] — 19/04/05 @ 21:00



I was using VMWare 4.5 and it failed to detect SCSI disk. Only IDE disk was successfully detected.

I haven't tried with VMWare 5, but if it works with Hoary, that's great news for me.

Thanks.
Comment from: Masa [Member] — 19/04/05 @ 21:46




Works with SCSI too.
When then error message appears, that no hd is found, enter the console with alt+f2 and enter the command 'modprobe BusLogic'. Return to the installer with alt+f1 and continue installation.

Comment from: Flo [Visitor] — 21/04/05 @ 18:35




Thanks for the info. I will put that on our wiki page.

Thanks!
Comment from: Masa [Member] — 21/04/05 @ 18:49



I just installed an Ubuntu 5 guest on workstation 5 (winxp host) and everything worked right off the bat. The only issues I had was getting the right C headers (cuz I'm a linux noob), which they solve on the Ubuntu/vmware wiki, http://www.ubuntulinux.org/wiki/VMware. Now all I have to do is get Ubuntu/VMware to recognize my 7-button intellimouse (5-button support worked out of the box).

Posted by 혁쌈

2005/12/15 14:28 2005/12/15 14:28
Response
No Trackback , 2 Comments
RSS :
http://trlight.cafe24.com/tc/rss/response/166


블로그 이미지

No pains, No gains.

- 혁쌈

Archives

Authors

  1. 혁쌈

Recent Trackbacks

  1. rjixambb rjixambb 10/30

Calendar

«   2009/11   »
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30          

Site Stats

Total hits:
80138
Today:
7
Yesterday:
52