Linux2009. 5. 6. 16:11
Linux에서 가장 무난하고 편하게 사용하는 편집기로 Gedit가 있다.
Gnome에서는 Gedit을 사용할 것이고, 대부분의 배포판에서 KDE보다는 Gnome을 채택하였고,
윈도우즈의 메모장(notepad)와 거의 유사한 단축키를 사용하기에 더더욱 친숙한 프로그램이다.

아마, gedit를 실행하면 아래와 같은 모양이 기본으로 보일것이다.
문법강조를 지원한다.

플러그인을 선택하고 Side Pane을 켜면 아래와 같이 Plugin이 작동을 한다.
현재는 기본 내장된 File Browser Pane을 선택한 모습이다. (간단하게 파일 탐색기)

잘 들어가지 않는 환경설정 메뉴이다. 첫 메뉴로 View가 있는데, 프로그래밍을 한다면
Display line numbers를 선택하고 (지금이 몇째 줄인지 보여주는 기능)
Highlight current line도 선택하고  (선택된 줄을 약간 회색으로 선택하여 선택된 줄을 보여주는 기능)
Highlight matching bracket도 선택한다. (괄호가 있을경우, 짝을 찾아 표시해주는 기능)


plugins에는 기본적으로 Document Statistics와 Insert Date/Time이 선택되어 있다.
파일 탐색기는 File browser pane이고 http://live.gnome.org/Gedit/Plugins 에서 다른 플러그인들을 찾을 수 있다.

Posted by 구차니
Linux/Ubuntu2009. 4. 30. 23:08
1. cvs와 svn을 설치한다.
a. cvs 설치
$ sudo apt-get install cvs
$ sudo apt-get install xinetd
b. svn 설치
$ sudo apt-get install subversion
c. cvs2svn 설치
$ sudo apt-get install cvs2svn
d. htpasswd 설치 (cvs 계정에 사용할 암호 생성용)
$ sudo apt-get install apache2-utils

2. 일단 cvs와 svn을 위해서 계정을 추가한다.
    "시스템 - 관리 - 사용자와 그룹" 을 이용하여 cvssvn사용자를 추가하고 그룹을 사용자 그룹과 동일하게 해준다.
    그리고 보안을 위해서 로그인은 /usr/sbin/nologin으로 해준다. (페도라는 경로가 다르다. /sbin/nologin 에 존재한다.)
a. cvs는 /home/cvs를 생성하고
b. svn은 홈디렉토리를 생성하지 않는다.

3. 그리고 리파지터리를 생성한다.
a. cvs는 $ sudo cvs -d /home/cvs init
b. svn은 $ sudo svnadmin create --fs-type fsfs /home/svn/repos

4. 한번 시험적으로 체크아웃을 해본다. 현재 생성된 내용에는 계정 정보등의 환경설정만 존재한다.
a. cvs는
$ export CVSROOT=/home/cvs
$ sudo cvs co ./
b. svn은
$ svn co file:///home/svn/repos

5. 데몬 구동
a. cvs는 xinetd를 위한 cvs 파일을 생성한뒤, xinetd 서비스를 재시작한다.
    /etc/xinetd.d/cvs 파일의 server_agrs에서 빨간색은 cvs 홈디렉토리이다.
    설치시 cvs -d /home/cvs init 으로 설정한 CVSROOT 위치를 기입해준다.
$ sudo service xinetd restart 혹은
$ sudo /etc/init.d/xinetd start

$ cat /etc/xinetd.d/cvs
service cvspserver
{
     port = 2401
     socket_type = stream
     protocol = tcp
     user = root
     wait = no
     type = UNLISTED
     server = /usr/bin/cvs
     server_args = -f --allow-root /home/cvs pserver
     disable = no
}


b. svn은 svnserve를 기동한다. 데몬 구동시 -r(repo.)의 경로는 create시의
    sudo svnadmin create --fs-type fsfs /home/svn/repos 로 설정된 SVNROOT의 위치를 기입해준다.
$ svnserve -d -r /home/svn

Step 1 - Create your script.
Simply create a new file (I called mine svnserve) and type the command you’d like to run

cd /etc/init.d/ # (thanks Alfonso)
sudo vi svnserve
svnserve -d -r /home/svn/

Step 2 - Save the script in the /etc/init.d/ folder

Step 3 - Make the script executable
sudo chmod +x svnserve

Step 4 - Add the script to the boot sequence
sudo update-rc.d svnserve defaults

[링크 : http://benrobb.com/2007/01/15/howto-start-subversion-at-boot-on-ubuntu/]

6. 사용자 설정
a. cvs는 /home/cvs/CVSROOT/passwd생성해야 한다.

$ htpasswd
Usage:
        htpasswd [-cmdpsD] passwordfile username
        htpasswd -b[cmdpsD] passwordfile username password

        htpasswd -n[mdps] username
        htpasswd -nb[mdps] username password
 -c  Create a new file.
 -n  Don't update file; display results on stdout.
 -m  Force MD5 encryption of the password.
 -d  Force CRYPT encryption of the password (default).
 -p  Do not encrypt the password (plaintext).
 -s  Force SHA encryption of the password.
 -b  Use the password from the command line rather than prompting for it.
 -D  Delete the specified user.
On Windows, NetWare and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.

/home/cvs/CVSROOT 에서 다음의 명령어를 수행한다.
$ htpasswd -c passwd [userid]
New password:
Re-type new password:
Adding password for user [userid]

다음 유저 추가시에는 -c를 제외하고 수행한다.
$ htpasswd passwd [userid]


b. svn은 /home/svn/conf/passwd수정해야 한다.

$ more /home/svn/conf/passwd
### This file is an example password file for svnserve.
### Its format is similar to that of svnserve.conf. As shown in the
### example below it contains one section labelled [users].
### The name and password for each user follow, one account per line.
[users]
# harry = harryssecret
# sally = sallyssecret
userid = passwd   # 이부분에 사용자 계정과 암호를 추가한다.

svn의 암호는 평문으로 들어가게 되므로 보안에 주의를 해야한다.
이것에 싫다면 svn+ssh나 apache를 이용하여 보안에 신경을 쓰도록 하는 것이 좋다.

2009/01/22 - [프로그램 사용/SVN/CVS] - cvs 서버 설치 / 복원
2009/02/26 - [프로그램 사용/SVN/CVS] - windows에 SVN 서버 설치하기
2009/05/10 - [프로그램 사용/SVN/CVS] - cvs2svn 사용방법

[링크 : https://help.ubuntu.com/8.04/serverguide/C/version-control-system.html]
[링크 : https://help.ubuntu.com/8.04/serverguide/C/cvs-server.html]
[링크 : https://help.ubuntu.com/8.04/serverguide/C/subversion.html]


'Linux > Ubuntu' 카테고리의 다른 글

ubuntu에서 compiz 돌리기  (2) 2009.06.02
우분투에는 iptable 대신 ufw가 있다!  (2) 2009.05.07
ubuntu 내장 VNC 서버 - vino-server  (0) 2009.04.30
삼바 설치하기  (0) 2009.04.29
ubuntu 9.04로 업그레이드  (0) 2009.04.28
Posted by 구차니
Linux/Ubuntu2009. 4. 30. 15:03
페도라에서는 /etc/sysconfig/vncserver에 설정파일이 있었는데
ubuntu에서는 이 파일이 존재 하지 않고 vnc가 구동이 되길래 어떤걸로 구동이 되나 궁금해서
프로세스를 찾아 보니 vino-server라는 것이 존재했다.

일단 이녀석을 찾아 보니.. 2005년 KDLP문서에도 발견되는거 봐선... 오래전부터 있어왔던것 같다.
Gnome에 통합된 VNC라고 한다.

[링크 : http://kldp.org/node/55005]

그리고 앞의 문서에서 내가 5900 외에 다른 포트로 사용했는데, 원래 의도한 방법과는 너무 다르게 사용한것 같다.
원래 의도는 VNC가 가지는 보안상의 헛점으로 인해 ssh tunnelling을 이용하여 localhost:0으로 접속을 하도록
한것인데, 이게 귀찮아서 그냥 바로 VNC로 접속하도록 설정을 하고 쓰고 있다.

[링크 : http://www.linuxquestions.org/questions/linux-desktop-74/how-to-configure-vino-server-561753/]

vino-server를 콘솔에서 직접 명령어로 제어하는 것에 대한 문서이다

I suppose the settings in /etc/gdm/gdm.conf-custom override those in /etc/gdm/gdm.conf
You are perfectable capable of setting each value in the
/home/<userhomedir>/.gconf/desktop/gnome/remote_access/%gconf.xml file manually using the gconftool-2 command.
[링크 : http://ubuntuforums.org/showthread.php?t=266981]



가장 왼쪽패널이 Vino-server 패널의 아이콘
vino-server로 vnc 접속시 나타나는 메시지.

[vino-server 공식? : http://vino.klik.atekon.de/]

'Linux > Ubuntu' 카테고리의 다른 글

우분투에는 iptable 대신 ufw가 있다!  (2) 2009.05.07
ubuntu에 cvs / svn 설치하기  (0) 2009.04.30
삼바 설치하기  (0) 2009.04.29
ubuntu 9.04로 업그레이드  (0) 2009.04.28
gnome-avrdude 컴파일하기  (6) 2009.04.27
Posted by 구차니
Linux/Ubuntu2009. 4. 29. 23:17
우분투에는 삼바가 기본 설치 되어 있지 않다
(8.10 이라서 그런가.. 아무튼 데스크탑 에디션은 기본으로 설치 되어 있지 않았다)

그런 이유로 설치 방법을 찾았는데..

삼바 서버
$ sudo apt-get install samba

삼바 클라이언트
$ sudo apt-get install smbfs

[링크 : http://sec.tistory.com/entry/ubuntu-samba-%EC%84%A4%EC%B9%98]

위의 명령어를 치면 된다고 한다.


근데.. 귀찮아서 -ㅁ-
아래와 같이 설치를 했다.

프로그램 설치/제거에서 samba로 검색을 한다.
원래 패키지는 system-config-samba로 gnome에서 GUI로 설정하는 프로그램이다.
이로인해, 의존성으로 줄줄이 설치되게 된다.

다운로드 받은 패키지 목록이다.
samba가 4.5MB 정도로 거대하게 포함되어 있다.

보시다시피 "전에 선택하지 않은 samba 패키지를 선택합니다." 라는 메시지가 나온다.

설치된 녀석을 실행하면 위와 같은 내용이 나온다.
공유를 만들기 위해서는 공유 추가를 눌러준다.

디렉토리는 공유할 디렉토리의 경로
공유명은 윈도우에서 볼 공유 폴더의 이름이다.
그리고 아래의 쓰기 가능, 보이기를 체크 해준다.

아무나 사용하게 하려면 모든 사용자에게 접근 허가를 선택한다.

윈도우에서 접속한 화면이다.

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu에 cvs / svn 설치하기  (0) 2009.04.30
ubuntu 내장 VNC 서버 - vino-server  (0) 2009.04.30
ubuntu 9.04로 업그레이드  (0) 2009.04.28
gnome-avrdude 컴파일하기  (6) 2009.04.27
ubuntu와 fedora의 비교  (0) 2009.04.26
Posted by 구차니
Linux2009. 4. 28. 00:40
JPEG 관련 free 라이브러리를 제공하는 홈페이지이다.
검색을 해보니 jpeg decompress를 하면 bmp으로 나오도록 지원을 하는 듯 하다.

/////////////////////////////////////////////////////////////////////////////
// Creation 30/12/2003                                               
// 
// 
//                             JPG2BMP.C
//                             ---------
// 
// 
// Sylvain MARECHAL - sylvain.marechal1@libertysurf.fr
/////////////////////////////////////////////////////////////////////////////
// 
//  Convert a jpg to a bmp file
//  look at jpeg-6b/djpeg.c for more details
// 
/////////////////////////////////////////////////////////////////////////////
#include "cdjpeg.h"		/* Common decls for cjpeg/djpeg applications */
#include "jversion.h"		/* for version message */

#include "ctype.h"		/* to declare isprint() */

#ifdef USE_CCOMMAND		/* command-line reader for Macintosh */
#ifdef __MWERKS__
#include "sioux.h"              /* Metrowerks needs this */
#include "console.h"		/* ... and this */
#endif
#ifdef THINK_C
#include "console.h"		/* Think declares it here */
#endif
#endif
#include "jpg2bmp.h"		/* for version message */


/* Create the add-on message string table. */
/*
#define JMESSAGE(code,string)	string ,

static const char * const cdjpeg_message_table[] = {
#include "cderror.h"
  NULL
};
*/
//#define MAIN
#ifdef MAIN
// The test program
int main( int argc, char * argv[] )
{
    if( argc != 3 )
    {
	printf( "Usage : %s [file_in.jpg] [file_out.bmp]\n" );
	return 1;
    }
    return Jpg2Bmp( argv[1], argv[2] );
}
#endif



int Jpg2Bmp( char * pszJpgFile, char * pszBmpFile )
{
  struct jpeg_decompress_struct cinfo;
  struct jpeg_error_mgr jerr;
  djpeg_dest_ptr dest_mgr = NULL;
  FILE * input_file;
  FILE * output_file;
  JDIMENSION num_scanlines;

  /* Initialize the JPEG decompression object with default error handling. */
  cinfo.err = jpeg_std_error(&jerr);
  jpeg_create_decompress(&cinfo);
  /* Add some application-specific error messages (from cderror.h) */
//  jerr.addon_message_table = cdjpeg_message_table;
  jerr.first_addon_message = JMSG_FIRSTADDONCODE;
  jerr.last_addon_message = JMSG_LASTADDONCODE;

  /* Open the input file. */
  if ((input_file = fopen(pszJpgFile, READ_BINARY)) == NULL) {
      return -1;
  }

  /* Open the output file. */
    if ((output_file = fopen(pszBmpFile, WRITE_BINARY)) == NULL) {
      return -1;
    }

  /* Specify data source for decompression */
  jpeg_stdio_src(&cinfo, input_file);

  /* Read file header, set default decompression parameters */
  (void) jpeg_read_header(&cinfo, TRUE);

  /* Adjust default decompression parameters by re-parsing the options */
  //file_index = parse_switches(&cinfo, argc, argv, 0, TRUE);

  /* Initialize the output module now to let it override any crucial
   * option settings (for instance, GIF wants to force color quantization).
   */
    dest_mgr = jinit_write_bmp(&cinfo, FALSE);
  dest_mgr->output_file = output_file;

  /* Start decompressor */
  (void) jpeg_start_decompress(&cinfo);

  /* Write output file header */
  (*dest_mgr->start_output) (&cinfo, dest_mgr);

  /* Process data */
  while (cinfo.output_scanline < cinfo.output_height) {
    num_scanlines = jpeg_read_scanlines(&cinfo, dest_mgr->buffer,
					dest_mgr->buffer_height);
    (*dest_mgr->put_pixel_rows) (&cinfo, dest_mgr, num_scanlines);
  }

  /* Finish decompression and release memory.
   * I must do it in this order because output module has allocated memory
   * of lifespan JPOOL_IMAGE; it needs to finish before releasing memory.
   */
  (*dest_mgr->finish_output) (&cinfo, dest_mgr);
  (void) jpeg_finish_decompress(&cinfo);
  jpeg_destroy_decompress(&cinfo);

  /* Close files, if we opened them */
    fclose(input_file);
    fclose(output_file);

  /* All done. */
  return jerr.num_warnings ? -1 : 0;
}


[예제 : ce.sharif.edu/~haghshenas/files/c/jpg2bmp.c]

[공식 : http://www.ijg.org/]
Posted by 구차니
Linux2009. 4. 28. 00:35

Name

convert - convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.

Synopsis

convert input-file [options] output-file

Overview

The convert program is a member of the imagemagick(1) suite of tools. Use it to convert between image formats as well as resize an image, blur, crop, despeckle, dither, draw on, flip, join, re-sample, and much more.

For more information about the convert command, point your browser to file:///usr/share/doc/ImageMagick-6.2.8/www/convert.html or http://www.imagemagick.org/script/convert.php.

Run 'convert -help' to get a summary of the convert command options.

See-also

imagemagick(1)

Copyright

Copyright (C) 1999-2005 ImageMagick Studio LLC. Additional copyrights and licenses apply to this software, see http://www.imagemagick.org/script/license.php


[링크 : http://linux.die.net/man/1/convert]


리눅스에서 이미지 파일 포맷이나 크기 등을 변환해주는 프로그램이다.
상당히 유용해 보이지만, 마지막에 copyright로 인해서 상용제품에는 쓰는데 상당히 제약이 있을 것으로 보인다.
Posted by 구차니
Linux/Ubuntu2009. 4. 28. 00:04
음.. 아직까지는 괜찮겠군

오늘.. 잠자리에 들기는 글른건가?


멀 이리도 많이 삭제하려는건지 모르겠다만.. 웬지 보기에는.
필요 없는데 내가 설치를 한 녀석들 같은 느낌.. 자동으로 삭제 해주는 착한 센스?

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu 내장 VNC 서버 - vino-server  (0) 2009.04.30
삼바 설치하기  (0) 2009.04.29
gnome-avrdude 컴파일하기  (6) 2009.04.27
ubuntu와 fedora의 비교  (0) 2009.04.26
Ubuntu에 VNC 설정하기  (0) 2009.04.25
Posted by 구차니
Linux/Ubuntu2009. 4. 27. 00:39
gnome-avrdude을 컴파일 하려면 이러한 에러가 발생한다.

checking for GNOME... configure: error: Package requirements (libgnome-2.0 libgnomeui-2.0 libglade-2.0 ) were not met:

No package 'libgnome-2.0' found
No package 'libgnomeui-2.0' found
No package 'libglade-2.0' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables GNOME_CFLAGS
and GNOME_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

아무튼 여기에 없는 패키지는 아래의 것을 시냅틱 패키지 매니저에서 설치하면 된다.
libgnomeui-dev


아무래도.. 페도라에 익숙해져 있다 보니
dev 라는 접미어가 가지는 어감을 전혀 생각해보지를 못했다.(어쩌면.. 수면부족이라 그럴지도..)


사족 : 그냥 우분투에서 이녀석을 컴파일하기 위해서는
YACC와 위의 라이브러리가 필요한데, YACC는 bison으로 설치하면 된다.

'Linux > Ubuntu' 카테고리의 다른 글

삼바 설치하기  (0) 2009.04.29
ubuntu 9.04로 업그레이드  (0) 2009.04.28
ubuntu와 fedora의 비교  (0) 2009.04.26
Ubuntu에 VNC 설정하기  (0) 2009.04.25
kscope on Ubuntu 8.10  (0) 2009.04.24
Posted by 구차니
Linux/Ubuntu2009. 4. 26. 10:54
우분투의 장점
누군가가 미리 만들어 놓은 패키지가 존재한다면 컴파일러도 설치할 필요도 없이 사용이 가능하다.

우분투의 단점
누군가가 미리 만들어 놓은 패키지가 없다면 컴파일하기 너무 힘들다.


avrdude 컴파일 하려니 yacc없다고 하고(sudo apt-get bison)
그래서 깔고 했더니 sed가 오작동하고.. 그래서 찾아 봤더니 패키지가 존재해서 설치하고(sudo apt-get avrdude)
gnome-avrdude는 존재하지 않아 컴파일하려니 각종 에러가 발생한다 ㄱ-

아무튼.. 개발에 있어서는 확실히 페도라가 편한거 같기도 하고 아니거 같기도 하고..

'Linux > Ubuntu' 카테고리의 다른 글

ubuntu 9.04로 업그레이드  (0) 2009.04.28
gnome-avrdude 컴파일하기  (6) 2009.04.27
Ubuntu에 VNC 설정하기  (0) 2009.04.25
kscope on Ubuntu 8.10  (0) 2009.04.24
우분투 설치중  (6) 2009.04.24
Posted by 구차니
Linux/Ubuntu2009. 4. 25. 00:42
X11이 가동중이라면(다르게 말해서 Gnome이나 KDE 등이 실행중이라면, 혹은 runlevel이 5라면)
localhost:0.0 은 사용중이므로 사용할 수가 없다.
(그러니까 기본값인 5900은 실질적으로 X윈도우가 기본 구동되는 우분투에서는 사용할 수 없다.)


그런 이유로 다른 포트로 설정을 해주어야 하는데..
시스템 > 기본 설정 > 원격 데스크탑 설정을 눌러주면 아래와 같이 실행된다.

공유에서 다른 사용자가 데스크탑을 볼 수 있도록 합니다.
다른 사용자가 데스크탑을 제어할 수 있도록 합니다. 를 체크해준 후
아래의 확인을 하도록 물어보기는 끄고, 사용자가 이 암호를 입력하여야 합니다 를 체크하고 암호를 입력해줍니다.


그리고 고급 탭에서는
보조 포트 사용을 해준다음, 5901이나 5902등, 5900번을 피해서 사용하시면 되겠습니다.
로컬 연결만 허용은, SSH 터널링 등을 통해서 안전하게 사용하기 위해서 사용하는 것으로
그냥 vnc로 바로 접속하기 위해서는 체크를 꺼주어야 합니다.


'Linux > Ubuntu' 카테고리의 다른 글

gnome-avrdude 컴파일하기  (6) 2009.04.27
ubuntu와 fedora의 비교  (0) 2009.04.26
kscope on Ubuntu 8.10  (0) 2009.04.24
우분투 설치중  (6) 2009.04.24
ubuntu 8.10 설치 실패.. 아놔 CD 관리 ㅠ.ㅠ  (2) 2009.04.23
Posted by 구차니